SSLEngineTest Class — netty Architecture
Architecture documentation for the SSLEngineTest class in SSLEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"] 859a13fc_5d1f_4d06_dca1_2d4d0f57be71["SSLEngineTest.java"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|defined in| 859a13fc_5d1f_4d06_dca1_2d4d0f57be71 c09bb50b_bad3_ee22_4647_597894106020["SSLEngineTest()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| c09bb50b_bad3_ee22_4647_597894106020 cf5c3a3a_0a4c_570a_ef20_20a5b8ddb928["newTestParams()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| cf5c3a3a_0a4c_570a_ef20_20a5b8ddb928 b58c9767_2d12_dbd9_a6f6_7aee249aaec0["ByteBuffer()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| b58c9767_2d12_dbd9_a6f6_7aee249aaec0 c34c65e7_33dc_03ea_db6f_656e433ab29a["setup()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| c34c65e7_33dc_03ea_db6f_656e433ab29a c12eff1d_7dc1_df4d_6045_c955d85f1898["tearDown()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| c12eff1d_7dc1_df4d_6045_c955d85f1898 2587fcb1_5272_58f1_e161_d7033988b378["testMutualAuthSameCerts()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| 2587fcb1_5272_58f1_e161_d7033988b378 e537ede1_7ab4_ad80_00a6_7027c25cf295["testSetSupportedCiphers()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| e537ede1_7ab4_ad80_00a6_7027c25cf295 207c9557_d4be_64b2_a88f_1251635bc36e["testIncompatibleCiphers()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| 207c9557_d4be_64b2_a88f_1251635bc36e 79cdfde3_c775_c5bb_dcf0_64fd87794eb2["testMutualAuthDiffCerts()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| 79cdfde3_c775_c5bb_dcf0_64fd87794eb2 39ca8798_0aae_92d1_eb0e_cd8e3cc99dc7["testMutualAuthDiffCertsServerFailure()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| 39ca8798_0aae_92d1_eb0e_cd8e3cc99dc7 5bcad504_a3d6_42d5_1a18_775b3a515dd1["testMutualAuthDiffCertsClientFailure()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| 5bcad504_a3d6_42d5_1a18_775b3a515dd1 e098500b_00f6_ce1e_5313_5ad08992833a["testMutualAuthInvalidIntermediateCASucceedWithOptionalClientAuth()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| e098500b_00f6_ce1e_5313_5ad08992833a b802aa7e_0090_1612_20f1_6a3cbfcc69e9["testMutualAuthInvalidIntermediateCAFailWithOptionalClientAuth()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b -->|method| b802aa7e_0090_1612_20f1_6a3cbfcc69e9
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 149–5034
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public abstract class SSLEngineTest {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(SSLEngineTest.class);
private static final String PRINCIPAL_NAME = "CN=e8ac02fa0d65a84219016045db8b05c485b4ecdf.netty.test";
private static final Runnable NOOP = new Runnable() {
@Override
public void run() { }
};
private final boolean tlsv13Supported;
protected MessageReceiver serverReceiver;
protected MessageReceiver clientReceiver;
protected volatile Throwable serverException;
protected volatile Throwable clientException;
protected SslContext serverSslCtx;
protected SslContext clientSslCtx;
protected ServerBootstrap sb;
protected Bootstrap cb;
protected Channel serverChannel;
protected Channel serverConnectedChannel;
protected Channel clientChannel;
protected CountDownLatch serverLatch;
protected CountDownLatch clientLatch;
protected volatile Future<Channel> serverSslHandshakeFuture;
protected volatile Future<Channel> clientSslHandshakeFuture;
static final class MessageReceiver {
final BlockingQueue<ByteBuf> messages = new LinkedBlockingQueue<ByteBuf>();
final BlockingQueue<OnNextMessage> onNextMessages = new LinkedBlockingQueue<OnNextMessage>();
void messageReceived(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {
messages.add(msg);
OnNextMessage onNextMessage = onNextMessages.poll();
if (onNextMessage != null) {
onNextMessage.messageReceived(ctx, msg);
}
}
}
interface OnNextMessage {
void messageReceived(ChannelHandlerContext ctx, ByteBuf msg) throws Exception;
}
protected static final class MessageDelegatorChannelHandler extends SimpleChannelInboundHandler<ByteBuf> {
private final MessageReceiver receiver;
private final CountDownLatch latch;
public MessageDelegatorChannelHandler(MessageReceiver receiver, CountDownLatch latch) {
super(false);
this.receiver = receiver;
this.latch = latch;
}
@Override
protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {
receiver.messageReceived(ctx, msg);
latch.countDown();
}
}
enum BufferType {
Direct,
Heap,
Mixed
}
static final class ProtocolCipherCombo {
private static final ProtocolCipherCombo TLSV12 = new ProtocolCipherCombo(
SslProtocols.TLS_v1_2, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
private static final ProtocolCipherCombo TLSV13 = new ProtocolCipherCombo(
SslProtocols.TLS_v1_3, "TLS_AES_128_GCM_SHA256");
final String protocol;
final String cipher;
private ProtocolCipherCombo(String protocol, String cipher) {
this.protocol = protocol;
this.cipher = cipher;
Source
Frequently Asked Questions
What is the SSLEngineTest class?
SSLEngineTest is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is SSLEngineTest defined?
SSLEngineTest is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 149.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free