factory.setEndpointIdentificationAlgorithm(endpointIdentificationAlgorithm);
@Override public WebSocketClient build() throws Exception { SslContextFactory sslContextFactory = sslVerificationMode == SslVerificationMode.NONE ? new TrustAllSSLContextFactory() : new SslContextFactory(); sslContextFactory.setNeedClientAuth(true); sslContextFactory.setKeyStore(agentKeystore()); sslContextFactory.setKeyStorePassword(keystorePassword()); sslContextFactory.setKeyManagerPassword(keystorePassword()); if (rootCertFile != null) { sslContextFactory.setTrustStore(agentTruststore()); sslContextFactory.setTrustStorePassword(keystorePassword()); } if (sslVerificationMode == SslVerificationMode.NO_VERIFY_HOST) { sslContextFactory.setEndpointIdentificationAlgorithm(null); } WebSocketClient client = new WebSocketClient(sslContextFactory); client.setMaxIdleTimeout(systemEnvironment.getWebsocketMaxIdleTime()); return client; }
.get(JettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION); if (enableHostnameVerification != null && enableHostnameVerification) { sslContextFactory.setEndpointIdentificationAlgorithm("https");
/** * @param trustAll True if all certificates should be trusted if there is no KeyStore or TrustStore */ public void setTrustAll(boolean trustAll) { _trustAll = trustAll; if (trustAll) setEndpointIdentificationAlgorithm(null); }
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
/** * @param trustAll True if all certificates should be trusted if there is no KeyStore or TrustStore */ public void setTrustAll(boolean trustAll) { _trustAll = trustAll; if(trustAll) setEndpointIdentificationAlgorithm(null); }
/** * @param trustAll True if all certificates should be trusted if there is no KeyStore or TrustStore */ public void setTrustAll(boolean trustAll) { _trustAll = trustAll; if(trustAll) setEndpointIdentificationAlgorithm(null); }
/** * @param trustAll True if all certificates should be trusted if there is no KeyStore or TrustStore */ public void setTrustAll(boolean trustAll) { _trustAll = trustAll; if (trustAll) setEndpointIdentificationAlgorithm(null); }
/** * @param trustAll True if all certificates should be trusted if there is no KeyStore or TrustStore */ public void setTrustAll(boolean trustAll) { _trustAll = trustAll; if(trustAll) setEndpointIdentificationAlgorithm(null); }
/** * Configures Protocol, Algorithm and Provider related settings in SslContextFactory */ protected static void configureSslContextFactoryEndpointIdentification(SslContextFactory ssl, Map<String, Object> sslConfigValues) { String sslEndpointIdentificationAlg = (String) sslConfigValues.get(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG); if (sslEndpointIdentificationAlg != null) ssl.setEndpointIdentificationAlgorithm(sslEndpointIdentificationAlg); }
private SslContextFactory createSslContextFactory() { SslContextFactory sslCtx = new SslContextFactory(); sslCtx.setEndpointIdentificationAlgorithm("HTTPS"); sslCtx.setSslContext(sslContextFactory.create()); return sslCtx; }
private SslContextFactory createSslContextFactory() { SslContextFactory sslCtx = new SslContextFactory(); sslCtx.setEndpointIdentificationAlgorithm("HTTPS"); sslCtx.setSslContext(sslContextFactory.create()); return sslCtx; }
private SslContextFactory createSslContextFactoryFromExtensibleTrustManager() { SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); if (extensibleTrustManager != null) { try { logger.debug("Setting up SSLContext for {}", extensibleTrustManager); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, new TrustManager[] { extensibleTrustManager }, null); sslContextFactory.setSslContext(sslContext); } catch (NoSuchAlgorithmException | KeyManagementException ex) { throw new HttpClientInitializationException("Cannot create an TLS context!", ex); } } String excludeCipherSuites[] = { "^.*_(MD5)$" }; sslContextFactory.setExcludeCipherSuites(excludeCipherSuites); return sslContextFactory; }
@Deprecated private SslContextFactory createSslContextFactoryFromTrustManagerProvider(@Nullable String endpoint) { SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); if (endpoint != null && trustmanagerProvider != null) { Stream<TrustManager> trustManagerStream = trustmanagerProvider.getTrustManagers(endpoint); TrustManager[] trustManagers = trustManagerStream.toArray(TrustManager[]::new); if (trustManagers.length > 0) { logger.debug("using custom trustmanagers (certificate pinning) for httpClient for endpoint {}", endpoint); try { SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustManagers, null); sslContextFactory.setSslContext(sslContext); } catch (NoSuchAlgorithmException | KeyManagementException ex) { throw new HttpClientInitializationException( "Cannot create an TLS context for the endpoint '" + endpoint + "'!", ex); } } } String excludeCipherSuites[] = { "^.*_(MD5)$" }; sslContextFactory.setExcludeCipherSuites(excludeCipherSuites); return sslContextFactory; }
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory) { this.transport = transport; addBean(transport); if (sslContextFactory == null) { sslContextFactory = new SslContextFactory(false); sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); } this.sslContextFactory = sslContextFactory; addBean(sslContextFactory); addBean(handlers); addBean(decoderFactories); }
.get(JettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION); if (enableHostnameVerification != null && enableHostnameVerification) { sslContextFactory.setEndpointIdentificationAlgorithm("https");
factory.setEndpointIdentificationAlgorithm(endpointIdentificationAlgorithm);
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
sslContextFactory.setEndpointIdentificationAlgorithm( config.getString(RestConfig.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG));
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); sslContextFactory.setExcludeProtocols(); sslContextFactory.setIncludeProtocols(ENABLED_PROTOCOLS);