public SSLHelper(HttpClientOptions options, KeyCertOptions keyCertOptions, TrustOptions trustOptions) { SSLEngineOptions sslEngineOptions = resolveEngineOptions(options); this.ssl = options.isSsl(); this.keyCertOptions = keyCertOptions; this.trustOptions = trustOptions; this.trustAll = options.isTrustAll(); this.crlPaths = new ArrayList<>(options.getCrlPaths()); this.crlValues = new ArrayList<>(options.getCrlValues()); this.enabledCipherSuites = options.getEnabledCipherSuites(); this.openSsl = sslEngineOptions instanceof OpenSSLEngineOptions; this.client = true; this.useAlpn = options.isUseAlpn(); this.enabledProtocols = options.getEnabledSecureTransportProtocols(); if (options.isVerifyHost()) { this.endpointIdentificationAlgorithm = "HTTPS"; } this.openSslSessionCacheEnabled = (sslEngineOptions instanceof OpenSSLEngineOptions) && ((OpenSSLEngineOptions) sslEngineOptions).isSessionCacheEnabled(); }
options.getEnabledSecureTransportProtocols().forEach(options::removeEnabledSecureTransportProtocol);
public SSLHelper(HttpClientOptions options, KeyCertOptions keyCertOptions, TrustOptions trustOptions) { SSLEngineOptions sslEngineOptions = resolveEngineOptions(options); this.ssl = options.isSsl(); this.keyCertOptions = keyCertOptions; this.trustOptions = trustOptions; this.trustAll = options.isTrustAll(); this.crlPaths = new ArrayList<>(options.getCrlPaths()); this.crlValues = new ArrayList<>(options.getCrlValues()); this.enabledCipherSuites = options.getEnabledCipherSuites(); this.openSsl = sslEngineOptions instanceof OpenSSLEngineOptions; this.client = true; this.useAlpn = options.isUseAlpn(); this.enabledProtocols = options.getEnabledSecureTransportProtocols(); if (options.isVerifyHost()) { this.endpointIdentificationAlgorithm = "HTTPS"; } this.openSslSessionCacheEnabled = (sslEngineOptions instanceof OpenSSLEngineOptions) && ((OpenSSLEngineOptions) sslEngineOptions).isSessionCacheEnabled(); }
options.getEnabledSecureTransportProtocols().forEach(options::removeEnabledSecureTransportProtocol);