private HttpURLConnection createUrlConnection(Request request) throws IOException, URISyntaxException { ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); Proxy proxy = null; if (proxyServer != null || realm != null) { try { proxy = configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { throw new IOException(e.getMessage()); } } HttpURLConnection urlConnection = (HttpURLConnection) request.getUri().toJavaNetURI().toURL().openConnection(proxy == null ? Proxy.NO_PROXY : proxy); if (request.getUri().getScheme().equals("https")) { HttpsURLConnection secure = (HttpsURLConnection) urlConnection; SSLContext sslContext; try { sslContext = SslUtils.getInstance().getSSLContext(config); } catch (GeneralSecurityException e) { throw new IOException(e.getMessage()); } secure.setSSLSocketFactory(sslContext.getSocketFactory()); secure.setHostnameVerifier(config.getHostnameVerifier()); } return urlConnection; }
maxRequestRetry = prototype.getMaxRequestRetry(); allowPoolingSslConnections = prototype.isAllowPoolingConnections(); hostnameVerifier = prototype.getHostnameVerifier(); strict302Handling = prototype.isStrict302Handling(); enabledProtocols = prototype.enabledProtocols;
private HttpURLConnection createUrlConnection(Request request) throws IOException, URISyntaxException { ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); Proxy proxy = null; if (proxyServer != null || realm != null) { try { proxy = configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { throw new IOException(e.getMessage()); } } HttpURLConnection urlConnection = (HttpURLConnection) request.getURI().toURI().toURL().openConnection(proxy == null ? Proxy.NO_PROXY : proxy); if (request.getURI().getScheme().equals("https")) { HttpsURLConnection secure = (HttpsURLConnection) urlConnection; SSLContext sslContext = config.getSSLContext(); if (sslContext == null) { try { sslContext = SslUtils.getInstance().getSSLContext(config.isAcceptAnyCertificate()); } catch (NoSuchAlgorithmException e) { throw new IOException(e.getMessage()); } catch (GeneralSecurityException e) { throw new IOException(e.getMessage()); } } secure.setSSLSocketFactory(sslContext.getSocketFactory()); secure.setHostnameVerifier(config.getHostnameVerifier()); } return urlConnection; }
provider.clientConfig.getHostnameVerifier();
final SslHandler sslHandler = ChannelManager.getSslHandler(channel.getPipeline()); final HostnameVerifier hostnameVerifier = config.getHostnameVerifier(); if (hostnameVerifier != null && sslHandler != null) { final String host = future.getURI().getHost();
maxRequestRetry = prototype.getMaxRequestRetry(); allowPoolingSslConnections = prototype.isAllowPoolingConnections(); hostnameVerifier = prototype.getHostnameVerifier(); strict302Handling = prototype.isStrict302Handling(); enabledProtocols = prototype.enabledProtocols;
allowPoolingSslConnections = prototype.isAllowPoolingConnections(); removeQueryParamOnRedirect = prototype.isRemoveQueryParamOnRedirect(); hostnameVerifier = prototype.getHostnameVerifier(); strict302Handling = prototype.isStrict302Handling(); timeConverter = prototype.timeConverter;
maxRequestRetry = prototype.getMaxRequestRetry(); allowPoolingSslConnections = prototype.isAllowPoolingConnections(); hostnameVerifier = prototype.getHostnameVerifier(); strict302Handling = prototype.isStrict302Handling(); enabledProtocols = prototype.enabledProtocols;
final SwitchingSSLFilter sslFilter = new SwitchingSSLFilter(configurator, defaultSecState); if (clientConfig.getHostnameVerifier() != null) { sslFilter.addHandshakeListener(new HostnameVerifierListener());