Interface SSLContext

  • All Known Implementing Classes:
    OpenSSLContext

    public interface SSLContext
    This interface is needed to override the default SSLContext class to allow SSL implementation pluggability without having to use JCE. With regular JSSE it will do nothing but delegate to the SSLContext.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.net.ssl.SSLEngine createSSLEngine()
      Creates a new SSL engine.
      void destroy()
      Destroys this SSL context and releases any associated resources.
      java.security.cert.X509Certificate[] getAcceptedIssuers()
      Returns the accepted issuers.
      java.security.cert.X509Certificate[] getCertificateChain​(java.lang.String alias)
      Returns the certificate chain for the given alias.
      javax.net.ssl.SSLSessionContext getServerSessionContext()
      Returns the server session context.
      javax.net.ssl.SSLServerSocketFactory getServerSocketFactory()
      Returns the server socket factory.
      javax.net.ssl.SSLParameters getSupportedSSLParameters()
      Returns the supported SSL parameters.
      void init​(javax.net.ssl.KeyManager[] kms, javax.net.ssl.TrustManager[] tms, java.security.SecureRandom sr)
      Initializes the SSL context with the given key managers, trust managers, and random number generator.
    • Method Detail

      • init

        void init​(javax.net.ssl.KeyManager[] kms,
                  javax.net.ssl.TrustManager[] tms,
                  java.security.SecureRandom sr)
           throws java.security.KeyManagementException
        Initializes the SSL context with the given key managers, trust managers, and random number generator.
        Parameters:
        kms - The key managers
        tms - The trust managers
        sr - The secure random number generator
        Throws:
        java.security.KeyManagementException - if initialization fails
      • destroy

        void destroy()
        Destroys this SSL context and releases any associated resources.
      • getServerSessionContext

        javax.net.ssl.SSLSessionContext getServerSessionContext()
        Returns the server session context.
        Returns:
        The server session context
      • createSSLEngine

        javax.net.ssl.SSLEngine createSSLEngine()
        Creates a new SSL engine.
        Returns:
        The new SSL engine
      • getServerSocketFactory

        javax.net.ssl.SSLServerSocketFactory getServerSocketFactory()
        Returns the server socket factory.
        Returns:
        The server socket factory
      • getSupportedSSLParameters

        javax.net.ssl.SSLParameters getSupportedSSLParameters()
        Returns the supported SSL parameters.
        Returns:
        The supported SSL parameters
      • getCertificateChain

        java.security.cert.X509Certificate[] getCertificateChain​(java.lang.String alias)
        Returns the certificate chain for the given alias.
        Parameters:
        alias - The alias
        Returns:
        The certificate chain
      • getAcceptedIssuers

        java.security.cert.X509Certificate[] getAcceptedIssuers()
        Returns the accepted issuers.
        Returns:
        The accepted issuers