Home / Function/ testCachedO2JMapping() — netty Function Reference

testCachedO2JMapping() — netty Function Reference

Architecture documentation for the testCachedO2JMapping() function in CipherSuiteConverterTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  77d7f84a_a6d8_47da_4559_ee76a159d337["testCachedO2JMapping()"]
  7ce8d800_ffe2_0866_86fb_3bd0ed5edb8e["CipherSuiteConverterTest"]
  77d7f84a_a6d8_47da_4559_ee76a159d337 -->|defined in| 7ce8d800_ffe2_0866_86fb_3bd0ed5edb8e
  4f97d3da_defe_224f_05ce_9fbcbe186c16["testCachedO2JMappings()"]
  4f97d3da_defe_224f_05ce_9fbcbe186c16 -->|calls| 77d7f84a_a6d8_47da_4559_ee76a159d337
  style 77d7f84a_a6d8_47da_4559_ee76a159d337 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/CipherSuiteConverterTest.java lines 358–385

    private static void testCachedO2JMapping(String javaCipherSuite, String openSslCipherSuite) {
        CipherSuiteConverter.clearCache();

        final String tlsExpected = "TLS_" + javaCipherSuite;
        final String sslExpected = "SSL_" + javaCipherSuite;

        final String tlsActual1 = CipherSuiteConverter.toJava(openSslCipherSuite, "TLS");
        final String sslActual1 = CipherSuiteConverter.toJava(openSslCipherSuite, "SSL");
        assertEquals(tlsExpected, tlsActual1);
        assertEquals(sslExpected, sslActual1);

        // Ensure that the cache entries have been created.
        assertTrue(CipherSuiteConverter.isO2JCached(openSslCipherSuite, "", javaCipherSuite));
        assertTrue(CipherSuiteConverter.isO2JCached(openSslCipherSuite, "SSL", sslExpected));
        assertTrue(CipherSuiteConverter.isO2JCached(openSslCipherSuite, "TLS", tlsExpected));
        assertTrue(CipherSuiteConverter.isJ2OCached(tlsExpected, openSslCipherSuite));
        assertTrue(CipherSuiteConverter.isJ2OCached(sslExpected, openSslCipherSuite));

        final String tlsActual2 = CipherSuiteConverter.toJava(openSslCipherSuite, "TLS");
        final String sslActual2 = CipherSuiteConverter.toJava(openSslCipherSuite, "SSL");
        assertEquals(tlsExpected, tlsActual2);
        assertEquals(sslExpected, sslActual2);

        // Test if the returned cipher strings are identical,
        // so that the TLS sessions with the same cipher suite do not create many strings.
        assertSame(tlsActual1, tlsActual2);
        assertSame(sslActual1, sslActual2);
    }

Domain

Subdomains

Frequently Asked Questions

What does testCachedO2JMapping() do?
testCachedO2JMapping() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/CipherSuiteConverterTest.java.
Where is testCachedO2JMapping() defined?
testCachedO2JMapping() is defined in handler/src/test/java/io/netty/handler/ssl/CipherSuiteConverterTest.java at line 358.
What calls testCachedO2JMapping()?
testCachedO2JMapping() is called by 1 function(s): testCachedO2JMappings.

Analyze Your Own Codebase

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

Try Supermodel Free