QuicSslContextBuilder Class — netty Architecture
Architecture documentation for the QuicSslContextBuilder class in QuicSslContextBuilder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1087cb9e_52a4_1f04_ddf7_62704a6402f2["QuicSslContextBuilder"] 9580adb2_171a_faf0_257b_2b870ab8dc8d["QuicSslContextBuilder.java"] 1087cb9e_52a4_1f04_ddf7_62704a6402f2 -->|defined in| 9580adb2_171a_faf0_257b_2b870ab8dc8d c07d1829_af7e_0517_e6d7_29a40d9330d8["QuicSslContextBuilder()"] 1087cb9e_52a4_1f04_ddf7_62704a6402f2 -->|method| c07d1829_af7e_0517_e6d7_29a40d9330d8 e5efc082_eff8_8f89_eccc_f43b071f396a["QuicSslContext()"] 1087cb9e_52a4_1f04_ddf7_62704a6402f2 -->|method| e5efc082_eff8_8f89_eccc_f43b071f396a 814fdaa1_b18f_c0e0_49e9_34e09fb915ba["toArray()"] 1087cb9e_52a4_1f04_ddf7_62704a6402f2 -->|method| 814fdaa1_b18f_c0e0_49e9_34e09fb915ba
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicSslContextBuilder.java lines 48–418
public final class QuicSslContextBuilder {
/**
* Special {@link X509ExtendedKeyManager} implementation which will just fail the certificate selection.
* This is used as a "dummy" implementation when SNI is used as we should always select an other
* {@link QuicSslContext} based on the provided hostname.
*/
private static final X509ExtendedKeyManager SNI_KEYMANAGER = new X509ExtendedKeyManager() {
private final X509Certificate[] emptyCerts = new X509Certificate[0];
private final String[] emptyStrings = new String[0];
@Override
public String[] getClientAliases(String keyType, Principal[] issuers) {
return emptyStrings;
}
@Override
@Nullable
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) {
return null;
}
@Override
public String[] getServerAliases(String keyType, Principal[] issuers) {
return emptyStrings;
}
@Override
@Nullable
public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
return null;
}
@Override
public X509Certificate[] getCertificateChain(String alias) {
return emptyCerts;
}
@Override
@Nullable
public PrivateKey getPrivateKey(String alias) {
return null;
}
};
/**
* Creates a builder for new client-side {@link QuicSslContext} that can be used for {@code QUIC}.
*/
public static QuicSslContextBuilder forClient() {
return new QuicSslContextBuilder(false);
}
/**
* Creates a builder for new server-side {@link QuicSslContext} that can be used for {@code QUIC}.
*
* @param keyFile a PKCS#8 private key file in PEM format
* @param keyPassword the password of the {@code keyFile}, or {@code null} if it's not
* password-protected
* @param certChainFile an X.509 certificate chain file in PEM format
* @see #keyManager(File, String, File)
*/
public static QuicSslContextBuilder forServer(
File keyFile, @Nullable String keyPassword, File certChainFile) {
return new QuicSslContextBuilder(true).keyManager(keyFile, keyPassword, certChainFile);
}
/**
* Creates a builder for new server-side {@link QuicSslContext} that can be used for {@code QUIC}.
*
* @param key a PKCS#8 private key
* @param keyPassword the password of the {@code keyFile}, or {@code null} if it's not
* password-protected
* @param certChain the X.509 certificate chain
* @see #keyManager(File, String, File)
*/
public static QuicSslContextBuilder forServer(
PrivateKey key, @Nullable String keyPassword, X509Certificate... certChain) {
return new QuicSslContextBuilder(true).keyManager(key, keyPassword, certChain);
}
/**
Source
Frequently Asked Questions
What is the QuicSslContextBuilder class?
QuicSslContextBuilder is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicSslContextBuilder.java.
Where is QuicSslContextBuilder defined?
QuicSslContextBuilder is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicSslContextBuilder.java at line 48.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free