Class NativeSslContext
java.lang.Object
one.nio.net.SslContext
one.nio.net.NativeSslContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class(package private) static classprivate classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate static final AtomicInteger(package private) long(package private) final int(package private) NativeSslContext[]Fields inherited from class SslContext
currentConfig, VERIFY_NONE, VERIFY_ONCE, VERIFY_PEER, VERIFY_REQUIRE_PEER_CERT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclearOptions(long options) voidclose()private NativeSslContext[]createSubcontexts(SslConfig[] sni) private static voidctxFree(long ctx) private static longctxNew()booleangetDebug()private longgetSessionCounter(int key) private long[]getSessionCounters(int keysBitmap) private static voidinit()voidsetAntiReplayEnabled(boolean antiReplayEnabled) voidsetApplicationProtocols(String[] protocols) private voidsetApplicationProtocols0(byte[] protocols) voidprivate voidsetCacheMode(int mode) voidsetCertificate(String certFile) voidsetCiphers(String ciphers) voidsetCompressionAlgorithms(String[] compressionAlgorithms) private voidsetCompressionAlgorithms0(int[] algorithms) voidSets the curve used for ECDH temporary keys used during key exchange.voidsetDebug(boolean debug) private voidsetInternalCacheSize(int size) voidsetKernelTlsEnabled(boolean kernelTlsEnabled) voidsetKeylog(boolean keylog) voidsetMaxEarlyData(int size) voidsetOCSP(byte[] response) private voidsetOptions(long options) voidsetPassphrase(byte[] passphrase) voidsetPrivateKey(String privateKeyFile) voidsetProtocols(String protocols) voidsetRdrand(boolean rdrand) voidsetSessionCache(String mode, int size) voidsetSessionId(byte[] sessionId) voidprivate voidsetSNI0(byte[] names, long[] contexts) private voidsetSubcontexts(NativeSslContext[] newSubcontexts) voidsetTicketKeys(byte[] keys) voidsetTimeout(long timeout) voidsetVerify(int verifyMode) Methods inherited from class SslContext
configure, create, getDefault, refresh, updateCertificates, updateOCSP, updateTicketKeys
-
Field Details
-
counter
-
ALL_DISABLED
private static final long ALL_DISABLED -
id
final int id -
ctx
long ctx -
subcontexts
NativeSslContext[] subcontexts
-
-
Constructor Details
-
NativeSslContext
NativeSslContext() throws SSLException- Throws:
SSLException
-
-
Method Details
-
close
public void close()- Overrides:
closein classSslContext
-
setSubcontexts
-
createSubcontexts
- Throws:
IOException
-
setDebug
public void setDebug(boolean debug) - Specified by:
setDebugin classSslContext
-
getDebug
public boolean getDebug()- Specified by:
getDebugin classSslContext
-
setProtocols
- Specified by:
setProtocolsin classSslContext
-
setKernelTlsEnabled
- Specified by:
setKernelTlsEnabledin classSslContext- Throws:
SSLException
-
setAntiReplayEnabled
- Specified by:
setAntiReplayEnabledin classSslContext- Throws:
SSLException
-
setSessionCache
- Specified by:
setSessionCachein classSslContext- Throws:
SSLException
-
setRdrand
- Specified by:
setRdrandin classSslContext- Throws:
SSLException
-
setCiphers
- Specified by:
setCiphersin classSslContext- Throws:
SSLException
-
setCurve
Sets the curve used for ECDH temporary keys used during key exchange. Useopenssl ecparam -list_curvesto get list of supported curves.- Specified by:
setCurvein classSslContext- Parameters:
curve- short name of the curve, if null - all curves built into the OpenSSL library will be allowed- Throws:
SSLException
-
setCertificate
- Specified by:
setCertificatein classSslContext- Throws:
SSLException
-
setPrivateKey
- Specified by:
setPrivateKeyin classSslContext- Throws:
SSLException
-
setPassphrase
- Specified by:
setPassphrasein classSslContext- Throws:
SSLException
-
setCA
- Specified by:
setCAin classSslContext- Throws:
SSLException
-
setVerify
- Specified by:
setVerifyin classSslContext- Throws:
SSLException
-
setTicketKeys
- Specified by:
setTicketKeysin classSslContext- Throws:
SSLException
-
setTimeout
- Specified by:
setTimeoutin classSslContext- Throws:
SSLException
-
setSessionId
- Specified by:
setSessionIdin classSslContext- Throws:
SSLException
-
setOCSP
- Specified by:
setOCSPin classSslContext- Throws:
SSLException
-
setMaxEarlyData
- Specified by:
setMaxEarlyDatain classSslContext- Throws:
SSLException
-
setApplicationProtocols
- Specified by:
setApplicationProtocolsin classSslContext- Throws:
SSLException
-
setApplicationProtocols0
- Throws:
SSLException
-
setSNI
- Specified by:
setSNIin classSslContext- Throws:
IOException
-
setCompressionAlgorithms
- Specified by:
setCompressionAlgorithmsin classSslContext- Throws:
SSLException
-
setCompressionAlgorithms0
- Throws:
SSLException
-
setSNI0
- Throws:
SSLException
-
setKeylog
public void setKeylog(boolean keylog) - Specified by:
setKeylogin classSslContext
-
setOptions
private void setOptions(long options) -
clearOptions
private void clearOptions(long options) -
getSessionCounter
private long getSessionCounter(int key) -
getSessionCounters
private long[] getSessionCounters(int keysBitmap) -
setInternalCacheSize
- Throws:
SSLException
-
setCacheMode
- Throws:
SSLException
-
init
private static void init() -
ctxNew
- Throws:
SSLException
-
ctxFree
private static void ctxFree(long ctx)
-