Package com.wolfssl.provider.jsse
Class WolfSSLContext
- java.lang.Object
-
- javax.net.ssl.SSLContextSpi
-
- com.wolfssl.provider.jsse.WolfSSLContext
-
- Direct Known Subclasses:
WolfSSLContext.DEFAULT_Context,WolfSSLContext.TLSV1_Context,WolfSSLContext.TLSV11_Context,WolfSSLContext.TLSV12_Context,WolfSSLContext.TLSV13_Context,WolfSSLContext.TLSV23_Context
public class WolfSSLContext extends javax.net.ssl.SSLContextSpiwolfSSL implementation of SSLContextSpi- Author:
- wolfSSL
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWolfSSLContext.DEFAULT_Contextstatic classWolfSSLContext.TLSV1_Contextstatic classWolfSSLContext.TLSV11_Contextstatic classWolfSSLContext.TLSV12_Contextstatic classWolfSSLContext.TLSV13_Contextstatic classWolfSSLContext.TLSV23_Context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.net.ssl.SSLEngineengineCreateSSLEngine()Creates a new wolfJSSE SSLEngine.protected javax.net.ssl.SSLEngineengineCreateSSLEngine(java.lang.String host, int port)Creates a new SSLEngine, using peer information as hints.protected javax.net.ssl.SSLSessionContextengineGetClientSessionContext()Returns the SSLClientSessionContext associated with this SSLContext.protected javax.net.ssl.SSLParametersengineGetDefaultSSLParameters()Returns copy of SSLParameters with default settings for this SSLContext.protected javax.net.ssl.SSLSessionContextengineGetServerSessionContext()Returns the SSLServerSessionContext associated with this SSLContext.protected javax.net.ssl.SSLServerSocketFactoryengineGetServerSocketFactory()Creates a new wolfJSSE SSLServerSocketFactory.protected javax.net.ssl.SSLSocketFactoryengineGetSocketFactory()Creates a new wolfJSSE SSLSocketFactory.protected javax.net.ssl.SSLParametersengineGetSupportedSSLParameters()Returns copy of SSLParameters with max supported settings for this SSLContext.protected voidengineInit(javax.net.ssl.KeyManager[] km, javax.net.ssl.TrustManager[] tm, java.security.SecureRandom sr)Initializes a SSLContext.protected voidfinalize()protected WolfSSLAuthStoregetInternalAuthStore()protected com.wolfssl.provider.jsse.WolfSSLParametersgetInternalSSLParams()protected WolfSSLContextgetInternalWolfSSLContext()java.lang.String[]getProtocolsMask(long noOpt)
-
-
-
Method Detail
-
engineInit
protected void engineInit(javax.net.ssl.KeyManager[] km, javax.net.ssl.TrustManager[] tm, java.security.SecureRandom sr) throws java.security.KeyManagementExceptionInitializes 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:
engineInitin classjavax.net.ssl.SSLContextSpi- Parameters:
km- - array of KeyManager objectstm- - array of TrustManager objectssr- - 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.IllegalStateExceptionCreates a new wolfJSSE SSLSocketFactory.- Specified by:
engineGetSocketFactoryin classjavax.net.ssl.SSLContextSpi- Throws:
java.lang.IllegalStateException- if SSLContext has not been initialized
-
engineGetServerSocketFactory
protected javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory() throws java.lang.IllegalStateExceptionCreates a new wolfJSSE SSLServerSocketFactory.- Specified by:
engineGetServerSocketFactoryin classjavax.net.ssl.SSLContextSpi- Throws:
java.lang.IllegalStateException- if SSLContext has not been initialized
-
engineCreateSSLEngine
protected javax.net.ssl.SSLEngine engineCreateSSLEngine() throws java.lang.IllegalStateExceptionCreates a new wolfJSSE SSLEngine.- Specified by:
engineCreateSSLEnginein classjavax.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.IllegalStateExceptionCreates a new SSLEngine, using peer information as hints.- Specified by:
engineCreateSSLEnginein classjavax.net.ssl.SSLContextSpi- Parameters:
host- - name of the peer hostport- - 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:
engineGetServerSessionContextin classjavax.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:
engineGetClientSessionContextin classjavax.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:
engineGetDefaultSSLParametersin classjavax.net.ssl.SSLContextSpi
-
engineGetSupportedSSLParameters
protected javax.net.ssl.SSLParameters engineGetSupportedSSLParameters()
Returns copy of SSLParameters with max supported settings for this SSLContext.- Overrides:
engineGetSupportedSSLParametersin classjavax.net.ssl.SSLContextSpi
-
getInternalAuthStore
protected WolfSSLAuthStore getInternalAuthStore()
-
getInternalSSLParams
protected com.wolfssl.provider.jsse.WolfSSLParameters getInternalSSLParams()
-
getInternalWolfSSLContext
protected WolfSSLContext getInternalWolfSSLContext()
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
getProtocolsMask
public java.lang.String[] getProtocolsMask(long noOpt)
-
-