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,
@Nullable 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,
@Nullable 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,
@Nullable java.lang.String keyPassword)
|
static QuicSslContextBuilder |
forServer(java.security.PrivateKey key,
@Nullable 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(@Nullable BoringSSLKeylog keylog)
Enable / disable keylog.
|
QuicSslContextBuilder |
keyManager(@Nullable java.io.File keyFile,
@Nullable java.lang.String keyPassword,
@Nullable java.io.File keyCertChainFile)
Identifying certificate for this host.
|
QuicSslContextBuilder |
keyManager(@Nullable javax.net.ssl.KeyManagerFactory keyManagerFactory,
@Nullable java.lang.String keyPassword)
Identifying manager for this host.
|
QuicSslContextBuilder |
keyManager(javax.net.ssl.KeyManager keyManager,
@Nullable java.lang.String password)
A single key manager managing the identity information of this host.
|
QuicSslContextBuilder |
keyManager(@Nullable java.security.PrivateKey key,
@Nullable java.lang.String keyPassword,
java.security.cert.X509Certificate... certChain)
Identifying certificate for this host.
|
<T> QuicSslContextBuilder |
option(io.netty.handler.ssl.SslContextOption<T> option,
T value)
Configure a
SslContextOption. |
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(@Nullable 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(@Nullable 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, @Nullable @Nullable 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, @Nullable @Nullable 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, @Nullable @Nullable 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, @Nullable @Nullable 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 <T> QuicSslContextBuilder option(io.netty.handler.ssl.SslContextOption<T> option, T value)
SslContextOption.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(@Nullable @Nullable 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(@Nullable @Nullable 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(@Nullable @Nullable 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(@Nullable @Nullable java.io.File keyFile, @Nullable @Nullable java.lang.String keyPassword, @Nullable @Nullable 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(@Nullable @Nullable java.security.PrivateKey key, @Nullable @Nullable 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(@Nullable @Nullable javax.net.ssl.KeyManagerFactory keyManagerFactory, @Nullable @Nullable java.lang.String keyPassword)
keyManagerFactory may be null for
client contexts, which disables mutual authentication.public QuicSslContextBuilder keyManager(javax.net.ssl.KeyManager keyManager, @Nullable @Nullable 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-2025 The Netty Project. All Rights Reserved.