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.SSLContextSpi
wolfSSL implementation of SSLContextSpi- Author:
- wolfSSL
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WolfSSLContext.DEFAULT_Context
static class
WolfSSLContext.TLSV1_Context
static class
WolfSSLContext.TLSV11_Context
static class
WolfSSLContext.TLSV12_Context
static class
WolfSSLContext.TLSV13_Context
static class
WolfSSLContext.TLSV23_Context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.net.ssl.SSLEngine
engineCreateSSLEngine()
Creates a new wolfJSSE SSLEngine.protected javax.net.ssl.SSLEngine
engineCreateSSLEngine(java.lang.String host, int port)
Creates a new SSLEngine, using peer information as hints.protected javax.net.ssl.SSLSessionContext
engineGetClientSessionContext()
Returns the SSLClientSessionContext associated with this SSLContext.protected javax.net.ssl.SSLParameters
engineGetDefaultSSLParameters()
Returns copy of SSLParameters with default settings for this SSLContext.protected javax.net.ssl.SSLSessionContext
engineGetServerSessionContext()
Returns the SSLServerSessionContext associated with this SSLContext.protected javax.net.ssl.SSLServerSocketFactory
engineGetServerSocketFactory()
Creates a new wolfJSSE SSLServerSocketFactory.protected javax.net.ssl.SSLSocketFactory
engineGetSocketFactory()
Creates a new wolfJSSE SSLSocketFactory.protected javax.net.ssl.SSLParameters
engineGetSupportedSSLParameters()
Returns copy of SSLParameters with max supported settings for this SSLContext.protected void
engineInit(javax.net.ssl.KeyManager[] km, javax.net.ssl.TrustManager[] tm, java.security.SecureRandom sr)
Initializes a SSLContext.protected void
finalize()
protected WolfSSLAuthStore
getInternalAuthStore()
protected com.wolfssl.provider.jsse.WolfSSLParameters
getInternalSSLParams()
protected WolfSSLContext
getInternalWolfSSLContext()
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.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 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.IllegalStateException
Creates a new wolfJSSE SSLSocketFactory.- Specified by:
engineGetSocketFactory
in classjavax.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 classjavax.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 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.IllegalStateException
Creates a new SSLEngine, using peer information as hints.- Specified by:
engineCreateSSLEngine
in 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:
engineGetServerSessionContext
in 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:
engineGetClientSessionContext
in 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:
engineGetDefaultSSLParameters
in classjavax.net.ssl.SSLContextSpi
-
engineGetSupportedSSLParameters
protected javax.net.ssl.SSLParameters engineGetSupportedSSLParameters()
Returns copy of SSLParameters with max supported settings for this SSLContext.- Overrides:
engineGetSupportedSSLParameters
in 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:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
getProtocolsMask
public java.lang.String[] getProtocolsMask(long noOpt)
-
-