Remove duplicate call to SSLContext.setVerify from ReferenceCountedOpenSslServerContext

Motivation:
5e64985089 introduced support for the KeyManagerFactory while using OpenSSL. This same commit also introduced 2 calls to SSLContext.setVerify when 1 should be sufficient.

Modifications:
- Remove the duplicate call to SSLContext.setVerify

Result:
Less duplicate code in ReferenceCountedOpenSslServerContext.
This commit is contained in:
Scott Mitchell 2017-03-08 12:55:31 -08:00
parent 3ad3356892
commit 10d9f82f14

View File

@ -21,7 +21,6 @@ import io.netty.internal.tcnative.SSLContext;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLException;
import javax.net.ssl.TrustManagerFactory;
@ -110,9 +109,6 @@ public final class ReferenceCountedOpenSslServerContext extends ReferenceCounted
}
checkNotNull(keyCertChain, "keyCertChain");
/* Set certificate verification policy. */
SSLContext.setVerify(ctx, SSL.SSL_CVERIFY_NONE, VERIFY_DEPTH);
setKeyMaterial(ctx, keyCertChain, key, keyPassword);
} else {
// javadocs state that keyManagerFactory has precedent over keyCertChain, and we must have a