Top Description Fields Methods
io.netty.internal.tcnative

public Interface CertificateCallback


Is called during handshake and hooked into openssl via SSL_CTX_set_cert_cb.

Important Note

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.

Field Summary

Modifier and TypeField and Description
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
public static final byte
TLS_CT_RSA_SIGN

The types contained in the keyTypeBytes array.

Method Summary

Modifier and TypeMethod and Description
public void
handle(long
the SSL instance
ssl
,
byte[]
an array of the key types on client-mode or null on server-mode.
keyTypeBytes
,
byte[][]
the principals or null.
asn1DerEncodedPrincipals
)

Called during cert selection.

Field Detail

TLS_CT_DSS_FIXED_DHback to summary
public static final byte TLS_CT_DSS_FIXED_DH
TLS_CT_DSS_SIGNback to summary
public static final byte TLS_CT_DSS_SIGN
TLS_CT_ECDSA_FIXED_ECDHback to summary
public static final byte TLS_CT_ECDSA_FIXED_ECDH
TLS_CT_ECDSA_SIGNback to summary
public static final byte TLS_CT_ECDSA_SIGN
TLS_CT_RSA_FIXED_DHback to summary
public static final byte TLS_CT_RSA_FIXED_DH
TLS_CT_RSA_FIXED_ECDHback to summary
public static final byte TLS_CT_RSA_FIXED_ECDH
TLS_CT_RSA_SIGNback to summary
public static final byte TLS_CT_RSA_SIGN

The types contained in the keyTypeBytes array.

Method Detail

handleback to summary
public void handle(long ssl, byte[] keyTypeBytes, byte[][] asn1DerEncodedPrincipals) throws Exception

Called during cert selection. If a certificate chain / key should be used SSL#setKeyMaterial(long, long, long) must be called from this callback after all preparations / validations were completed.

Parameters
ssl:long

the SSL instance

keyTypeBytes:byte[]

an array of the key types on client-mode or null on server-mode.

asn1DerEncodedPrincipals:byte[][]

the principals or null.