Home / Function/ testWrapWithDifferentSizes() — netty Function Reference

testWrapWithDifferentSizes() — netty Function Reference

Architecture documentation for the testWrapWithDifferentSizes() function in OpenSslEngineTest.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 4

Entity Profile

Dependency Diagram

graph TD
  f490308d_2252_4fa8_afe5_54785f847646["testWrapWithDifferentSizes()"]
  08957e63_66e1_e2b4_c8aa_4f617c598a7d["OpenSslEngineTest"]
  f490308d_2252_4fa8_afe5_54785f847646 -->|defined in| 08957e63_66e1_e2b4_c8aa_4f617c598a7d
  62e5e26f_663f_6c7b_00b6_8df2dd7edf89["testWrapWithDifferentSizesTLSv1()"]
  62e5e26f_663f_6c7b_00b6_8df2dd7edf89 -->|calls| f490308d_2252_4fa8_afe5_54785f847646
  c1c5a90c_711b_0253_477e_5b809d9375fd["testWrapWithDifferentSizesTLSv1_1()"]
  c1c5a90c_711b_0253_477e_5b809d9375fd -->|calls| f490308d_2252_4fa8_afe5_54785f847646
  a8abc709_6115_6c40_d693_cd7eb9f6cd42["testWrapWithDifferentSizesTLSv1_2()"]
  a8abc709_6115_6c40_d693_cd7eb9f6cd42 -->|calls| f490308d_2252_4fa8_afe5_54785f847646
  efa9b513_80b0_24e9_57cb_1ae2b4baf9c8["testWrapWithDifferentSizesSSLv3()"]
  efa9b513_80b0_24e9_57cb_1ae2b4baf9c8 -->|calls| f490308d_2252_4fa8_afe5_54785f847646
  f0c375a1_7f71_e0df_4d82_f2ef91df8771["testWrapDstBigEnough()"]
  f490308d_2252_4fa8_afe5_54785f847646 -->|calls| f0c375a1_7f71_e0df_4d82_f2ef91df8771
  style f490308d_2252_4fa8_afe5_54785f847646 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java lines 1035–1072

    private void testWrapWithDifferentSizes(SSLEngineTestParam param, String protocol, String cipher) throws Exception {
        assumeTrue(OpenSsl.isProtocolSupported(protocol));
        if (!OpenSsl.isCipherSuiteAvailable(cipher)) {
            return;
        }

        SSLEngine clientEngine = null;
        SSLEngine serverEngine = null;
        try {
            clientEngine = wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
            serverEngine = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
            clientEngine.setEnabledCipherSuites(new String[] { cipher });
            clientEngine.setEnabledProtocols(new String[] { protocol });
            serverEngine.setEnabledCipherSuites(new String[] { cipher });
            serverEngine.setEnabledProtocols(new String[] { protocol });

            try {
                handshake(param.type(), param.delegate(), clientEngine, serverEngine);
            } catch (SSLException e) {
                if (e.getMessage().contains("unsupported protocol") ||
                        e.getMessage().contains("no protocols available")) {
                    throw new TestAbortedException(protocol + " not supported with cipher " + cipher, e);
                }
                throw e;
            }

            int srcLen = 64;
            do {
                testWrapDstBigEnough(param.type(), clientEngine, srcLen);
                srcLen += 64;
            } while (srcLen < MAX_PLAINTEXT_LENGTH);

            testWrapDstBigEnough(param.type(), clientEngine, MAX_PLAINTEXT_LENGTH);
        } finally {
            cleanupClientSslEngine(clientEngine);
            cleanupServerSslEngine(serverEngine);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testWrapWithDifferentSizes() do?
testWrapWithDifferentSizes() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java.
Where is testWrapWithDifferentSizes() defined?
testWrapWithDifferentSizes() is defined in handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java at line 1035.
What does testWrapWithDifferentSizes() call?
testWrapWithDifferentSizes() calls 1 function(s): testWrapDstBigEnough.
What calls testWrapWithDifferentSizes()?
testWrapWithDifferentSizes() is called by 4 function(s): testWrapWithDifferentSizesSSLv3, testWrapWithDifferentSizesTLSv1, testWrapWithDifferentSizesTLSv1_1, testWrapWithDifferentSizesTLSv1_2.

Analyze Your Own Codebase

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

Try Supermodel Free