Top Description Fields Methods
io.netty.handler.ssl

public Interface OpenSslPrivateKeyMethod

Annotations
@UnstableApi
Imports
io.netty.internal.tcnative.SSLPrivateKeyMethod, io.netty.util.internal.UnstableApi, javax.net.ssl.SSLEngine

Allow to customize private key signing / decrypting (when using RSA). Only supported when using BoringSSL atm.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the decrypted data (must not be null)
decrypt
(SSLEngine engine, byte[]
the input which should be decrypted
input
)

Decrypts the input with the given key and returns the decrypted bytes.

public byte[]

Returns:

the signed data (must not be null)
sign
(SSLEngine engine, int
the algorithm to use for signing
signatureAlgorithm
,
byte[]
the digest itself
input
)

Signs the input with the given key and returns the signed bytes.

Field Detail

SSL_SIGN_ECDSA_SECP256R1_SHA256back to summary
public static final int SSL_SIGN_ECDSA_SECP256R1_SHA256
SSL_SIGN_ECDSA_SECP384R1_SHA384back to summary
public static final int SSL_SIGN_ECDSA_SECP384R1_SHA384
SSL_SIGN_ECDSA_SECP521R1_SHA512back to summary
public static final int SSL_SIGN_ECDSA_SECP521R1_SHA512
SSL_SIGN_ECDSA_SHA1back to summary
public static final int SSL_SIGN_ECDSA_SHA1
SSL_SIGN_ED25519back to summary
public static final int SSL_SIGN_ED25519
SSL_SIGN_RSA_PKCS1_MD5_SHA1back to summary
public static final int SSL_SIGN_RSA_PKCS1_MD5_SHA1
SSL_SIGN_RSA_PKCS1_SHA1back to summary
public static final int SSL_SIGN_RSA_PKCS1_SHA1
SSL_SIGN_RSA_PKCS1_SHA256back to summary
public static final int SSL_SIGN_RSA_PKCS1_SHA256
SSL_SIGN_RSA_PKCS1_SHA384back to summary
public static final int SSL_SIGN_RSA_PKCS1_SHA384
SSL_SIGN_RSA_PKCS1_SHA512back to summary
public static final int SSL_SIGN_RSA_PKCS1_SHA512
SSL_SIGN_RSA_PSS_RSAE_SHA256back to summary
public static final int SSL_SIGN_RSA_PSS_RSAE_SHA256
SSL_SIGN_RSA_PSS_RSAE_SHA384back to summary
public static final int SSL_SIGN_RSA_PSS_RSAE_SHA384
SSL_SIGN_RSA_PSS_RSAE_SHA512back to summary
public static final int SSL_SIGN_RSA_PSS_RSAE_SHA512

Method Detail

decryptback to summary
public byte[] decrypt(SSLEngine engine, byte[] input) throws Exception

Decrypts the input with the given key and returns the decrypted bytes.

Parameters
engine:SSLEngine

the SSLEngine

input:byte[]

the input which should be decrypted

Returns:byte[]

the decrypted data (must not be null)

Exceptions
Exception:
thrown if an error is encountered during the decrypting
signback to summary
public byte[] sign(SSLEngine engine, int signatureAlgorithm, byte[] input) throws Exception

Signs the input with the given key and returns the signed bytes.

Parameters
engine:SSLEngine

the SSLEngine

signatureAlgorithm:int

the algorithm to use for signing

input:byte[]

the digest itself

Returns:byte[]

the signed data (must not be null)

Exceptions
Exception:
thrown if an error is encountered during the signing