Package io.netty.handler.ssl
Interface OpenSslPrivateKeyMethod
-
@UnstableApi public interface OpenSslPrivateKeyMethod
Allow to customize private key signing / decrypting (when using RSA). Only supported when using BoringSSL atm.
-
-
Field Summary
Fields Modifier and Type Field Description static intSSL_SIGN_ECDSA_SECP256R1_SHA256static intSSL_SIGN_ECDSA_SECP384R1_SHA384static intSSL_SIGN_ECDSA_SECP521R1_SHA512static intSSL_SIGN_ECDSA_SHA1static intSSL_SIGN_ED25519static intSSL_SIGN_RSA_PKCS1_MD5_SHA1static intSSL_SIGN_RSA_PKCS1_SHA1static intSSL_SIGN_RSA_PKCS1_SHA256static intSSL_SIGN_RSA_PKCS1_SHA384static intSSL_SIGN_RSA_PKCS1_SHA512static intSSL_SIGN_RSA_PSS_RSAE_SHA256static intSSL_SIGN_RSA_PSS_RSAE_SHA384static intSSL_SIGN_RSA_PSS_RSAE_SHA512
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]decrypt(javax.net.ssl.SSLEngine engine, byte[] input)Decrypts the input with the given key and returns the decrypted bytes.byte[]sign(javax.net.ssl.SSLEngine engine, int signatureAlgorithm, byte[] input)Signs the input with the given key and returns the signed bytes.
-
-
-
Field Detail
-
SSL_SIGN_RSA_PKCS1_SHA1
static final int SSL_SIGN_RSA_PKCS1_SHA1
-
SSL_SIGN_RSA_PKCS1_SHA256
static final int SSL_SIGN_RSA_PKCS1_SHA256
-
SSL_SIGN_RSA_PKCS1_SHA384
static final int SSL_SIGN_RSA_PKCS1_SHA384
-
SSL_SIGN_RSA_PKCS1_SHA512
static final int SSL_SIGN_RSA_PKCS1_SHA512
-
SSL_SIGN_ECDSA_SHA1
static final int SSL_SIGN_ECDSA_SHA1
-
SSL_SIGN_ECDSA_SECP256R1_SHA256
static final int SSL_SIGN_ECDSA_SECP256R1_SHA256
-
SSL_SIGN_ECDSA_SECP384R1_SHA384
static final int SSL_SIGN_ECDSA_SECP384R1_SHA384
-
SSL_SIGN_ECDSA_SECP521R1_SHA512
static final int SSL_SIGN_ECDSA_SECP521R1_SHA512
-
SSL_SIGN_RSA_PSS_RSAE_SHA256
static final int SSL_SIGN_RSA_PSS_RSAE_SHA256
-
SSL_SIGN_RSA_PSS_RSAE_SHA384
static final int SSL_SIGN_RSA_PSS_RSAE_SHA384
-
SSL_SIGN_RSA_PSS_RSAE_SHA512
static final int SSL_SIGN_RSA_PSS_RSAE_SHA512
-
SSL_SIGN_ED25519
static final int SSL_SIGN_ED25519
-
SSL_SIGN_RSA_PKCS1_MD5_SHA1
static final int SSL_SIGN_RSA_PKCS1_MD5_SHA1
-
-
Method Detail
-
sign
byte[] sign(javax.net.ssl.SSLEngine engine, int signatureAlgorithm, byte[] input) throws java.lang.ExceptionSigns the input with the given key and returns the signed bytes.- Parameters:
engine- theSSLEnginesignatureAlgorithm- the algorithm to use for signinginput- the digest itself- Returns:
- the signed data (must not be
null) - Throws:
java.lang.Exception- thrown if an error is encountered during the signing
-
decrypt
byte[] decrypt(javax.net.ssl.SSLEngine engine, byte[] input) throws java.lang.ExceptionDecrypts the input with the given key and returns the decrypted bytes.- Parameters:
engine- theSSLEngineinput- the input which should be decrypted- Returns:
- the decrypted data (must not be
null) - Throws:
java.lang.Exception- thrown if an error is encountered during the decrypting
-
-