SslContextTest.java — netty Source File
Architecture documentation for SslContextTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.ssl;
import io.netty.util.ReferenceCountUtil;
import io.netty.util.internal.ResourcesUtil;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import java.io.File;
import java.io.IOException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.cert.CertificateException;
import java.security.spec.InvalidKeySpecException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLException;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
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
// ... (314 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does SslContextTest.java do?
SslContextTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is SslContextTest.java in the architecture?
SslContextTest.java is located at handler/src/test/java/io/netty/handler/ssl/SslContextTest.java (domain: Buffer, subdomain: Allocators, directory: handler/src/test/java/io/netty/handler/ssl).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free