Package com.wolfssl.provider.jsse
Class WolfSSLEngineHelper
- java.lang.Object
-
- com.wolfssl.provider.jsse.WolfSSLEngineHelper
-
public class WolfSSLEngineHelper extends java.lang.ObjectThis 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 classWolfSSLEngineHelper.WolfSSLInternalVerifyCb
-
Constructor Summary
Constructors Modifier Constructor Description protectedWolfSSLEngineHelper(WolfSSLSession ssl, WolfSSLAuthStore store, com.wolfssl.provider.jsse.WolfSSLParameters params)Always creates a new sessionprotectedWolfSSLEngineHelper(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 intdoHandshake(int isSSLEngine)protected java.lang.String[]getAllCiphers()protected java.lang.String[]getAllProtocols()protected byte[]getAlpnSelectedProtocol()protected java.lang.String[]getCiphers()protected booleangetEnableSessionCreation()protected booleangetNeedClientAuth()protected java.lang.String[]getProtocols()protected WolfSSLImplementSSLSessiongetSession()protected booleangetUseClientMode()protected booleangetWantClientAuth()protected WolfSSLSessiongetWolfSSLSession()protected voidinitHandshake()protected voidsaveSession()Saves session on connection close for resumptionprotected voidsetAlpnProtocols(byte[] alpnProtos)protected voidsetCiphers(java.lang.String[] suites)protected voidsetEnableSessionCreation(boolean flag)protected voidsetHostAndPort(java.lang.String hostname, int port)protected voidsetNeedClientAuth(boolean need)protected voidsetProtocols(java.lang.String[] p)protected voidsetUseClientMode(boolean mode)protected voidsetUseSessionTickets(boolean flag)protected voidsetWantClientAuth(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
-
-