SslContextTest Class — netty Architecture
Architecture documentation for the SslContextTest class in SslContextTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a01749eb_679b_481b_5606_5c18a5630be5["SslContextTest"] ec41f4fc_d3cf_ce07_cef7_911d321e7540["SslContextTest.java"] a01749eb_679b_481b_5606_5c18a5630be5 -->|defined in| ec41f4fc_d3cf_ce07_cef7_911d321e7540 05437042_5f33_89f5_c645_4eff59316f92["testUnencryptedEmptyPassword()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 05437042_5f33_89f5_c645_4eff59316f92 d6c9728c_cc69_7f67_1a58_857ce825e25b["testUnEncryptedNullPassword()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| d6c9728c_cc69_7f67_1a58_857ce825e25b 09f3bf18_cb84_6d4a_458c_cd32ddcd19ac["testEncryptedEmptyPassword()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 09f3bf18_cb84_6d4a_458c_cd32ddcd19ac 1085e76c_d507_73f2_885a_57b8ae71aab4["testEncryptedNullPassword()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 1085e76c_d507_73f2_885a_57b8ae71aab4 3ac9bca6_e12d_bc61_a107_6198260a7690["testSslContextWithEncryptedPrivateKey()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 3ac9bca6_e12d_bc61_a107_6198260a7690 72c368fa_2034_2e7e_c042_611664124283["testSslContextWithEncryptedPrivateKey2()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 72c368fa_2034_2e7e_c042_611664124283 7b519de9_cd13_0055_e8c5_14a7c9f66063["testSslContextWithUnencryptedPrivateKey()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 7b519de9_cd13_0055_e8c5_14a7c9f66063 a1e55f66_9e53_46e8_a4ca_4e63fbb7dfab["testSslContextWithUnencryptedPrivateKeyEmptyPass()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| a1e55f66_9e53_46e8_a4ca_4e63fbb7dfab 78403bed_4f29_db87_a932_c054407d3276["testSupportedCiphers()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 78403bed_4f29_db87_a932_c054407d3276 c1f35955_6768_0dbf_1c35_3790514500e2["testUnsupportedParams()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| c1f35955_6768_0dbf_1c35_3790514500e2 d4d00210_4227_230b_9dbd_cfb50b6a53a0["SslContext()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| d4d00210_4227_230b_9dbd_cfb50b6a53a0 906e9718_aea2_3cd2_7b58_1d096db96cc6["testPkcs1UnencryptedRsa()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| 906e9718_aea2_3cd2_7b58_1d096db96cc6 f7b3457e_21de_dd68_3398_d4f2ae32fe38["testPkcs8UnencryptedRsa()"] a01749eb_679b_481b_5606_5c18a5630be5 -->|method| f7b3457e_21de_dd68_3398_d4f2ae32fe38
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SslContextTest.java lines 40–373
public abstract class SslContextTest {
@Test
public void testUnencryptedEmptyPassword() throws Exception {
assertThrows(IOException.class, new Executable() {
@Override
public void execute() throws Throwable {
SslContext.toPrivateKey(
ResourcesUtil.getFile(getClass(), "test2_unencrypted.pem"), "");
}
});
}
@Test
public void testUnEncryptedNullPassword() throws Exception {
PrivateKey key = SslContext.toPrivateKey(
ResourcesUtil.getFile(getClass(), "test2_unencrypted.pem"), null);
assertNotNull(key);
}
@Test
public void testEncryptedEmptyPassword() throws Exception {
PrivateKey key = SslContext.toPrivateKey(
ResourcesUtil.getFile(getClass(), "test_encrypted_empty_pass.pem"), "");
assertNotNull(key);
}
@Test
public void testEncryptedNullPassword() throws Exception {
assertThrows(InvalidKeySpecException.class, new Executable() {
@Override
public void execute() throws Throwable {
SslContext.toPrivateKey(
ResourcesUtil.getFile(getClass(), "test_encrypted_empty_pass.pem"), null);
}
});
}
@Test
public void testSslContextWithEncryptedPrivateKey() throws SSLException {
File keyFile = ResourcesUtil.getFile(getClass(), "test_encrypted.pem");
File crtFile = ResourcesUtil.getFile(getClass(), "test.crt");
ReferenceCountUtil.release(newSslContext(crtFile, keyFile, "12345"));
}
@Test
public void testSslContextWithEncryptedPrivateKey2() throws SSLException {
File keyFile = ResourcesUtil.getFile(getClass(), "test2_encrypted.pem");
File crtFile = ResourcesUtil.getFile(getClass(), "test2.crt");
ReferenceCountUtil.release(newSslContext(crtFile, keyFile, "12345"));
}
@Test
public void testSslContextWithUnencryptedPrivateKey() throws SSLException {
File keyFile = ResourcesUtil.getFile(getClass(), "test_unencrypted.pem");
File crtFile = ResourcesUtil.getFile(getClass(), "test.crt");
ReferenceCountUtil.release(newSslContext(crtFile, keyFile, null));
}
@Test
public void testSslContextWithUnencryptedPrivateKeyEmptyPass() throws SSLException {
final File keyFile = ResourcesUtil.getFile(getClass(), "test_unencrypted.pem");
final File crtFile = ResourcesUtil.getFile(getClass(), "test.crt");
assertThrows(SSLException.class, new Executable() {
@Override
public void execute() throws Throwable {
newSslContext(crtFile, keyFile, "");
}
});
}
@Test
public void testSupportedCiphers() throws KeyManagementException, NoSuchAlgorithmException, SSLException {
SSLContext jdkSslContext = SSLContext.getInstance("TLS");
jdkSslContext.init(null, null, null);
SSLEngine sslEngine = jdkSslContext.createSSLEngine();
Source
Frequently Asked Questions
What is the SslContextTest class?
SslContextTest is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SslContextTest.java.
Where is SslContextTest defined?
SslContextTest is defined in handler/src/test/java/io/netty/handler/ssl/SslContextTest.java at line 40.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free