GeezerVison is showing github.com — Backport the SslContextBuilder.endpointIdentificationAlgorithm method… · netty/netty@0deca94
File treeExpand file treeCollapse file tree Open diff view settings handler/src/main/java/io/netty/handler/ssl
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/Java7SslParametersUtils.java +10Lines changed: 10 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -35,4 +35,14 @@ private Java7SslParametersUtils() { | 35 | 35 | static void setAlgorithmConstraints(SSLParameters sslParameters, Object algorithmConstraints) { | 36 | 36 | sslParameters.setAlgorithmConstraints((AlgorithmConstraints) algorithmConstraints); | 37 | 37 | } | | 38 | + | | 39 | + /** | | 40 | + * Utility method for calling the {@code setEndpointIdentitificationAlgorithm} method, | | 41 | + * which was introduced in Java 7. | | 42 | + */ | | 43 | + @SuppressJava6Requirement(reason = "Usage guarded by java version check") | | 44 | + static void setEndpointIdentificationAlgorithm( | | 45 | + SSLParameters sslParameters, String endpointIdentificationAlgorithm) { | | 46 | + sslParameters.setEndpointIdentificationAlgorithm(endpointIdentificationAlgorithm); | | 47 | + } | 38 | 48 | } |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/JdkSslClientContext.java +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -269,12 +269,13 @@ public JdkSslClientContext(File trustCertCollectionFile, TrustManagerFactory tru | 269 | 269 | X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, | 270 | 270 | KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, | 271 | 271 | ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout, | 272 | | - SecureRandom secureRandom, String keyStoreType) | | 272 | + SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm) | 273 | 273 | throws SSLException { | 274 | 274 | super(newSSLContext(sslContextProvider, trustCertCollection, trustManagerFactory, | 275 | 275 | keyCertChain, key, keyPassword, keyManagerFactory, sessionCacheSize, | 276 | 276 | sessionTimeout, secureRandom, keyStoreType), | 277 | | - true, ciphers, cipherFilter, toNegotiator(apn, false), ClientAuth.NONE, protocols, false); | | 277 | + true, ciphers, cipherFilter, toNegotiator(apn, false), ClientAuth.NONE, protocols, false, | | 278 | + endpointIdentificationAlgorithm); | 278 | 279 | } | 279 | 280 |
| 280 | 281 | private static SSLContext newSSLContext(Provider sslContextProvider, | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java +21-1Lines changed: 21 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 19 | 19 | import io.netty.buffer.ByteBufAllocator; | 20 | 20 | import io.netty.util.ReferenceCountUtil; | 21 | 21 | import io.netty.util.internal.EmptyArrays; | | 22 | +import io.netty.util.internal.PlatformDependent; | 22 | 23 | import io.netty.util.internal.logging.InternalLogger; | 23 | 24 | import io.netty.util.internal.logging.InternalLoggerFactory; | 24 | 25 |
| | 41 | 42 | import java.util.LinkedHashSet; | 42 | 43 | import java.util.List; | 43 | 44 | import java.util.Set; | 44 | | - | 45 | 45 | import javax.crypto.NoSuchPaddingException; | 46 | 46 | import javax.net.ssl.KeyManagerFactory; | 47 | 47 | import javax.net.ssl.SSLContext; | 48 | 48 | import javax.net.ssl.SSLEngine; | | 49 | +import javax.net.ssl.SSLParameters; | 49 | 50 | import javax.net.ssl.SSLSessionContext; | 50 | 51 |
| 51 | 52 | import static io.netty.handler.ssl.SslUtils.DEFAULT_CIPHER_SUITES; | @@ -190,6 +191,7 @@ private static boolean isTlsV13Supported(String[] protocols) { | 190 | 191 | private final ClientAuth clientAuth; | 191 | 192 | private final SSLContext sslContext; | 192 | 193 | private final boolean isClient; | | 194 | + private final String endpointIdentificationAlgorithm; | 193 | 195 |
| 194 | 196 | /** | 195 | 197 | * Creates a new {@link JdkSslContext} from a pre-configured {@link SSLContext}. | @@ -259,10 +261,18 @@ public JdkSslContext(SSLContext sslContext, | 259 | 261 | @SuppressWarnings("deprecation") | 260 | 262 | JdkSslContext(SSLContext sslContext, boolean isClient, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, | 261 | 263 | JdkApplicationProtocolNegotiator apn, ClientAuth clientAuth, String[] protocols, boolean startTls) { | | 264 | + this(sslContext, isClient, ciphers, cipherFilter, apn, clientAuth, protocols, startTls, null); | | 265 | + } | | 266 | + | | 267 | + @SuppressWarnings("deprecation") | | 268 | + JdkSslContext(SSLContext sslContext, boolean isClient, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, | | 269 | + JdkApplicationProtocolNegotiator apn, ClientAuth clientAuth, String[] protocols, boolean startTls, | | 270 | + String endpointIdentificationAlgorithm) { | 262 | 271 | super(startTls); | 263 | 272 | this.apn = checkNotNull(apn, "apn"); | 264 | 273 | this.clientAuth = checkNotNull(clientAuth, "clientAuth"); | 265 | 274 | this.sslContext = checkNotNull(sslContext, "sslContext"); | | 275 | + this.endpointIdentificationAlgorithm = endpointIdentificationAlgorithm; | 266 | 276 |
| 267 | 277 | final List<String> defaultCiphers; | 268 | 278 | final Set<String> supportedCiphers; | @@ -366,6 +376,7 @@ private SSLEngine configureAndWrapEngine(SSLEngine engine, ByteBufAllocator allo | 366 | 376 | throw new Error("Unknown auth " + clientAuth); | 367 | 377 | } | 368 | 378 | } | | 379 | + configureEndpointVerification(engine); | 369 | 380 | JdkApplicationProtocolNegotiator.SslEngineWrapperFactory factory = apn.wrapperFactory(); | 370 | 381 | if (factory instanceof JdkApplicationProtocolNegotiator.AllocatorAwareSslEngineWrapperFactory) { | 371 | 382 | return ((JdkApplicationProtocolNegotiator.AllocatorAwareSslEngineWrapperFactory) factory) | @@ -374,6 +385,15 @@ private SSLEngine configureAndWrapEngine(SSLEngine engine, ByteBufAllocator allo | 374 | 385 | return factory.wrapSslEngine(engine, apn, isServer()); | 375 | 386 | } | 376 | 387 |
| | 388 | + private void configureEndpointVerification(SSLEngine engine) { | | 389 | + int version = PlatformDependent.javaVersion(); | | 390 | + if (version >= 7) { | | 391 | + SSLParameters params = engine.getSSLParameters(); | | 392 | + Java7SslParametersUtils.setEndpointIdentificationAlgorithm(params, endpointIdentificationAlgorithm); | | 393 | + engine.setSSLParameters(params); | | 394 | + } | | 395 | + } | | 396 | + | 377 | 397 | @Override | 378 | 398 | public final JdkApplicationProtocolNegotiator applicationProtocolNegotiator() { | 379 | 399 | return apn; | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/OpenSslClientContext.java +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -178,18 +178,18 @@ public OpenSslClientContext(File trustCertCollectionFile, TrustManagerFactory tr | 178 | 178 | this(toX509CertificatesInternal(trustCertCollectionFile), trustManagerFactory, | 179 | 179 | toX509CertificatesInternal(keyCertChainFile), toPrivateKeyInternal(keyFile, keyPassword), | 180 | 180 | keyPassword, keyManagerFactory, ciphers, cipherFilter, apn, null, sessionCacheSize, | 181 | | - sessionTimeout, false, KeyStore.getDefaultType()); | | 181 | + sessionTimeout, false, KeyStore.getDefaultType(), null); | 182 | 182 | } | 183 | 183 |
| 184 | 184 | OpenSslClientContext(X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, | 185 | 185 | X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, | 186 | | - KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, | 187 | | - CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, | 188 | | - long sessionCacheSize, long sessionTimeout, boolean enableOcsp, String keyStore, | 189 | | - Map.Entry<SslContextOption<?>, Object>... options) | | 186 | + KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, | | 187 | + CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, | | 188 | + long sessionCacheSize, long sessionTimeout, boolean enableOcsp, String keyStore, | | 189 | + String endpointIdentificationAlgorithm, Map.Entry<SslContextOption<?>, Object>... options) | 190 | 190 | throws SSLException { | 191 | 191 | super(ciphers, cipherFilter, apn, SSL.SSL_MODE_CLIENT, keyCertChain, | 192 | | - ClientAuth.NONE, protocols, false, enableOcsp, options); | | 192 | + ClientAuth.NONE, protocols, false, endpointIdentificationAlgorithm, enableOcsp, options); | 193 | 193 | boolean success = false; | 194 | 194 | try { | 195 | 195 | OpenSslKeyMaterialProvider.validateKeyMaterialSupported(keyCertChain, key, keyPassword); | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/OpenSslContext.java +6-5Lines changed: 6 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | public abstract class OpenSslContext extends ReferenceCountedOpenSslContext { | 31 | 31 | OpenSslContext(Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apnCfg, | 32 | 32 | int mode, Certificate[] keyCertChain, | 33 | | - ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, | 34 | | - Map.Entry<SslContextOption<?>, Object>... options) | | 33 | + ClientAuth clientAuth, String[] protocols, boolean startTls, String endpointIdentificationAlgorithm, | | 34 | + boolean enableOcsp, Map.Entry<SslContextOption<?>, Object>... options) | 35 | 35 | throws SSLException { | 36 | 36 | super(ciphers, cipherFilter, toNegotiator(apnCfg), mode, keyCertChain, | 37 | | - clientAuth, protocols, startTls, enableOcsp, false, options); | | 37 | + clientAuth, protocols, startTls, endpointIdentificationAlgorithm, enableOcsp, false, options); | 38 | 38 | } | 39 | 39 |
| 40 | 40 | OpenSslContext(Iterable<String> ciphers, CipherSuiteFilter cipherFilter, OpenSslApplicationProtocolNegotiator apn, | @@ -43,12 +43,13 @@ public abstract class OpenSslContext extends ReferenceCountedOpenSslContext { | 43 | 43 | Map.Entry<SslContextOption<?>, Object>... options) | 44 | 44 | throws SSLException { | 45 | 45 | super(ciphers, cipherFilter, apn, mode, keyCertChain, | 46 | | - clientAuth, protocols, startTls, enableOcsp, false, options); | | 46 | + clientAuth, protocols, startTls, null, enableOcsp, false, options); | 47 | 47 | } | 48 | 48 |
| 49 | 49 | @Override | 50 | 50 | final SSLEngine newEngine0(ByteBufAllocator alloc, String peerHost, int peerPort, boolean jdkCompatibilityMode) { | 51 | | - return new OpenSslEngine(this, alloc, peerHost, peerPort, jdkCompatibilityMode); | | 51 | + return new OpenSslEngine(this, alloc, peerHost, peerPort, jdkCompatibilityMode, | | 52 | + endpointIdentificationAlgorithm); | 52 | 53 | } | 53 | 54 |
| 54 | 55 | @Override | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 28 | 28 | */ | 29 | 29 | public final class OpenSslEngine extends ReferenceCountedOpenSslEngine { | 30 | 30 | OpenSslEngine(OpenSslContext context, ByteBufAllocator alloc, String peerHost, int peerPort, | 31 | | - boolean jdkCompatibilityMode) { | 32 | | - super(context, alloc, peerHost, peerPort, jdkCompatibilityMode, false); | | 31 | + boolean jdkCompatibilityMode, String endpointIdentificationAlgorithm) { | | 32 | + super(context, alloc, peerHost, peerPort, jdkCompatibilityMode, false, endpointIdentificationAlgorithm); | 33 | 33 | } | 34 | 34 |
| 35 | 35 | @Override | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslClientContext.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -63,10 +63,10 @@ public final class ReferenceCountedOpenSslClientContext extends ReferenceCounted | 63 | 63 | KeyManagerFactory keyManagerFactory, Iterable<String> ciphers, | 64 | 64 | CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, | 65 | 65 | String[] protocols, long sessionCacheSize, long sessionTimeout, | 66 | | - boolean enableOcsp, String keyStore, | | 66 | + boolean enableOcsp, String keyStore, String endpointIdentificationAlgorithm, | 67 | 67 | Map.Entry<SslContextOption<?>, Object>... options) throws SSLException { | 68 | 68 | super(ciphers, cipherFilter, toNegotiator(apn), SSL.SSL_MODE_CLIENT, keyCertChain, | 69 | | - ClientAuth.NONE, protocols, false, enableOcsp, true, options); | | 69 | + ClientAuth.NONE, protocols, false, endpointIdentificationAlgorithm, enableOcsp, true, options); | 70 | 70 | boolean success = false; | 71 | 71 | try { | 72 | 72 | sessionContext = newSessionContext(this, ctx, engineMap, trustCertCollection, trustManagerFactory, | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslContext.java +6-2Lines changed: 6 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -153,6 +153,7 @@ protected void deallocate() { | 153 | 153 | final Certificate[] keyCertChain; | 154 | 154 | final ClientAuth clientAuth; | 155 | 155 | final String[] protocols; | | 156 | + final String endpointIdentificationAlgorithm; | 156 | 157 | final boolean hasTLSv13Cipher; | 157 | 158 |
| 158 | 159 | final boolean enableOcsp; | @@ -208,7 +209,8 @@ public ApplicationProtocolConfig.SelectedListenerFailureBehavior selectedListene | 208 | 209 |
| 209 | 210 | ReferenceCountedOpenSslContext(Iterable<String> ciphers, CipherSuiteFilter cipherFilter, | 210 | 211 | OpenSslApplicationProtocolNegotiator apn, int mode, Certificate[] keyCertChain, | 211 | | - ClientAuth clientAuth, String[] protocols, boolean startTls, boolean enableOcsp, | | 212 | + ClientAuth clientAuth, String[] protocols, boolean startTls, | | 213 | + String endpointIdentificationAlgorithm, boolean enableOcsp, | 212 | 214 | boolean leakDetection, Map.Entry<SslContextOption<?>, Object>... ctxOptions) | 213 | 215 | throws SSLException { | 214 | 216 | super(startTls); | @@ -264,6 +266,7 @@ public ApplicationProtocolConfig.SelectedListenerFailureBehavior selectedListene | 264 | 266 | this.mode = mode; | 265 | 267 | this.clientAuth = isServer() ? checkNotNull(clientAuth, "clientAuth") : ClientAuth.NONE; | 266 | 268 | this.protocols = protocols == null ? OpenSsl.defaultProtocols(mode == SSL.SSL_MODE_CLIENT) : protocols; | | 269 | + this.endpointIdentificationAlgorithm = endpointIdentificationAlgorithm; | 267 | 270 | this.enableOcsp = enableOcsp; | 268 | 271 |
| 269 | 272 | this.keyCertChain = keyCertChain == null ? null : keyCertChain.clone(); | @@ -491,7 +494,8 @@ protected SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int pee | 491 | 494 | } | 492 | 495 |
| 493 | 496 | SSLEngine newEngine0(ByteBufAllocator alloc, String peerHost, int peerPort, boolean jdkCompatibilityMode) { | 494 | | - return new ReferenceCountedOpenSslEngine(this, alloc, peerHost, peerPort, jdkCompatibilityMode, true); | | 497 | + return new ReferenceCountedOpenSslEngine(this, alloc, peerHost, peerPort, jdkCompatibilityMode, true, | | 498 | + endpointIdentificationAlgorithm); | 495 | 499 | } | 496 | 500 |
| 497 | 501 | /** | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java +19-10Lines changed: 19 additions & 10 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -185,7 +185,7 @@ protected void deallocate() { | 185 | 185 |
| 186 | 186 | private volatile ClientAuth clientAuth = ClientAuth.NONE; | 187 | 187 |
| 188 | | - private String endPointIdentificationAlgorithm; | | 188 | + private String endpointIdentificationAlgorithm; | 189 | 189 | // Store as object as AlgorithmConstraints only exists since java 7. | 190 | 190 | private Object algorithmConstraints; | 191 | 191 | private List<String> sniHostNames; | @@ -225,7 +225,8 @@ protected void deallocate() { | 225 | 225 | * @param leakDetection {@code true} to enable leak detection of this object. | 226 | 226 | */ | 227 | 227 | ReferenceCountedOpenSslEngine(ReferenceCountedOpenSslContext context, final ByteBufAllocator alloc, String peerHost, | 228 | | - int peerPort, boolean jdkCompatibilityMode, boolean leakDetection) { | | 228 | + int peerPort, boolean jdkCompatibilityMode, boolean leakDetection, | | 229 | + String endpointIdentificationAlgorithm) { | 229 | 230 | super(peerHost, peerPort); | 230 | 231 | OpenSsl.ensureAvailability(); | 231 | 232 | engineMap = context.engineMap; | @@ -234,6 +235,7 @@ protected void deallocate() { | 234 | 235 | this.alloc = checkNotNull(alloc, "alloc"); | 235 | 236 | apn = (OpenSslApplicationProtocolNegotiator) context.applicationProtocolNegotiator(); | 236 | 237 | clientMode = context.isClient(); | | 238 | + this.endpointIdentificationAlgorithm = endpointIdentificationAlgorithm; | 237 | 239 |
| 238 | 240 | if (PlatformDependent.javaVersion() >= 7) { | 239 | 241 | session = new ExtendedOpenSslSession(new DefaultOpenSslSession(context.sessionContext())) { | @@ -387,6 +389,9 @@ public List<byte[]> getStatusResponses() { | 387 | 389 | } | 388 | 390 | // setMode may impact the overhead. | 389 | 391 | calculateMaxWrapOverhead(); | | 392 | + | | 393 | + // Configure any endpoint verification specified by the SslContext. | | 394 | + configureEndpointVerification(endpointIdentificationAlgorithm); | 390 | 395 | } catch (Throwable cause) { | 391 | 396 | // Call shutdown so we are sure we correctly release all native memory and also guard against the | 392 | 397 | // case when shutdown() will be called by the finalizer again. | @@ -2188,7 +2193,7 @@ public final synchronized SSLParameters getSSLParameters() { | 2188 | 2193 |
| 2189 | 2194 | int version = PlatformDependent.javaVersion(); | 2190 | 2195 | if (version >= 7) { | 2191 | | - sslParameters.setEndpointIdentificationAlgorithm(endPointIdentificationAlgorithm); | | 2196 | + Java7SslParametersUtils.setEndpointIdentificationAlgorithm(sslParameters, endpointIdentificationAlgorithm); | 2192 | 2197 | Java7SslParametersUtils.setAlgorithmConstraints(sslParameters, algorithmConstraints); | 2193 | 2198 | if (version >= 8) { | 2194 | 2199 | if (sniHostNames != null) { | @@ -2233,20 +2238,24 @@ public final synchronized void setSSLParameters(SSLParameters sslParameters) { | 2233 | 2238 | matchers = sslParameters.getSNIMatchers(); | 2234 | 2239 | } | 2235 | 2240 |
| 2236 | | - final String endPointIdentificationAlgorithm = sslParameters.getEndpointIdentificationAlgorithm(); | | 2241 | + final String endpointIdentificationAlgorithm = sslParameters.getEndpointIdentificationAlgorithm(); | 2237 | 2242 | if (!isDestroyed) { | 2238 | | - // If the user asks for hostname verification we must ensure we verify the peer. | 2239 | | - // If the user disables hostname verification we leave it up to the user to change the mode manually. | 2240 | | - if (clientMode && isEndPointVerificationEnabled(endPointIdentificationAlgorithm)) { | 2241 | | - SSL.setVerify(ssl, SSL.SSL_CVERIFY_REQUIRED, -1); | 2242 | | - } | | 2243 | + configureEndpointVerification(endpointIdentificationAlgorithm); | 2243 | 2244 | } | 2244 | | - this.endPointIdentificationAlgorithm = endPointIdentificationAlgorithm; | | 2245 | + this.endpointIdentificationAlgorithm = endpointIdentificationAlgorithm; | 2245 | 2246 | algorithmConstraints = sslParameters.getAlgorithmConstraints(); | 2246 | 2247 | } | 2247 | 2248 | super.setSSLParameters(sslParameters); | 2248 | 2249 | } | 2249 | 2250 |
| | 2251 | + private void configureEndpointVerification(String endpointIdentificationAlgorithm) { | | 2252 | + // If the user asks for hostname verification we must ensure we verify the peer. | | 2253 | + // If the user disables hostname verification we leave it up to the user to change the mode manually. | | 2254 | + if (clientMode && isEndPointVerificationEnabled(endpointIdentificationAlgorithm)) { | | 2255 | + SSL.setVerify(ssl, SSL.SSL_CVERIFY_REQUIRED, -1); | | 2256 | + } | | 2257 | + } | | 2258 | + | 2250 | 2259 | private static boolean isEndPointVerificationEnabled(String endPointIdentificationAlgorithm) { | 2251 | 2260 | return endPointIdentificationAlgorithm != null && !endPointIdentificationAlgorithm.isEmpty(); | 2252 | 2261 | } | |
Collapse file Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslServerContext.java +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -72,7 +72,9 @@ cipherFilter, toNegotiator(apn), sessionCacheSize, sessionTimeout, clientAuth, p | 72 | 72 | boolean enableOcsp, String keyStore, Map.Entry<SslContextOption<?>, Object>... options) | 73 | 73 | throws SSLException { | 74 | 74 | super(ciphers, cipherFilter, apn, SSL.SSL_MODE_SERVER, keyCertChain, | 75 | | - clientAuth, protocols, startTls, enableOcsp, true, options); | | 75 | + clientAuth, protocols, startTls, | | 76 | + null, // No endpoint validation for servers. | | 77 | + enableOcsp, true, options); | 76 | 78 | // Create a new SSL_CTX and configure it. | 77 | 79 | boolean success = false; | 78 | 80 | try { | |
|