Package com.wolfssl.provider.jsse
Class WolfSSLEngine
- java.lang.Object
-
- javax.net.ssl.SSLEngine
-
- com.wolfssl.provider.jsse.WolfSSLEngine
-
public class WolfSSLEngine extends javax.net.ssl.SSLEnginewolfSSL implementation of SSLEngine- Author:
- wolfSSL
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWolfSSLEngine(WolfSSLContext ctx, WolfSSLAuthStore auth, com.wolfssl.provider.jsse.WolfSSLParameters params)Create a new engine with no hints for session reuseprotectedWolfSSLEngine(WolfSSLContext ctx, WolfSSLAuthStore auth, com.wolfssl.provider.jsse.WolfSSLParameters params, java.lang.String host, int port)Create a new engine with hints for session reuse
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginHandshake()voidcloseInbound()voidcloseOutbound()java.lang.RunnablegetDelegatedTask()java.lang.String[]getEnabledCipherSuites()java.lang.String[]getEnabledProtocols()booleangetEnableSessionCreation()javax.net.ssl.SSLEngineResult.HandshakeStatusgetHandshakeStatus()booleangetNeedClientAuth()javax.net.ssl.SSLSessiongetSession()java.lang.String[]getSupportedCipherSuites()java.lang.String[]getSupportedProtocols()booleangetUseClientMode()booleangetWantClientAuth()booleanisInboundDone()booleanisOutboundDone()voidsetEnabledCipherSuites(java.lang.String[] suites)voidsetEnabledProtocols(java.lang.String[] protocols)voidsetEnableSessionCreation(boolean flag)protected intsetIn(byte[] toRead, int sz)voidsetNeedClientAuth(boolean need)protected intsetOut(byte[] in, int sz)voidsetSSLParameters(javax.net.ssl.SSLParameters params)Set the SSLParameters for this SSLSocket.voidsetUseClientMode(boolean mode)voidsetWantClientAuth(boolean want)javax.net.ssl.SSLEngineResultunwrap(java.nio.ByteBuffer in, java.nio.ByteBuffer out)javax.net.ssl.SSLEngineResultunwrap(java.nio.ByteBuffer in, java.nio.ByteBuffer[] out, int ofst, int length)javax.net.ssl.SSLEngineResultwrap(java.nio.ByteBuffer[] in, int ofst, int len, java.nio.ByteBuffer out)javax.net.ssl.SSLEngineResultwrap(java.nio.ByteBuffer in, java.nio.ByteBuffer out)
-
-
-
Constructor Detail
-
WolfSSLEngine
protected WolfSSLEngine(WolfSSLContext ctx, WolfSSLAuthStore auth, com.wolfssl.provider.jsse.WolfSSLParameters params) throws WolfSSLException
Create a new engine with no hints for session reuse- Parameters:
ctx- JNI level WolfSSLContextauth- WolfSSLAuthStore to useparams- connection parameters to be used- Throws:
WolfSSLException- if there is an issue creating the engine
-
WolfSSLEngine
protected WolfSSLEngine(WolfSSLContext ctx, WolfSSLAuthStore auth, com.wolfssl.provider.jsse.WolfSSLParameters params, java.lang.String host, int port) throws WolfSSLException
Create a new engine with hints for session reuse- Parameters:
ctx- JNI level WolfSSLContextauth- WolfSSLAuthStore to useparams- connection parameters to be usedhost- to connect toport- to connect to- Throws:
WolfSSLException- if there is an issue creating the engine
-
-
Method Detail
-
wrap
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer in, java.nio.ByteBuffer out) throws javax.net.ssl.SSLException- Overrides:
wrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
wrap
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] in, int ofst, int len, java.nio.ByteBuffer out) throws javax.net.ssl.SSLException- Specified by:
wrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
unwrap
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer in, java.nio.ByteBuffer out) throws javax.net.ssl.SSLException- Overrides:
unwrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
unwrap
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer in, java.nio.ByteBuffer[] out, int ofst, int length) throws javax.net.ssl.SSLException- Specified by:
unwrapin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
getDelegatedTask
public java.lang.Runnable getDelegatedTask()
- Specified by:
getDelegatedTaskin classjavax.net.ssl.SSLEngine
-
closeInbound
public void closeInbound() throws javax.net.ssl.SSLException- Specified by:
closeInboundin classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
isInboundDone
public boolean isInboundDone()
- Specified by:
isInboundDonein classjavax.net.ssl.SSLEngine
-
closeOutbound
public void closeOutbound()
- Specified by:
closeOutboundin classjavax.net.ssl.SSLEngine
-
isOutboundDone
public boolean isOutboundDone()
- Specified by:
isOutboundDonein classjavax.net.ssl.SSLEngine
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLEngine
-
getEnabledCipherSuites
public java.lang.String[] getEnabledCipherSuites()
- Specified by:
getEnabledCipherSuitesin classjavax.net.ssl.SSLEngine
-
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] suites)
- Specified by:
setEnabledCipherSuitesin classjavax.net.ssl.SSLEngine
-
getSupportedProtocols
public java.lang.String[] getSupportedProtocols()
- Specified by:
getSupportedProtocolsin classjavax.net.ssl.SSLEngine
-
getEnabledProtocols
public java.lang.String[] getEnabledProtocols()
- Specified by:
getEnabledProtocolsin classjavax.net.ssl.SSLEngine
-
setEnabledProtocols
public void setEnabledProtocols(java.lang.String[] protocols)
- Specified by:
setEnabledProtocolsin classjavax.net.ssl.SSLEngine
-
getSession
public javax.net.ssl.SSLSession getSession()
- Specified by:
getSessionin classjavax.net.ssl.SSLEngine
-
beginHandshake
public void beginHandshake() throws javax.net.ssl.SSLException- Specified by:
beginHandshakein classjavax.net.ssl.SSLEngine- Throws:
javax.net.ssl.SSLException
-
getHandshakeStatus
public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
- Specified by:
getHandshakeStatusin classjavax.net.ssl.SSLEngine
-
setUseClientMode
public void setUseClientMode(boolean mode)
- Specified by:
setUseClientModein classjavax.net.ssl.SSLEngine
-
getUseClientMode
public boolean getUseClientMode()
- Specified by:
getUseClientModein classjavax.net.ssl.SSLEngine
-
setNeedClientAuth
public void setNeedClientAuth(boolean need)
- Specified by:
setNeedClientAuthin classjavax.net.ssl.SSLEngine
-
getNeedClientAuth
public boolean getNeedClientAuth()
- Specified by:
getNeedClientAuthin classjavax.net.ssl.SSLEngine
-
setWantClientAuth
public void setWantClientAuth(boolean want)
- Specified by:
setWantClientAuthin classjavax.net.ssl.SSLEngine
-
getWantClientAuth
public boolean getWantClientAuth()
- Specified by:
getWantClientAuthin classjavax.net.ssl.SSLEngine
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag)
- Specified by:
setEnableSessionCreationin classjavax.net.ssl.SSLEngine
-
getEnableSessionCreation
public boolean getEnableSessionCreation()
- Specified by:
getEnableSessionCreationin classjavax.net.ssl.SSLEngine
-
setSSLParameters
public void setSSLParameters(javax.net.ssl.SSLParameters params)
Set the SSLParameters for this SSLSocket.- Overrides:
setSSLParametersin classjavax.net.ssl.SSLEngine- Parameters:
params- SSLParameters to set for this SSLSocket object
-
setOut
protected int setOut(byte[] in, int sz)
-
setIn
protected int setIn(byte[] toRead, int sz)
-
-