public final class QuicSslContextBuilder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
QuicSslContextBuilder |
applicationProtocols(java.lang.String... applicationProtocols)
Application protocol negotiation configuration.
|
QuicSslContext |
build()
Create new
QuicSslContext instance with configured settings that can be used for QUIC. |
static QuicSslContext |
buildForServerWithSni(io.netty.util.Mapping<? super java.lang.String,? extends QuicSslContext> mapping)
Enables support for
SNI on the server side.
|
QuicSslContextBuilder |
clientAuth(io.netty.handler.ssl.ClientAuth clientAuth)
Sets the client authentication mode.
|
QuicSslContextBuilder |
earlyData(boolean enabled)
Enable / disable the usage of early data.
|
static QuicSslContextBuilder |
forClient()
Creates a builder for new client-side
QuicSslContext that can be used for QUIC. |
static QuicSslContextBuilder |
forServer(java.io.File keyFile,
java.lang.String keyPassword,
java.io.File certChainFile)
Creates a builder for new server-side
QuicSslContext that can be used for QUIC. |
static QuicSslContextBuilder |
forServer(javax.net.ssl.KeyManagerFactory keyManagerFactory,
java.lang.String password)
Creates a builder for new server-side
QuicSslContext that can be used for QUIC. |
static QuicSslContextBuilder |
forServer(javax.net.ssl.KeyManager keyManager,
java.lang.String keyPassword)
|
static QuicSslContextBuilder |
forServer(java.security.PrivateKey key,
java.lang.String keyPassword,
java.security.cert.X509Certificate... certChain)
Creates a builder for new server-side
QuicSslContext that can be used for QUIC. |
QuicSslContextBuilder |
keylog(boolean enabled)
Enable / disable keylog.
|
QuicSslContextBuilder |
keylog(BoringSSLKeylog keylog)
Enable / disable keylog.
|
QuicSslContextBuilder |
keyManager(java.io.File keyFile,
java.lang.String keyPassword,
java.io.File keyCertChainFile)
Identifying certificate for this host.
|
QuicSslContextBuilder |
keyManager(javax.net.ssl.KeyManagerFactory keyManagerFactory,
java.lang.String keyPassword)
Identifying manager for this host.
|
QuicSslContextBuilder |
keyManager(javax.net.ssl.KeyManager keyManager,
java.lang.String password)
A single key manager managing the identity information of this host.
|
QuicSslContextBuilder |
keyManager(java.security.PrivateKey key,
java.lang.String keyPassword,
java.security.cert.X509Certificate... certChain)
Identifying certificate for this host.
|
QuicSslContextBuilder |
sessionCacheSize(long sessionCacheSize)
Set the size of the cache used for storing SSL session objects.
|
QuicSslContextBuilder |
sessionTimeout(long sessionTimeout)
Set the timeout for the cached SSL session objects, in seconds.
|
QuicSslContextBuilder |
trustManager(java.io.File trustCertCollectionFile)
Trusted certificates for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(javax.net.ssl.TrustManager trustManager)
A single trusted manager for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(javax.net.ssl.TrustManagerFactory trustManagerFactory)
Trusted manager for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(java.security.cert.X509Certificate... trustCertCollection)
Trusted certificates for verifying the remote endpoint's certificate.
|
public static QuicSslContextBuilder forClient()
QuicSslContext that can be used for QUIC.public static QuicSslContextBuilder forServer(java.io.File keyFile, java.lang.String keyPassword, java.io.File certChainFile)
QuicSslContext that can be used for QUIC.keyFile - a PKCS#8 private key file in PEM formatkeyPassword - the password of the keyFile, or null if it's not
password-protectedcertChainFile - an X.509 certificate chain file in PEM formatkeyManager(File, String, File)public static QuicSslContextBuilder forServer(java.security.PrivateKey key, java.lang.String keyPassword, java.security.cert.X509Certificate... certChain)
QuicSslContext that can be used for QUIC.key - a PKCS#8 private keykeyPassword - the password of the keyFile, or null if it's not
password-protectedcertChain - the X.509 certificate chainkeyManager(File, String, File)public static QuicSslContextBuilder forServer(javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.String password)
QuicSslContext that can be used for QUIC.keyManagerFactory - non-null factory for server's private keykeyManager(KeyManagerFactory, String)public static QuicSslContextBuilder forServer(javax.net.ssl.KeyManager keyManager, java.lang.String keyPassword)
keyManager - non-null KeyManager for server's private keykeyPassword - the password of the keyFile, or null if it's not
password-protectedpublic static QuicSslContext buildForServerWithSni(io.netty.util.Mapping<? super java.lang.String,? extends QuicSslContext> mapping)
mapping - the Mapping that is used to map names to the QuicSslContext to use.
Usually using DomainWildcardMappingBuilder should be used
to create the Mapping.public QuicSslContextBuilder earlyData(boolean enabled)
public QuicSslContextBuilder keylog(boolean enabled)
BoringSSLKeylog for detail, logging keys are following
NSS Key Log Format. This is intended for debugging use with tools like Wireshark.public QuicSslContextBuilder keylog(BoringSSLKeylog keylog)
BoringSSLKeylog.logKey(SSLEngine, String)
logging keys are following
NSS Key Log Format. This is intended for debugging use with tools like Wireshark.public QuicSslContextBuilder trustManager(java.io.File trustCertCollectionFile)
null uses the system default
which only works with Java 8u261 and later as these versions support TLS1.3,
see
JDK 8u261 Update Release Notespublic QuicSslContextBuilder trustManager(java.security.cert.X509Certificate... trustCertCollection)
null uses the system default
which only works with Java 8u261 and later as these versions support TLS1.3,
see
JDK 8u261 Update Release Notespublic QuicSslContextBuilder trustManager(javax.net.ssl.TrustManagerFactory trustManagerFactory)
null uses the system default
which only works with Java 8u261 and later as these versions support TLS1.3,
see
JDK 8u261 Update Release Notespublic QuicSslContextBuilder trustManager(javax.net.ssl.TrustManager trustManager)
TrustManager is needed.
Internally, a simple wrapper of TrustManagerFactory that only produces this
specified TrustManager will be created, thus all the requirements specified in
trustManager(TrustManagerFactory trustManagerFactory) also apply here.public QuicSslContextBuilder keyManager(java.io.File keyFile, java.lang.String keyPassword, java.io.File keyCertChainFile)
keyCertChainFile and keyFile may
be null for client contexts, which disables mutual authentication.keyFile - a PKCS#8 private key file in PEM formatkeyPassword - the password of the keyFile, or null if it's not
password-protectedkeyCertChainFile - an X.509 certificate chain file in PEM formatpublic QuicSslContextBuilder keyManager(java.security.PrivateKey key, java.lang.String keyPassword, java.security.cert.X509Certificate... certChain)
keyCertChain and key may
be null for client contexts, which disables mutual authentication.key - a PKCS#8 private key filekeyPassword - the password of the key, or null if it's not
password-protectedcertChain - an X.509 certificate chainpublic QuicSslContextBuilder keyManager(javax.net.ssl.KeyManagerFactory keyManagerFactory, java.lang.String keyPassword)
keyManagerFactory may be null for
client contexts, which disables mutual authentication.public QuicSslContextBuilder keyManager(javax.net.ssl.KeyManager keyManager, java.lang.String password)
KeyManager is needed.
Internally, a wrapper of KeyManagerFactory that only produces this specified
KeyManager will be created, thus all the requirements specified in
keyManager(KeyManagerFactory, String) also apply here.public QuicSslContextBuilder applicationProtocols(java.lang.String... applicationProtocols)
null disables support.public QuicSslContextBuilder sessionCacheSize(long sessionCacheSize)
0 to use the
default value.public QuicSslContextBuilder sessionTimeout(long sessionTimeout)
0 to use the
default value.public QuicSslContextBuilder clientAuth(io.netty.handler.ssl.ClientAuth clientAuth)
public QuicSslContext build()
QuicSslContext instance with configured settings that can be used for QUIC.Copyright © 2020-2023 The Netty Project. All Rights Reserved.