接口 CertificateCallback
-
public interface CertificateCallbackIs called during handshake and hooked into openssl viaSSL_CTX_set_cert_cb. IMPORTANT: Implementations of this interface should be static as it is stored as a global reference via JNI. This means if you use an inner / anonymous class to implement this and also depend on the finalizer of the class to free up the SSLContext the finalizer will never run as the object is never GC, due the hard reference to the enclosing class. This will most likely result in a memory leak.
-
-
字段概要
字段 修饰符和类型 字段 说明 static byteTLS_CT_DSS_FIXED_DHstatic byteTLS_CT_DSS_SIGNstatic byteTLS_CT_ECDSA_FIXED_ECDHstatic byteTLS_CT_ECDSA_SIGNstatic byteTLS_CT_RSA_FIXED_DHstatic byteTLS_CT_RSA_FIXED_ECDHstatic byteTLS_CT_RSA_SIGNThe types contained in thekeyTypeBytesarray.
-
-
-
字段详细资料
-
TLS_CT_RSA_SIGN
static final byte TLS_CT_RSA_SIGN
The types contained in thekeyTypeBytesarray.- 另请参阅:
- 常量字段值
-
TLS_CT_DSS_SIGN
static final byte TLS_CT_DSS_SIGN
- 另请参阅:
- 常量字段值
-
TLS_CT_RSA_FIXED_DH
static final byte TLS_CT_RSA_FIXED_DH
- 另请参阅:
- 常量字段值
-
TLS_CT_DSS_FIXED_DH
static final byte TLS_CT_DSS_FIXED_DH
- 另请参阅:
- 常量字段值
-
TLS_CT_ECDSA_SIGN
static final byte TLS_CT_ECDSA_SIGN
- 另请参阅:
- 常量字段值
-
TLS_CT_RSA_FIXED_ECDH
static final byte TLS_CT_RSA_FIXED_ECDH
- 另请参阅:
- 常量字段值
-
TLS_CT_ECDSA_FIXED_ECDH
static final byte TLS_CT_ECDSA_FIXED_ECDH
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
handle
void handle(long ssl, byte[] keyTypeBytes, byte[][] asn1DerEncodedPrincipals) throws ExceptionCalled during cert selection. If a certificate chain / key should be usedSSL.setKeyMaterial(long, long, long)must be called from this callback after all preparations / validations were completed.- 参数:
ssl- the SSL instancekeyTypeBytes- an array of the key types on client-mode ornullon server-mode.asn1DerEncodedPrincipals- the principals ornull.- 抛出:
Exception
-
-