Home / Function/ testSessionLocalWhenNonMutual() — netty Function Reference

testSessionLocalWhenNonMutual() — netty Function Reference

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

Function java Buffer Allocators calls 6 called by 2

Entity Profile

Dependency Diagram

graph TD
  15ec69d3_5c34_c6f7_bb59_048b544478e4["testSessionLocalWhenNonMutual()"]
  9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b
  4709fe96_45e1_bf34_f824_05159686c3bc["testSessionLocalWhenNonMutualWithKeyManager()"]
  4709fe96_45e1_bf34_f824_05159686c3bc -->|calls| 15ec69d3_5c34_c6f7_bb59_048b544478e4
  88f4d332_6388_0039_7abd_afc27d24dfce["testSessionLocalWhenNonMutualWithoutKeyManager()"]
  88f4d332_6388_0039_7abd_afc27d24dfce -->|calls| 15ec69d3_5c34_c6f7_bb59_048b544478e4
  bf19737b_7dc7_9dfd_0a67_ae31448ebbe8["protocols()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| bf19737b_7dc7_9dfd_0a67_ae31448ebbe8
  e3b541e6_b593_4b1f_a637_da19020e73df["ciphers()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| e3b541e6_b593_4b1f_a637_da19020e73df
  7380f50e_d3f0_3078_ee65_de1cb780c79d["handshake()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| 7380f50e_d3f0_3078_ee65_de1cb780c79d
  13aca077_a788_4333_9f8b_2b1437653846["delegate()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| 13aca077_a788_4333_9f8b_2b1437653846
  87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d["cleanupClientSslEngine()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| 87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d
  78ad5fe5_58d2_9877_f633_22a7048c0e5e["cleanupServerSslEngine()"]
  15ec69d3_5c34_c6f7_bb59_048b544478e4 -->|calls| 78ad5fe5_58d2_9877_f633_22a7048c0e5e
  style 15ec69d3_5c34_c6f7_bb59_048b544478e4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 4421–4470

    private void testSessionLocalWhenNonMutual(SSLEngineTestParam param, boolean useKeyManager) throws Exception {
        final SelfSignedCertificate ssc = CachedSelfSignedCertificate.getCachedCertificate();

        SslContextBuilder clientSslCtxBuilder = SslContextBuilder.forClient()
                .trustManager(InsecureTrustManagerFactory.INSTANCE)
                .sslProvider(sslClientProvider())
                .sslContextProvider(clientSslContextProvider())
                .protocols(param.protocols())
                .ciphers(param.ciphers());

        if (useKeyManager) {
            clientSslCtxBuilder.keyManager(newKeyManagerFactory(ssc));
        } else {
            clientSslCtxBuilder.keyManager(ssc.certificate(), ssc.privateKey());
        }
        clientSslCtx = wrapContext(param, clientSslCtxBuilder.build());

        final SslContextBuilder serverSslCtxBuilder;
        if (useKeyManager) {
            serverSslCtxBuilder = SslContextBuilder.forServer(newKeyManagerFactory(ssc));
        } else {
            serverSslCtxBuilder = SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey());
        }
        serverSslCtxBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE)
                .sslProvider(sslServerProvider())
                .sslContextProvider(serverSslContextProvider())
                .protocols(param.protocols())
                .ciphers(param.ciphers())
                .clientAuth(ClientAuth.NONE);

        serverSslCtx = wrapContext(param, serverSslCtxBuilder.build());
        SSLEngine clientEngine = null;
        SSLEngine serverEngine = null;
        try {
            clientEngine = wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
            serverEngine = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
            handshake(param.type(), param.delegate(), clientEngine, serverEngine);

            SSLSession clientSession = clientEngine.getSession();
            assertNull(clientSession.getLocalCertificates());
            assertNull(clientSession.getLocalPrincipal());

            SSLSession serverSession = serverEngine.getSession();
            assertNotNull(serverSession.getLocalCertificates());
            assertNotNull(serverSession.getLocalPrincipal());
        } finally {
            cleanupClientSslEngine(clientEngine);
            cleanupServerSslEngine(serverEngine);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testSessionLocalWhenNonMutual() do?
testSessionLocalWhenNonMutual() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is testSessionLocalWhenNonMutual() defined?
testSessionLocalWhenNonMutual() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 4421.
What does testSessionLocalWhenNonMutual() call?
testSessionLocalWhenNonMutual() calls 6 function(s): ciphers, cleanupClientSslEngine, cleanupServerSslEngine, delegate, handshake, protocols.
What calls testSessionLocalWhenNonMutual()?
testSessionLocalWhenNonMutual() is called by 2 function(s): testSessionLocalWhenNonMutualWithKeyManager, testSessionLocalWhenNonMutualWithoutKeyManager.

Analyze Your Own Codebase

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

Try Supermodel Free