Package com.wolfssl.provider.jsse
Class WolfSSLEngineHelper
- java.lang.Object
-
- com.wolfssl.provider.jsse.WolfSSLEngineHelper
-
public class WolfSSLEngineHelper extends java.lang.Object
This is a helper function to account for similar methods between SSLSocket and SSLEngine. This class wraps a new WOLFSSL object that is created. All methods are protected or private because this class should only be used internally.- Author:
- wolfSSL
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WolfSSLEngineHelper.WolfSSLInternalVerifyCb
-
Constructor Summary
Constructors Modifier Constructor Description protected
WolfSSLEngineHelper(WolfSSLSession ssl, WolfSSLAuthStore store, com.wolfssl.provider.jsse.WolfSSLParameters params)
Always creates a new sessionprotected
WolfSSLEngineHelper(WolfSSLSession ssl, WolfSSLAuthStore store, com.wolfssl.provider.jsse.WolfSSLParameters params, int port, java.lang.String hostname)
Allows for new session and resume session by default
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
doHandshake(int isSSLEngine)
protected java.lang.String[]
getAllCiphers()
protected java.lang.String[]
getAllProtocols()
protected byte[]
getAlpnSelectedProtocol()
protected java.lang.String[]
getCiphers()
protected boolean
getEnableSessionCreation()
protected boolean
getNeedClientAuth()
protected java.lang.String[]
getProtocols()
protected WolfSSLImplementSSLSession
getSession()
protected boolean
getUseClientMode()
protected boolean
getWantClientAuth()
protected WolfSSLSession
getWolfSSLSession()
protected void
initHandshake()
protected void
saveSession()
Saves session on connection close for resumptionprotected void
setAlpnProtocols(byte[] alpnProtos)
protected void
setCiphers(java.lang.String[] suites)
protected void
setEnableSessionCreation(boolean flag)
protected void
setHostAndPort(java.lang.String hostname, int port)
protected void
setNeedClientAuth(boolean need)
protected void
setProtocols(java.lang.String[] p)
protected void
setUseClientMode(boolean mode)
protected void
setUseSessionTickets(boolean flag)
protected void
setWantClientAuth(boolean want)
-
-
-
Constructor Detail
-
WolfSSLEngineHelper
protected WolfSSLEngineHelper(WolfSSLSession ssl, WolfSSLAuthStore store, com.wolfssl.provider.jsse.WolfSSLParameters params) throws WolfSSLException
Always creates a new session- Parameters:
ssl
- WOLFSSL sessionstore
- main auth store holding session tables and managersparams
- default parameters to use on connection- Throws:
WolfSSLException
- if an exception happens during session creation
-
WolfSSLEngineHelper
protected WolfSSLEngineHelper(WolfSSLSession ssl, WolfSSLAuthStore store, com.wolfssl.provider.jsse.WolfSSLParameters params, int port, java.lang.String hostname) throws WolfSSLException
Allows for new session and resume session by default- Parameters:
ssl
- WOLFSSL sessionstore
- main auth store holding session tables and managersparams
- default parameters to use on connectionport
- port number as hint for resumehostname
- hostname as hint for resume and for default SNI- Throws:
WolfSSLException
- if an exception happens during session resume
-
-
Method Detail
-
setHostAndPort
protected void setHostAndPort(java.lang.String hostname, int port)
-
getWolfSSLSession
protected WolfSSLSession getWolfSSLSession()
-
getSession
protected WolfSSLImplementSSLSession getSession()
-
getAllCiphers
protected java.lang.String[] getAllCiphers()
-
getCiphers
protected java.lang.String[] getCiphers()
-
setCiphers
protected void setCiphers(java.lang.String[] suites) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
setProtocols
protected void setProtocols(java.lang.String[] p) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
getProtocols
protected java.lang.String[] getProtocols()
-
getAllProtocols
protected java.lang.String[] getAllProtocols()
-
setUseClientMode
protected void setUseClientMode(boolean mode) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
getUseClientMode
protected boolean getUseClientMode()
-
setNeedClientAuth
protected void setNeedClientAuth(boolean need)
-
getNeedClientAuth
protected boolean getNeedClientAuth()
-
setWantClientAuth
protected void setWantClientAuth(boolean want)
-
getWantClientAuth
protected boolean getWantClientAuth()
-
setEnableSessionCreation
protected void setEnableSessionCreation(boolean flag)
-
getEnableSessionCreation
protected boolean getEnableSessionCreation()
-
setUseSessionTickets
protected void setUseSessionTickets(boolean flag)
-
setAlpnProtocols
protected void setAlpnProtocols(byte[] alpnProtos)
-
getAlpnSelectedProtocol
protected byte[] getAlpnSelectedProtocol()
-
initHandshake
protected void initHandshake() throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
doHandshake
protected int doHandshake(int isSSLEngine) throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
saveSession
protected void saveSession()
Saves session on connection close for resumption
-
-