Package org.apache.tomcat.jni
Interface CertificateRequestedCallback
-
public interface CertificateRequestedCallbackIs called during handshake and hooked into openssl viaSSL_CTX_set_client_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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCertificateRequestedCallback.KeyMaterialHolds the material to use.
-
Field Summary
Fields Modifier and Type Field Description 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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CertificateRequestedCallback.KeyMaterialrequested(long ssl, byte[] keyTypeBytes, byte[][] asn1DerEncodedPrincipals)Called during cert selection.
-
-
-
Field Detail
-
TLS_CT_RSA_SIGN
static final byte TLS_CT_RSA_SIGN
The types contained in thekeyTypeBytesarray.- See Also:
- Constant Field Values
-
TLS_CT_DSS_SIGN
static final byte TLS_CT_DSS_SIGN
- See Also:
- Constant Field Values
-
TLS_CT_RSA_FIXED_DH
static final byte TLS_CT_RSA_FIXED_DH
- See Also:
- Constant Field Values
-
TLS_CT_DSS_FIXED_DH
static final byte TLS_CT_DSS_FIXED_DH
- See Also:
- Constant Field Values
-
TLS_CT_ECDSA_SIGN
static final byte TLS_CT_ECDSA_SIGN
- See Also:
- Constant Field Values
-
TLS_CT_RSA_FIXED_ECDH
static final byte TLS_CT_RSA_FIXED_ECDH
- See Also:
- Constant Field Values
-
TLS_CT_ECDSA_FIXED_ECDH
static final byte TLS_CT_ECDSA_FIXED_ECDH
- See Also:
- Constant Field Values
-
-
Method Detail
-
requested
CertificateRequestedCallback.KeyMaterial requested(long ssl, byte[] keyTypeBytes, byte[][] asn1DerEncodedPrincipals)
Called during cert selection.- Parameters:
ssl- the SSL instancekeyTypeBytes- an array of the key types.asn1DerEncodedPrincipals- the principals- Returns:
- material to use or
nullif non should be used. The ownership of all native memory goes over to tcnative at this point.
-
-