Home / Function/ testSetSupportedCiphers() — netty Function Reference

testSetSupportedCiphers() — netty Function Reference

Architecture documentation for the testSetSupportedCiphers() function in SSLEngineTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e537ede1_7ab4_ad80_00a6_7027c25cf295["testSetSupportedCiphers()"]
  9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"]
  e537ede1_7ab4_ad80_00a6_7027c25cf295 -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b
  bf19737b_7dc7_9dfd_0a67_ae31448ebbe8["protocols()"]
  e537ede1_7ab4_ad80_00a6_7027c25cf295 -->|calls| bf19737b_7dc7_9dfd_0a67_ae31448ebbe8
  e3b541e6_b593_4b1f_a637_da19020e73df["ciphers()"]
  e537ede1_7ab4_ad80_00a6_7027c25cf295 -->|calls| e3b541e6_b593_4b1f_a637_da19020e73df
  87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d["cleanupClientSslEngine()"]
  e537ede1_7ab4_ad80_00a6_7027c25cf295 -->|calls| 87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d
  78ad5fe5_58d2_9877_f633_22a7048c0e5e["cleanupServerSslEngine()"]
  e537ede1_7ab4_ad80_00a6_7027c25cf295 -->|calls| 78ad5fe5_58d2_9877_f633_22a7048c0e5e
  style e537ede1_7ab4_ad80_00a6_7027c25cf295 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 572–605

    @MethodSource("newTestParams")
    @ParameterizedTest
    public void testSetSupportedCiphers(SSLEngineTestParam param) throws Exception {
        if (param.protocolCipherCombo != ProtocolCipherCombo.tlsv12()) {
            return;
        }
        SelfSignedCertificate cert = CachedSelfSignedCertificate.getCachedCertificate();
        serverSslCtx = wrapContext(param, SslContextBuilder.forServer(cert.key(), cert.cert())
            .protocols(param.protocols())
            .ciphers(param.ciphers())
            .sslProvider(sslServerProvider()).build());
        final SSLEngine serverEngine =
            wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
        clientSslCtx = wrapContext(param, SslContextBuilder.forClient()
            .trustManager(cert.certificate())
            .protocols(param.protocols())
            .ciphers(param.ciphers())
            .sslProvider(sslClientProvider()).build());
        final SSLEngine clientEngine =
            wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));

        final String[] enabledCiphers = new String[]{ param.ciphers().get(0) };

        try {
            clientEngine.setEnabledCipherSuites(enabledCiphers);
            serverEngine.setEnabledCipherSuites(enabledCiphers);

            assertArrayEquals(enabledCiphers, clientEngine.getEnabledCipherSuites());
            assertArrayEquals(enabledCiphers, serverEngine.getEnabledCipherSuites());
        } finally {
            cleanupClientSslEngine(clientEngine);
            cleanupServerSslEngine(serverEngine);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testSetSupportedCiphers() do?
testSetSupportedCiphers() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is testSetSupportedCiphers() defined?
testSetSupportedCiphers() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 572.
What does testSetSupportedCiphers() call?
testSetSupportedCiphers() calls 4 function(s): ciphers, cleanupClientSslEngine, cleanupServerSslEngine, protocols.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free