testConnectMutualAuthFailsIfClientNotSendCertificate() — netty Function Reference
Architecture documentation for the testConnectMutualAuthFailsIfClientNotSendCertificate() function in QuicChannelConnectTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 20eb8163_1fbd_998f_f387_7624a4432818["testConnectMutualAuthFailsIfClientNotSendCertificate()"] 1e1bc485_1969_4537_ef9b_f28971b2f663["QuicChannelConnectTest"] 20eb8163_1fbd_998f_f387_7624a4432818 -->|defined in| 1e1bc485_1969_4537_ef9b_f28971b2f663 c6ec3ec0_2d6d_3639_c4e3_86428a4b30c8["exceptionCaught()"] 20eb8163_1fbd_998f_f387_7624a4432818 -->|calls| c6ec3ec0_2d6d_3639_c4e3_86428a4b30c8 style 20eb8163_1fbd_998f_f387_7624a4432818 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java lines 1354–1407
@ParameterizedTest
@MethodSource("newSslTaskExecutors")
public void testConnectMutualAuthFailsIfClientNotSendCertificate(Executor executor) throws Throwable {
CountDownLatch latch = new CountDownLatch(1);
AtomicReference<Throwable> causeRef = new AtomicReference<>();
Channel server = QuicTestUtils.newServer(QuicTestUtils.newQuicServerBuilder(executor,
QuicSslContextBuilder.forServer(
QuicTestUtils.SELF_SIGNED_CERTIFICATE.privateKey(), null,
QuicTestUtils.SELF_SIGNED_CERTIFICATE.certificate())
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.applicationProtocols(QuicTestUtils.PROTOS).clientAuth(ClientAuth.REQUIRE).build()),
TestQuicTokenHandler.INSTANCE, new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
causeRef.compareAndSet(null, cause);
latch.countDown();
ctx.close();
}
},
new ChannelInboundHandlerAdapter());
InetSocketAddress address = (InetSocketAddress) server.localAddress();
Channel channel = QuicTestUtils.newClient(QuicTestUtils.newQuicClientBuilder(executor,
QuicSslContextBuilder.forClient()
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.applicationProtocols(QuicTestUtils.PROTOS).build()));
QuicChannel client = null;
try {
client = QuicTestUtils.newQuicChannelBootstrap(channel)
.handler(new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
}
})
.streamHandler(new ChannelInboundHandlerAdapter())
.remoteAddress(address)
.connect()
.get();
latch.await();
assertInstanceOf(SSLHandshakeException.class, causeRef.get());
} finally {
server.close().sync();
if (client != null) {
client.close().sync();
}
// Close the parent Datagram channel as well.
channel.close().sync();
shutdown(executor);
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testConnectMutualAuthFailsIfClientNotSendCertificate() do?
testConnectMutualAuthFailsIfClientNotSendCertificate() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java.
Where is testConnectMutualAuthFailsIfClientNotSendCertificate() defined?
testConnectMutualAuthFailsIfClientNotSendCertificate() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java at line 1354.
What does testConnectMutualAuthFailsIfClientNotSendCertificate() call?
testConnectMutualAuthFailsIfClientNotSendCertificate() calls 1 function(s): exceptionCaught.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free