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
    void clientCertificateRequested​(byte[] keyTypes, byte[][] asn1DerEncodedX500Principals)
    Called on an SSL client when the server requests (or requires a certificate).
    void handshakeCompleted()
    Called when SSL handshake is completed.
    void verifyCertificateChain​(byte[][] asn1DerEncodedCertificateChain, String authMethod)
    Verify that we trust the certificate chain is trusted.
  • Method Details

    • verifyCertificateChain

      void verifyCertificateChain​(byte[][] asn1DerEncodedCertificateChain, String authMethod) throws CertificateException
      Verify that we trust the certificate chain is trusted.
      Parameters:
      asn1DerEncodedCertificateChain - A chain of ASN.1 DER encoded certificates
      authMethod - auth algorithm name
      Throws:
      CertificateException - if the certificate is untrusted
    • clientCertificateRequested

      void clientCertificateRequested​(byte[] keyTypes, byte[][] asn1DerEncodedX500Principals) throws CertificateEncodingException, SSLException
      Called 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 #keyType
      asn1DerEncodedX500Principals - CAs known to the server
      Throws:
      CertificateEncodingException
      SSLException
    • handshakeCompleted

      void handshakeCompleted()
      Called when SSL handshake is completed. Note that this can be after SSL_do_handshake returns when handshake cutthrough is enabled.