Skip to content

Commit a840f79

Browse files
committed
Merge pull request AsyncHttpClient#993 from yiyangc91/1.9.x
Moved setUseClientMode above setSSLParameters to fix AsyncHttpClient#991 in 1.9.x
2 parents ff3250a + 118f1e1 commit a840f79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/client/SSLEngineFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public SSLEngine newSSLEngine(String peerHost, int peerPort) throws GeneralSecur
4949
SSLContext sslContext = SslUtils.getInstance().getSSLContext(config);
5050

5151
SSLEngine sslEngine = sslContext.createSSLEngine(peerHost, peerPort);
52+
sslEngine.setUseClientMode(true);
5253
if (!config.isAcceptAnyCertificate()) {
5354
SSLParameters params = sslEngine.getSSLParameters();
5455
params.setEndpointIdentificationAlgorithm("HTTPS");
5556
sslEngine.setSSLParameters(params);
5657
}
57-
sslEngine.setUseClientMode(true);
5858

5959
if (isNonEmpty(config.getEnabledProtocols()))
6060
sslEngine.setEnabledProtocols(config.getEnabledProtocols());

0 commit comments

Comments
 (0)