Package org.conscrypt
Interface NativeCrypto.SSLHandshakeCallbacks
- All Known Implementing Classes:
OpenSSLSocketImpl,OpenSSLSocketImplWrapper
- Enclosing class:
- NativeCrypto
public static interface NativeCrypto.SSLHandshakeCallbacks
A collection of callbacks from the native OpenSSL code that are
related to the SSL handshake initiated by SSL_do_handshake.
-
Method Summary
Modifier and Type Method Description voidclientCertificateRequested(byte[] keyTypes, byte[][] asn1DerEncodedX500Principals)Called on an SSL client when the server requests (or requires a certificate).voidhandshakeCompleted()Called when SSL handshake is completed.voidverifyCertificateChain(byte[][] asn1DerEncodedCertificateChain, String authMethod)Verify that we trust the certificate chain is trusted.
-
Method Details
-
verifyCertificateChain
void verifyCertificateChain(byte[][] asn1DerEncodedCertificateChain, String authMethod) throws CertificateExceptionVerify that we trust the certificate chain is trusted.- Parameters:
asn1DerEncodedCertificateChain- A chain of ASN.1 DER encoded certificatesauthMethod- auth algorithm name- Throws:
CertificateException- if the certificate is untrusted
-
clientCertificateRequested
void clientCertificateRequested(byte[] keyTypes, byte[][] asn1DerEncodedX500Principals) throws CertificateEncodingException, SSLExceptionCalled on an SSL client when the server requests (or requires a certificate). The client can respond by using SSL_use_certificate and SSL_use_PrivateKey to set a certificate if has an appropriate one available, similar to how the server provides its certificate.- Parameters:
keyTypes- key types supported by the server, convertible to strings with #keyTypeasn1DerEncodedX500Principals- CAs known to the server- Throws:
CertificateEncodingExceptionSSLException
-
handshakeCompleted
void handshakeCompleted()Called when SSL handshake is completed. Note that this can be after SSL_do_handshake returns when handshake cutthrough is enabled.
-