Class WolfSSLContext

    • Method Detail

      • engineInit

        protected void engineInit​(javax.net.ssl.KeyManager[] km,
                                  javax.net.ssl.TrustManager[] tm,
                                  java.security.SecureRandom sr)
                           throws java.security.KeyManagementException
        Initializes a SSLContext. wolfJSSE currently selects the first KeyManager and TrustManager in the input arrays to be used during the SSL/TLS context setup and session. Native wolfSSL gets entropy directly based on how the wolfSSL library has been compiled. SecureRandom is not used by wolfJSSE.
        Specified by:
        engineInit in class javax.net.ssl.SSLContextSpi
        Parameters:
        km - - array of KeyManager objects
        tm - - array of TrustManager objects
        sr - - SecureRandom object
        Throws:
        java.security.KeyManagementException - if wolfJSSE fails to load and use input objects.
      • engineGetSocketFactory

        protected javax.net.ssl.SSLSocketFactory engineGetSocketFactory()
                                                                 throws java.lang.IllegalStateException
        Creates a new wolfJSSE SSLSocketFactory.
        Specified by:
        engineGetSocketFactory in class javax.net.ssl.SSLContextSpi
        Throws:
        java.lang.IllegalStateException - if SSLContext has not been initialized
      • engineGetServerSocketFactory

        protected javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory()
                                                                             throws java.lang.IllegalStateException
        Creates a new wolfJSSE SSLServerSocketFactory.
        Specified by:
        engineGetServerSocketFactory in class javax.net.ssl.SSLContextSpi
        Throws:
        java.lang.IllegalStateException - if SSLContext has not been initialized
      • engineCreateSSLEngine

        protected javax.net.ssl.SSLEngine engineCreateSSLEngine()
                                                         throws java.lang.IllegalStateException
        Creates a new wolfJSSE SSLEngine.
        Specified by:
        engineCreateSSLEngine in class javax.net.ssl.SSLContextSpi
        Throws:
        java.lang.IllegalStateException - if SSLContext has not been initialized
      • engineCreateSSLEngine

        protected javax.net.ssl.SSLEngine engineCreateSSLEngine​(java.lang.String host,
                                                                int port)
                                                         throws java.lang.IllegalStateException
        Creates a new SSLEngine, using peer information as hints.
        Specified by:
        engineCreateSSLEngine in class javax.net.ssl.SSLContextSpi
        Parameters:
        host - - name of the peer host
        port - - peer port
        Throws:
        java.lang.IllegalStateException - if SSLContext has not been initialized
      • engineGetServerSessionContext

        protected javax.net.ssl.SSLSessionContext engineGetServerSessionContext()
        Returns the SSLServerSessionContext associated with this SSLContext. Not currently supported by wolfJSSE.
        Specified by:
        engineGetServerSessionContext in class javax.net.ssl.SSLContextSpi
        Throws:
        java.lang.UnsupportedOperationException - operation not yet supported
      • engineGetClientSessionContext

        protected javax.net.ssl.SSLSessionContext engineGetClientSessionContext()
        Returns the SSLClientSessionContext associated with this SSLContext. Not currently supported by wolfJSSE.
        Specified by:
        engineGetClientSessionContext in class javax.net.ssl.SSLContextSpi
        Throws:
        java.lang.UnsupportedOperationException - operation not yet supported
      • engineGetDefaultSSLParameters

        protected javax.net.ssl.SSLParameters engineGetDefaultSSLParameters()
        Returns copy of SSLParameters with default settings for this SSLContext.
        Overrides:
        engineGetDefaultSSLParameters in class javax.net.ssl.SSLContextSpi
      • engineGetSupportedSSLParameters

        protected javax.net.ssl.SSLParameters engineGetSupportedSSLParameters()
        Returns copy of SSLParameters with max supported settings for this SSLContext.
        Overrides:
        engineGetSupportedSSLParameters in class javax.net.ssl.SSLContextSpi
      • getInternalSSLParams

        protected com.wolfssl.provider.jsse.WolfSSLParameters getInternalSSLParams()
      • getInternalWolfSSLContext

        protected WolfSSLContext getInternalWolfSSLContext()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getProtocolsMask

        public java.lang.String[] getProtocolsMask​(long noOpt)