Home / Function/ testWrapAfterCloseOutbound() — netty Function Reference

testWrapAfterCloseOutbound() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  99ba8b15_4f6c_e29c_c402_d945e9d65fec["testWrapAfterCloseOutbound()"]
  9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b
  bf19737b_7dc7_9dfd_0a67_ae31448ebbe8["protocols()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| bf19737b_7dc7_9dfd_0a67_ae31448ebbe8
  e3b541e6_b593_4b1f_a637_da19020e73df["ciphers()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| e3b541e6_b593_4b1f_a637_da19020e73df
  7380f50e_d3f0_3078_ee65_de1cb780c79d["handshake()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| 7380f50e_d3f0_3078_ee65_de1cb780c79d
  13aca077_a788_4333_9f8b_2b1437653846["delegate()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| 13aca077_a788_4333_9f8b_2b1437653846
  87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d["cleanupClientSslEngine()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| 87e8e20d_ffbe_f5c3_4fd0_7d8ac419206d
  78ad5fe5_58d2_9877_f633_22a7048c0e5e["cleanupServerSslEngine()"]
  99ba8b15_4f6c_e29c_c402_d945e9d65fec -->|calls| 78ad5fe5_58d2_9877_f633_22a7048c0e5e
  style 99ba8b15_4f6c_e29c_c402_d945e9d65fec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 2702–2746

    @MethodSource("newTestParams")
    @ParameterizedTest
    public void testWrapAfterCloseOutbound(SSLEngineTestParam param) throws Exception {
        SelfSignedCertificate cert = CachedSelfSignedCertificate.getCachedCertificate();

        clientSslCtx = wrapContext(param, SslContextBuilder
                .forClient()
                .trustManager(cert.cert())
                .sslProvider(sslClientProvider())
                .sslContextProvider(clientSslContextProvider())
                .protocols(param.protocols())
                .ciphers(param.ciphers())
                .endpointIdentificationAlgorithm(null)
                .build());
        SSLEngine client = wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));

        serverSslCtx = wrapContext(param, SslContextBuilder
                .forServer(cert.certificate(), cert.privateKey())
                .sslProvider(sslServerProvider())
                .sslContextProvider(serverSslContextProvider())
                .protocols(param.protocols())
                .ciphers(param.ciphers())
                .build());
        SSLEngine server = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));

        try {
            ByteBuffer dst = allocateBuffer(param.type(), client.getSession().getPacketBufferSize());
            ByteBuffer src = allocateBuffer(param.type(), 1024);

            handshake(param.type(), param.delegate(), client, server);

            // This will produce a close_notify
            client.closeOutbound();
            SSLEngineResult result = client.wrap(src, dst);
            assertEquals(SSLEngineResult.Status.CLOSED, result.getStatus());
            assertEquals(0, result.bytesConsumed());
            assertTrue(result.bytesProduced() > 0);

            assertTrue(client.isOutboundDone());
            assertFalse(client.isInboundDone());
        } finally {
            cleanupClientSslEngine(client);
            cleanupServerSslEngine(server);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testWrapAfterCloseOutbound() do?
testWrapAfterCloseOutbound() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is testWrapAfterCloseOutbound() defined?
testWrapAfterCloseOutbound() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 2702.
What does testWrapAfterCloseOutbound() call?
testWrapAfterCloseOutbound() calls 6 function(s): ciphers, 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