Home / Function/ testServerContextWithCombinedCertAndKeyInPem() — netty Function Reference

testServerContextWithCombinedCertAndKeyInPem() — netty Function Reference

Architecture documentation for the testServerContextWithCombinedCertAndKeyInPem() function in SslContextBuilderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7142a933_9713_5974_012b_118cb2c0e421["testServerContextWithCombinedCertAndKeyInPem()"]
  a1363dc7_e5a9_fb44_bb34_1e17132005fa["SslContextBuilderTest"]
  7142a933_9713_5974_012b_118cb2c0e421 -->|defined in| a1363dc7_e5a9_fb44_bb34_1e17132005fa
  d0ed29b7_73bf_882c_30c4_6622260ba467["testCombinedPemFileClientContextJdk()"]
  d0ed29b7_73bf_882c_30c4_6622260ba467 -->|calls| 7142a933_9713_5974_012b_118cb2c0e421
  d1c1b43f_6702_ade0_6433_89ff3e3e04ff["testCombinedPemFileClientContextOpenssl()"]
  d1c1b43f_6702_ade0_6433_89ff3e3e04ff -->|calls| 7142a933_9713_5974_012b_118cb2c0e421
  style 7142a933_9713_5974_012b_118cb2c0e421 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SslContextBuilderTest.java lines 190–224

    private void testServerContextWithCombinedCertAndKeyInPem(SslProvider provider) throws SSLException {
        String pem = "-----BEGIN CERTIFICATE-----\n" +
                     "MIIB1jCCAX0CCQDq4PSOirh7MDAJBgcqhkjOPQQBMHIxCzAJBgNVBAYTAlVTMQsw\n" +
                     "CQYDVQQIDAJDQTEMMAoGA1UEBwwDRm9vMQwwCgYDVQQKDANCYXIxDDAKBgNVBAsM\n" +
                     "A0JhejEQMA4GA1UEAwwHQmFyLmNvbTEaMBgGCSqGSIb3DQEJARYLZm9vQGJhci5j\n" +
                     "b20wHhcNMjIxMDAyMTYzODAyWhcNMjIxMjAxMTYzODAyWjB2MQswCQYDVQQGEwJV\n" +
                     "UzELMAkGA1UECAwCQ0ExDDAKBgNVBAcMA0ZvbzEMMAoGA1UECgwDQmFyMQwwCgYD\n" +
                     "VQQLDANiYXoxFDASBgNVBAMMC2Jhci5iYXIuYmF6MRowGAYJKoZIhvcNAQkBFgtm\n" +
                     "b29AYmFyLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHiEmjPEqQbqXYMB\n" +
                     "nAPOv24rJf6MhTwHB0QC1suZ9q9XFUkalnqGryqf/emHs81RsXWKz4sCsbIJkmHz\n" +
                     "H8HYhmkwCQYHKoZIzj0EAQNIADBFAiBCgzxZ5qviemPdejt2WazSgwNJTbirzoQa\n" +
                     "FMv2XFTTCwIhANS3fZ8BulbYkdRWVEFwm2FGotqLfC60JA/gg/brlWSP\n" +
                     "-----END CERTIFICATE-----\n" +
                     "-----BEGIN EC PRIVATE KEY-----\n" +
                     "MHcCAQEEIF8RlaD0JX8u2Lryq1+AbYfDaTBPJnPSA8+N2L12YuuUoAoGCCqGSM49\n" +
                     "AwEHoUQDQgAEeISaM8SpBupdgwGcA86/bisl/oyFPAcHRALWy5n2r1cVSRqWeoav\n" +
                     "Kp/96YezzVGxdYrPiwKxsgmSYfMfwdiGaQ==\n" +
                     "-----END EC PRIVATE KEY-----";

        ByteArrayInputStream certStream = new ByteArrayInputStream(pem.getBytes(CharsetUtil.US_ASCII));
        ByteArrayInputStream keyStream = new ByteArrayInputStream(pem.getBytes(CharsetUtil.US_ASCII));

        SslContext context = SslContextBuilder.forServer(certStream, keyStream, null)
                                              .sslProvider(provider)
                                              .clientAuth(ClientAuth.OPTIONAL)
                                              .build();

        SSLEngine engine = context.newEngine(UnpooledByteBufAllocator.DEFAULT);
        assertTrue(engine.getWantClientAuth());
        assertFalse(engine.getNeedClientAuth());
        engine.closeInbound();
        engine.closeOutbound();
        ReferenceCountUtil.release(engine);
        ReferenceCountUtil.release(context);
    }

Domain

Subdomains

Frequently Asked Questions

What does testServerContextWithCombinedCertAndKeyInPem() do?
testServerContextWithCombinedCertAndKeyInPem() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SslContextBuilderTest.java.
Where is testServerContextWithCombinedCertAndKeyInPem() defined?
testServerContextWithCombinedCertAndKeyInPem() is defined in handler/src/test/java/io/netty/handler/ssl/SslContextBuilderTest.java at line 190.
What calls testServerContextWithCombinedCertAndKeyInPem()?
testServerContextWithCombinedCertAndKeyInPem() is called by 2 function(s): testCombinedPemFileClientContextJdk, testCombinedPemFileClientContextOpenssl.

Analyze Your Own Codebase

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

Try Supermodel Free