Package one.nio.net
Class JavaSslClientContext
- java.lang.Object
-
- one.nio.net.SslContext
-
- one.nio.net.JavaSslClientContext
-
public class JavaSslClientContext extends SslContext
-
-
Field Summary
Fields Modifier and Type Field Description private javax.net.ssl.SSLParametersparametersprivate javax.net.ssl.SSLContextsslContext-
Fields inherited from class one.nio.net.SslContext
currentConfig, VERIFY_NONE, VERIFY_ONCE, VERIFY_PEER, VERIFY_REQUIRE_PEER_CERT
-
-
Constructor Summary
Constructors Constructor Description JavaSslClientContext()JavaSslClientContext(javax.net.ssl.SSLContext sslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.net.ssl.SSLSocketcreateSocket()booleangetDebug()voidsetAntiReplayEnabled(boolean antiReplayEnabled)voidsetApplicationProtocols(java.lang.String[] protocols)voidsetCA(java.lang.String caFile)voidsetCertificate(java.lang.String certFile)voidsetCiphers(java.lang.String ciphers)voidsetCompressionAlgorithms(java.lang.String[] algorithms)voidsetCurve(java.lang.String curve)voidsetDebug(boolean debug)voidsetKernelTlsEnabled(boolean kernelTlsEnabled)voidsetKeylog(boolean keylog)voidsetMaxEarlyData(int size)voidsetOCSP(byte[] response)voidsetPassphrase(byte[] passphrase)voidsetPrivateKey(java.lang.String privateKeyFile)voidsetProtocols(java.lang.String protocols)voidsetRdrand(boolean rdrand)voidsetSessionCache(java.lang.String mode, int size)voidsetSessionId(byte[] sessionId)voidsetSNI(SslConfig[] sni)voidsetTicketKeys(byte[] keys)voidsetTimeout(long timeout)voidsetVerify(int verifyMode)-
Methods inherited from class one.nio.net.SslContext
close, configure, create, getDefault, refresh, updateCertificates, updateOCSP, updateTicketKeys
-
-
-
-
Method Detail
-
setDebug
public void setDebug(boolean debug)
- Specified by:
setDebugin classSslContext
-
getDebug
public boolean getDebug()
- Specified by:
getDebugin classSslContext
-
setRdrand
public void setRdrand(boolean rdrand) throws javax.net.ssl.SSLException- Specified by:
setRdrandin classSslContext- Throws:
javax.net.ssl.SSLException
-
setProtocols
public void setProtocols(java.lang.String protocols) throws javax.net.ssl.SSLException- Specified by:
setProtocolsin classSslContext- Throws:
javax.net.ssl.SSLException
-
setCiphers
public void setCiphers(java.lang.String ciphers) throws javax.net.ssl.SSLException- Specified by:
setCiphersin classSslContext- Throws:
javax.net.ssl.SSLException
-
setCurve
public void setCurve(java.lang.String curve) throws javax.net.ssl.SSLException- Specified by:
setCurvein classSslContext- Throws:
javax.net.ssl.SSLException
-
setCertificate
public void setCertificate(java.lang.String certFile) throws javax.net.ssl.SSLException- Specified by:
setCertificatein classSslContext- Throws:
javax.net.ssl.SSLException
-
setPrivateKey
public void setPrivateKey(java.lang.String privateKeyFile) throws javax.net.ssl.SSLException- Specified by:
setPrivateKeyin classSslContext- Throws:
javax.net.ssl.SSLException
-
setPassphrase
public void setPassphrase(byte[] passphrase) throws javax.net.ssl.SSLException- Specified by:
setPassphrasein classSslContext- Throws:
javax.net.ssl.SSLException
-
setCA
public void setCA(java.lang.String caFile) throws javax.net.ssl.SSLException- Specified by:
setCAin classSslContext- Throws:
javax.net.ssl.SSLException
-
setVerify
public void setVerify(int verifyMode) throws javax.net.ssl.SSLException- Specified by:
setVerifyin classSslContext- Throws:
javax.net.ssl.SSLException
-
setTicketKeys
public void setTicketKeys(byte[] keys) throws javax.net.ssl.SSLException- Specified by:
setTicketKeysin classSslContext- Throws:
javax.net.ssl.SSLException
-
setSessionCache
public void setSessionCache(java.lang.String mode, int size) throws javax.net.ssl.SSLException- Specified by:
setSessionCachein classSslContext- Throws:
javax.net.ssl.SSLException
-
setTimeout
public void setTimeout(long timeout) throws javax.net.ssl.SSLException- Specified by:
setTimeoutin classSslContext- Throws:
javax.net.ssl.SSLException
-
setSessionId
public void setSessionId(byte[] sessionId) throws javax.net.ssl.SSLException- Specified by:
setSessionIdin classSslContext- Throws:
javax.net.ssl.SSLException
-
setApplicationProtocols
public void setApplicationProtocols(java.lang.String[] protocols) throws javax.net.ssl.SSLException- Specified by:
setApplicationProtocolsin classSslContext- Throws:
javax.net.ssl.SSLException
-
setOCSP
public void setOCSP(byte[] response) throws javax.net.ssl.SSLException- Specified by:
setOCSPin classSslContext- Throws:
javax.net.ssl.SSLException
-
setSNI
public void setSNI(SslConfig[] sni) throws java.io.IOException
- Specified by:
setSNIin classSslContext- Throws:
java.io.IOException
-
setMaxEarlyData
public void setMaxEarlyData(int size) throws javax.net.ssl.SSLException- Specified by:
setMaxEarlyDatain classSslContext- Throws:
javax.net.ssl.SSLException
-
setKernelTlsEnabled
public void setKernelTlsEnabled(boolean kernelTlsEnabled) throws javax.net.ssl.SSLException- Specified by:
setKernelTlsEnabledin classSslContext- Throws:
javax.net.ssl.SSLException
-
setCompressionAlgorithms
public void setCompressionAlgorithms(java.lang.String[] algorithms) throws javax.net.ssl.SSLException- Specified by:
setCompressionAlgorithmsin classSslContext- Throws:
javax.net.ssl.SSLException
-
setAntiReplayEnabled
public void setAntiReplayEnabled(boolean antiReplayEnabled) throws javax.net.ssl.SSLException- Specified by:
setAntiReplayEnabledin classSslContext- Throws:
javax.net.ssl.SSLException
-
setKeylog
public void setKeylog(boolean keylog)
- Specified by:
setKeylogin classSslContext
-
createSocket
public javax.net.ssl.SSLSocket createSocket() throws java.io.IOException- Throws:
java.io.IOException
-
-