Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf91f40d

Browse files
committed
Fix and rename setDisableHttps setDisableAlgorithm,closeAsyncHttpClient#1413
Motivation:* it’s buggy and actually sets useInsecureTrustManager* the name is not rightModifications:* change right property* rename into `setDisableHttpsEndpointIdentificationAlgorithm`Result:It’s now possible to disable HTTPS endpointIdentificationAlgorithm, forexample in order to disable hostname verification.
1 parent82a3e88 commitf91f40d

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

‎client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public interface AsyncHttpClientConfig {
213213
/**
214214
* @return true to disable all HTTPS behaviors AT ONCE, such as hostname verification and SNI
215215
*/
216-
booleanisDisableHttpsAlgorithm();
216+
booleanisDisableHttpsEndpointIdentificationAlgorithm();
217217

218218
/**
219219
* @return the array of enabled protocols

‎client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig {
9797
// ssl
9898
privatefinalbooleanuseOpenSsl;
9999
privatefinalbooleanuseInsecureTrustManager;
100-
privatefinalbooleandisableHttpsAlgorithm;
100+
privatefinalbooleandisableHttpsEndpointIdentificationAlgorithm;
101101
privatefinalinthandshakeTimeout;
102102
privatefinalString[]enabledProtocols;
103103
privatefinalString[]enabledCipherSuites;
@@ -172,7 +172,7 @@ private DefaultAsyncHttpClientConfig(//
172172
// ssl
173173
booleanuseOpenSsl,//
174174
booleanuseInsecureTrustManager,//
175-
booleandisableHttpsAlgorithm,//
175+
booleandisableHttpsEndpointIdentificationAlgorithm,//
176176
inthandshakeTimeout,//
177177
String[]enabledProtocols,//
178178
String[]enabledCipherSuites,//
@@ -248,7 +248,7 @@ private DefaultAsyncHttpClientConfig(//
248248
// ssl
249249
this.useOpenSsl =useOpenSsl;
250250
this.useInsecureTrustManager =useInsecureTrustManager;
251-
this.disableHttpsAlgorithm =disableHttpsAlgorithm;
251+
this.disableHttpsEndpointIdentificationAlgorithm =disableHttpsEndpointIdentificationAlgorithm;
252252
this.handshakeTimeout =handshakeTimeout;
253253
this.enabledProtocols =enabledProtocols;
254254
this.enabledCipherSuites =enabledCipherSuites;
@@ -441,8 +441,8 @@ public boolean isUseInsecureTrustManager() {
441441
}
442442

443443
@Override
444-
publicbooleanisDisableHttpsAlgorithm() {
445-
returndisableHttpsAlgorithm;
444+
publicbooleanisDisableHttpsEndpointIdentificationAlgorithm() {
445+
returndisableHttpsEndpointIdentificationAlgorithm;
446446
}
447447

448448
@Override
@@ -655,7 +655,7 @@ public static class Builder {
655655
// ssl
656656
privatebooleanuseOpenSsl =defaultUseOpenSsl();
657657
privatebooleanuseInsecureTrustManager =defaultUseInsecureTrustManager();
658-
privatebooleandisableHttpsAlgorithm =defaultDisableHttpsAlgorithm();
658+
privatebooleandisableHttpsEndpointIdentificationAlgorithm =defaultDisableHttpsEndpointIdentificationAlgorithm();
659659
privateinthandshakeTimeout =defaultHandshakeTimeout();
660660
privateString[]enabledProtocols =defaultEnabledProtocols();
661661
privateString[]enabledCipherSuites =defaultEnabledCipherSuites();
@@ -934,8 +934,8 @@ public Builder setUseInsecureTrustManager(boolean useInsecureTrustManager) {
934934
returnthis;
935935
}
936936

937-
publicBuildersetDisableHttpsAlgorithm(booleandisableHttpsAlgorithm) {
938-
this.useInsecureTrustManager =disableHttpsAlgorithm;
937+
publicBuildersetDisableHttpsEndpointIdentificationAlgorithm(booleandisableHttpsEndpointIdentificationAlgorithm) {
938+
this.disableHttpsEndpointIdentificationAlgorithm =disableHttpsEndpointIdentificationAlgorithm;
939939
returnthis;
940940
}
941941

@@ -1167,7 +1167,7 @@ public DefaultAsyncHttpClientConfig build() {
11671167
keepAliveStrategy,//
11681168
useOpenSsl,//
11691169
useInsecureTrustManager,//
1170-
disableHttpsAlgorithm,//
1170+
disableHttpsEndpointIdentificationAlgorithm,//
11711171
handshakeTimeout,//
11721172
enabledProtocols,//
11731173
enabledCipherSuites,//

‎client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ public static boolean defaultUseInsecureTrustManager() {
119119
returnAsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getBoolean(ASYNC_CLIENT_CONFIG_ROOT +"useInsecureTrustManager");
120120
}
121121

122-
publicstaticbooleandefaultDisableHttpsAlgorithm() {
123-
returnAsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getBoolean(ASYNC_CLIENT_CONFIG_ROOT +"disableHttpsAlgorithm");
122+
publicstaticbooleandefaultDisableHttpsEndpointIdentificationAlgorithm() {
123+
returnAsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getBoolean(ASYNC_CLIENT_CONFIG_ROOT +"disableHttpsEndpointIdentificationAlgorithm");
124124
}
125125

126126
publicstaticintdefaultSslSessionCacheSize() {

‎client/src/main/java/org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public abstract class SslEngineFactoryBase implements SslEngineFactory {
2323

2424
protectedvoidconfigureSslEngine(SSLEnginesslEngine,AsyncHttpClientConfigconfig) {
2525
sslEngine.setUseClientMode(true);
26-
if (!config.isDisableHttpsAlgorithm()) {
26+
if (!config.isDisableHttpsEndpointIdentificationAlgorithm()) {
2727
SSLParametersparams =sslEngine.getSSLParameters();
2828
params.setEndpointIdentificationAlgorithm("HTTPS");
2929
sslEngine.setSSLParameters(params);

‎client/src/main/resources/ahc-default.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ org.asynchttpclient.disableUrlEncodingForBoundRequests=false
2424
org.asynchttpclient.removeQueryParamOnRedirect=true
2525
org.asynchttpclient.useOpenSsl=false
2626
org.asynchttpclient.useInsecureTrustManager=false
27-
org.asynchttpclient.disableHttpsAlgorithm=false
27+
org.asynchttpclient.disableHttpsEndpointIdentificationAlgorithm=false
2828
org.asynchttpclient.sslSessionCacheSize=0
2929
org.asynchttpclient.sslSessionTimeout=0
3030
org.asynchttpclient.tcpNoDelay=true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp