-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do we use one disableHttpsEndpointIdentificationAlgorithm option to affect the behavior of SNI and hostname verification? #1959
Comments
Hello,
How I can disable hostname verification in new version? Thank you |
/**
* Skip {@link javax.net.ssl.HostnameVerifier}.
*
* @see <a href="https://netty.io/4.1/api/io/netty/handler/ssl/SslContext.html">newHandler</a>
* @see <a href="https://github.com/AsyncHttpClient/async-http-client/issues/1611">How to disable hostname verification in AsyncHttpClient</a>
*/
private static class SkipHostnameVerificationSslEngineFactory extends DefaultSslEngineFactory {
@Override
protected void configureSslEngine(SSLEngine sslEngine, AsyncHttpClientConfig config) {
sslEngine.setUseClientMode(true);
}
} and then: DefaultAsyncHttpClientConfig.Builder cfgBuilder = new DefaultAsyncHttpClientConfig.Builder();
cfgBuilder.setSslEngineFactory(new SkipHostnameVerificationSslEngineFactory()); You can refer to |
Thank you ! |
In real-life scenarios, we need to configure one of the options individually, rather than having to turn them on or off simultaneously, thanks.
The text was updated successfully, but these errors were encountered: