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:
parent
3ad3356892
commit
10d9f82f14
@ -21,7 +21,6 @@ import io.netty.internal.tcnative.SSLContext;
|
|||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
import java.security.PrivateKey;
|
import java.security.PrivateKey;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
import javax.net.ssl.KeyManagerFactory;
|
import javax.net.ssl.KeyManagerFactory;
|
||||||
import javax.net.ssl.SSLException;
|
import javax.net.ssl.SSLException;
|
||||||
import javax.net.ssl.TrustManagerFactory;
|
import javax.net.ssl.TrustManagerFactory;
|
||||||
@ -110,9 +109,6 @@ public final class ReferenceCountedOpenSslServerContext extends ReferenceCounted
|
|||||||
}
|
}
|
||||||
checkNotNull(keyCertChain, "keyCertChain");
|
checkNotNull(keyCertChain, "keyCertChain");
|
||||||
|
|
||||||
/* Set certificate verification policy. */
|
|
||||||
SSLContext.setVerify(ctx, SSL.SSL_CVERIFY_NONE, VERIFY_DEPTH);
|
|
||||||
|
|
||||||
setKeyMaterial(ctx, keyCertChain, key, keyPassword);
|
setKeyMaterial(ctx, keyCertChain, key, keyPassword);
|
||||||
} else {
|
} else {
|
||||||
// javadocs state that keyManagerFactory has precedent over keyCertChain, and we must have a
|
// javadocs state that keyManagerFactory has precedent over keyCertChain, and we must have a
|
||||||
|
Loading…
Reference in New Issue
Block a user