testIncompatibleCiphers() — netty Function Reference
Architecture documentation for the testIncompatibleCiphers() function in SSLEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 207c9557_d4be_64b2_a88f_1251635bc36e["testIncompatibleCiphers()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b bf19737b_7dc7_9dfd_0a67_ae31448ebbe8["protocols()"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|calls| bf19737b_7dc7_9dfd_0a67_ae31448ebbe8 7380f50e_d3f0_3078_ee65_de1cb780c79d["handshake()"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|calls| 7380f50e_d3f0_3078_ee65_de1cb780c79d 13aca077_a788_4333_9f8b_2b1437653846["delegate()"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|calls| 13aca077_a788_4333_9f8b_2b1437653846 87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d["cleanupClientSslEngine()"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|calls| 87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d 78ad5fe5_58d2_9877_f633_22a7048c0e5e["cleanupServerSslEngine()"] 207c9557_d4be_64b2_a88f_1251635bc36e -->|calls| 78ad5fe5_58d2_9877_f633_22a7048c0e5e style 207c9557_d4be_64b2_a88f_1251635bc36e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 607–654
@MethodSource("newTestParams")
@ParameterizedTest
public void testIncompatibleCiphers(final SSLEngineTestParam param) throws Exception {
assumeTrue(SslProvider.isTlsv13Supported(sslClientProvider()));
assumeTrue(SslProvider.isTlsv13Supported(sslServerProvider()));
SelfSignedCertificate ssc = CachedSelfSignedCertificate.getCachedCertificate();
// Select a mandatory cipher from the TLSv1.2 RFC https://www.ietf.org/rfc/rfc5246.txt so handshakes won't fail
// due to no shared/supported cipher.
clientSslCtx = wrapContext(param, SslContextBuilder.forClient()
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.protocols(SslProtocols.TLS_v1_3, SslProtocols.TLS_v1_2, SslProtocols.TLS_v1)
.sslContextProvider(clientSslContextProvider())
.sslProvider(sslClientProvider())
.build());
serverSslCtx = wrapContext(param, SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey())
.protocols(SslProtocols.TLS_v1_3, SslProtocols.TLS_v1_2, SslProtocols.TLS_v1)
.sslContextProvider(serverSslContextProvider())
.sslProvider(sslServerProvider())
.build());
SSLEngine clientEngine = null;
SSLEngine serverEngine = null;
try {
clientEngine = wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
serverEngine = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
// Set the server to only support a single TLSv1.2 cipher
final String serverCipher = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
serverEngine.setEnabledCipherSuites(new String[] { serverCipher });
// Set the client to only support a single TLSv1.3 cipher
final String clientCipher = "TLS_AES_256_GCM_SHA384";
clientEngine.setEnabledCipherSuites(new String[] { clientCipher });
final SSLEngine client = clientEngine;
final SSLEngine server = serverEngine;
assertThrows(SSLHandshakeException.class, new Executable() {
@Override
public void execute() throws Throwable {
handshake(param.type(), param.delegate(), client, server);
}
});
} finally {
cleanupClientSslEngine(clientEngine);
cleanupServerSslEngine(serverEngine);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testIncompatibleCiphers() do?
testIncompatibleCiphers() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is testIncompatibleCiphers() defined?
testIncompatibleCiphers() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 607.
What does testIncompatibleCiphers() call?
testIncompatibleCiphers() calls 5 function(s): cleanupClientSslEngine, cleanupServerSslEngine, delegate, handshake, protocols.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free