testMaxCertificateListSmallLimitReject() — netty Function Reference
Architecture documentation for the testMaxCertificateListSmallLimitReject() function in OpenSslEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 471310d0_ff2c_4354_1848_bbb15bba50f9["testMaxCertificateListSmallLimitReject()"] 08957e63_66e1_e2b4_c8aa_4f617c598a7d["OpenSslEngineTest"] 471310d0_ff2c_4354_1848_bbb15bba50f9 -->|defined in| 08957e63_66e1_e2b4_c8aa_4f617c598a7d style 471310d0_ff2c_4354_1848_bbb15bba50f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java lines 1635–1668
@MethodSource("newTestParams")
@ParameterizedTest
public void testMaxCertificateListSmallLimitReject(final SSLEngineTestParam param) throws Exception {
assumeTrue(isOptionSupported(sslClientProvider(), MAX_CERTIFICATE_LIST_BYTES));
assumeTrue(isOptionSupported(sslServerProvider(), MAX_CERTIFICATE_LIST_BYTES));
X509Bundle ssc = createLargeCertificate(16 * 1024); // This certificate is too large, and must be rejected.
File privateKey = ssc.toTempPrivateKeyPem();
File certificate = ssc.toTempCertChainPem();
// Limits below 16 KiB are ignored:
clientSslCtx = clientContextWithCertSizeLimit(param, certificate, privateKey, 10);
serverSslCtx = serverContextWithCertSizeLimit(param, certificate, privateKey, 10);
final SSLEngine client = wrapEngine(clientSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
final SSLEngine server = wrapEngine(serverSslCtx.newEngine(UnpooledByteBufAllocator.DEFAULT));
try {
SSLException e = assertThrows(SSLException.class, new Executable() {
@Override
public void execute() throws Throwable {
handshake(param.type(), param.delegate(), client, server);
}
});
// In the case of TLS_v1_3 we might only generate the exception once the actual handshake is considered
// done. If other protocols this should be generated during the handshake itself and so be of type
// SSLHandshakeException.
if (!SslProtocols.TLS_v1_3.equals(client.getSession().getProtocol())) {
assertInstanceOf(SSLHandshakeException.class, e);
}
assertThat(e.getMessage()).contains("EXCESSIVE_MESSAGE_SIZE");
} finally {
cleanupClientSslEngine(client);
cleanupServerSslEngine(server);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testMaxCertificateListSmallLimitReject() do?
testMaxCertificateListSmallLimitReject() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java.
Where is testMaxCertificateListSmallLimitReject() defined?
testMaxCertificateListSmallLimitReject() is defined in handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java at line 1635.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free