Home / Function/ testBouncyCastleSSLEngineSupportsAlpn() — netty Function Reference

testBouncyCastleSSLEngineSupportsAlpn() — netty Function Reference

Architecture documentation for the testBouncyCastleSSLEngineSupportsAlpn() function in BouncyCastleEngineAlpnTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  38cae09b_a696_2076_7e02_b13f20988ca5["testBouncyCastleSSLEngineSupportsAlpn()"]
  d74f04a8_35fa_7877_d526_27327757d6b5["BouncyCastleEngineAlpnTest"]
  38cae09b_a696_2076_7e02_b13f20988ca5 -->|defined in| d74f04a8_35fa_7877_d526_27327757d6b5
  style 38cae09b_a696_2076_7e02_b13f20988ca5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/BouncyCastleEngineAlpnTest.java lines 32–54

    @Test
    public void testBouncyCastleSSLEngineSupportsAlpn() throws Exception {
        Provider bouncyCastleProvider = new BouncyCastleJsseProvider();
        SSLContext context = SslUtils.getSSLContext(bouncyCastleProvider, new SecureRandom());
        SSLEngine engine = context.createSSLEngine();
        assertTrue(BouncyCastleUtil.isBcJsseInUse(engine));
        assertTrue(BouncyCastleAlpnSslUtils.isAlpnSupported());

        BouncyCastleAlpnSslEngine alpnSslEngine = new BouncyCastleAlpnSslEngine(
                engine, new JdkAlpnApplicationProtocolNegotiator("fake"), true);

        // Call methods to ensure these not throw.
        alpnSslEngine.setHandshakeApplicationProtocolSelector(new BiFunction<SSLEngine, List<String>, String>() {
            @Override
            public String apply(SSLEngine sslEngine, List<String> strings) {
                return "fake";
            }
        });
        // Check that none of the methods will throw.
        alpnSslEngine.getHandshakeApplicationProtocolSelector();
        alpnSslEngine.setNegotiatedApplicationProtocol("fake");
        alpnSslEngine.getNegotiatedApplicationProtocol();
    }

Domain

Subdomains

Frequently Asked Questions

What does testBouncyCastleSSLEngineSupportsAlpn() do?
testBouncyCastleSSLEngineSupportsAlpn() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/BouncyCastleEngineAlpnTest.java.
Where is testBouncyCastleSSLEngineSupportsAlpn() defined?
testBouncyCastleSSLEngineSupportsAlpn() is defined in handler/src/test/java/io/netty/handler/ssl/BouncyCastleEngineAlpnTest.java at line 32.

Analyze Your Own Codebase

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

Try Supermodel Free