Home / Function/ testInvalidCipher() — netty Function Reference

testInvalidCipher() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  155056b2_36c6_5cd6_3c72_7f44298f0258["testInvalidCipher()"]
  9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"]
  155056b2_36c6_5cd6_3c72_7f44298f0258 -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b
  e3b541e6_b593_4b1f_a637_da19020e73df["ciphers()"]
  155056b2_36c6_5cd6_3c72_7f44298f0258 -->|calls| e3b541e6_b593_4b1f_a637_da19020e73df
  78ad5fe5_58d2_9877_f633_22a7048c0e5e["cleanupServerSslEngine()"]
  155056b2_36c6_5cd6_3c72_7f44298f0258 -->|calls| 78ad5fe5_58d2_9877_f633_22a7048c0e5e
  style 155056b2_36c6_5cd6_3c72_7f44298f0258 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 3176–3195

    @Test
    public void testInvalidCipher() throws Exception {
        SelfSignedCertificate cert = CachedSelfSignedCertificate.getCachedCertificate();
        List<String> cipherList = new ArrayList<String>();
        Collections.addAll(cipherList, ((SSLSocketFactory) SSLSocketFactory.getDefault()).getDefaultCipherSuites());
        cipherList.add("InvalidCipher");
        SSLEngine server = null;
        try {
            serverSslCtx = wrapContext(null, SslContextBuilder.forServer(cert.key(), cert.cert())
                    .sslContextProvider(serverSslContextProvider())
                    .sslProvider(sslServerProvider())
                    .ciphers(cipherList).build());
            server = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
            fail();
        } catch (IllegalArgumentException | SSLException expected) {
            // expected when invalid cipher is used.
        } finally {
            cleanupServerSslEngine(server);
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free