public final class QuicSslContextBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
QuicSslContextBuilder |
applicationProtocols(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 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(File keyFile,
@Nullable String keyPassword,
File certChainFile)
Creates a builder for new server-side
QuicSslContext that can be used for QUIC. |
static QuicSslContextBuilder |
forServer(KeyManagerFactory keyManagerFactory,
@Nullable String password)
Creates a builder for new server-side
QuicSslContext that can be used for QUIC. |
static QuicSslContextBuilder |
forServer(KeyManager keyManager,
@Nullable String keyPassword)
|
static QuicSslContextBuilder |
forServer(PrivateKey key,
@Nullable String keyPassword,
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 File keyFile,
@Nullable String keyPassword,
@Nullable File keyCertChainFile)
Identifying certificate for this host.
|
QuicSslContextBuilder |
keyManager(@Nullable KeyManagerFactory keyManagerFactory,
@Nullable String keyPassword)
Identifying manager for this host.
|
QuicSslContextBuilder |
keyManager(KeyManager keyManager,
@Nullable String password)
A single key manager managing the identity information of this host.
|
QuicSslContextBuilder |
keyManager(@Nullable PrivateKey key,
@Nullable String keyPassword,
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 File trustCertCollectionFile)
Trusted certificates for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(TrustManager trustManager)
A single trusted manager for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(@Nullable TrustManagerFactory trustManagerFactory)
Trusted manager for verifying the remote endpoint's certificate.
|
QuicSslContextBuilder |
trustManager(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(File keyFile, @Nullable @Nullable String keyPassword, 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(PrivateKey key, @Nullable @Nullable String keyPassword, 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(KeyManagerFactory keyManagerFactory, @Nullable @Nullable String password)
QuicSslContext that can be used for QUIC.keyManagerFactory - non-null factory for server's private keykeyManager(KeyManagerFactory, String)public static QuicSslContextBuilder forServer(KeyManager keyManager, @Nullable @Nullable 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 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 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(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 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(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 File keyFile, @Nullable @Nullable String keyPassword, @Nullable @Nullable 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 PrivateKey key, @Nullable @Nullable String keyPassword, 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 KeyManagerFactory keyManagerFactory, @Nullable @Nullable String keyPassword)
keyManagerFactory may be null for
client contexts, which disables mutual authentication.public QuicSslContextBuilder keyManager(KeyManager keyManager, @Nullable @Nullable 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(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.