testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() — netty Function Reference
Architecture documentation for the testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() function in JdkSslEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c55723e6_5df7_a049_e74b_079461ee59be["testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure()"] 30adda7f_4d88_ce9b_59a8_bf86122e30b1["JdkSslEngineTest"] c55723e6_5df7_a049_e74b_079461ee59be -->|defined in| 30adda7f_4d88_ce9b_59a8_bf86122e30b1 7ddbbfb7_9cf0_fbf2_5331_ca975ad81b0b["TestDelegatingSslContext()"] c55723e6_5df7_a049_e74b_079461ee59be -->|calls| 7ddbbfb7_9cf0_fbf2_5331_ca975ad81b0b style c55723e6_5df7_a049_e74b_079461ee59be fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/JdkSslEngineTest.java lines 179–226
@MethodSource("newJdkParams")
@ParameterizedTest
public void testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure(JdkSSLEngineTestParam param)
throws Exception {
try {
param.providerType.activate(this);
// ALPN
SelfSignedCertificate ssc = CachedSelfSignedCertificate.getCachedCertificate();
JdkApplicationProtocolNegotiator clientApn = new JdkAlpnApplicationProtocolNegotiator(true, true,
PREFERRED_APPLICATION_LEVEL_PROTOCOL);
JdkApplicationProtocolNegotiator serverApn = new JdkAlpnApplicationProtocolNegotiator(
new ProtocolSelectorFactory() {
@Override
public ProtocolSelector newSelector(SSLEngine engine, Set<String> supportedProtocols) {
return new ProtocolSelector() {
@Override
public void unsupported() {
}
@Override
public String select(List<String> protocols) {
return APPLICATION_LEVEL_PROTOCOL_NOT_COMPATIBLE;
}
};
}
}, JdkBaseApplicationProtocolNegotiator.FAIL_SELECTION_LISTENER_FACTORY,
APPLICATION_LEVEL_PROTOCOL_NOT_COMPATIBLE);
SslContext serverSslCtx = new JdkSslServerContext(param.providerType.provider(),
ssc.certificate(), ssc.privateKey(), null, null,
IdentityCipherSuiteFilter.INSTANCE, serverApn, 0, 0, null);
SslContext clientSslCtx = new JdkSslClientContext(param.providerType.provider(), null,
InsecureTrustManagerFactory.INSTANCE, null,
IdentityCipherSuiteFilter.INSTANCE, clientApn, 0, 0);
setupHandlers(param.type(), param.delegate(), new TestDelegatingSslContext(param, serverSslCtx),
new TestDelegatingSslContext(param, clientSslCtx));
assertTrue(clientLatch.await(2, TimeUnit.SECONDS));
// When using TLSv1.3 the handshake is NOT sent in an extra round trip which means there will be
// no exception reported in this case but just the channel will be closed.
assertTrue(clientException instanceof SSLHandshakeException || clientException == null);
} catch (SkipTestException e) {
// ALPN availability is dependent on the java version. If ALPN is not available because of
// java version incompatibility don't fail the test, but instead just skip the test
throw new TestAbortedException("Not expected", e);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() do?
testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/JdkSslEngineTest.java.
Where is testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() defined?
testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() is defined in handler/src/test/java/io/netty/handler/ssl/JdkSslEngineTest.java at line 179.
What does testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() call?
testTlsExtensionNoCompatibleProtocolsClientHandshakeFailure() calls 1 function(s): TestDelegatingSslContext.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free