Skip to content

Commit 5ef3511

Browse files
committed
Revert: Added option to disable java net http client hostname verifier
1 parent 790ad05 commit 5ef3511

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ SSLFactory sslFactory = SSLFactory.builder()
345345
.build();
346346
347347
HttpsURLConnection.setDefaultHostnameVerifier(sslFactory.getHostnameVerifier());
348+
System.setProperty("jdk.internal.httpclient.disableHostnameVerification", Boolean.TRUE.toString());
348349
```
349350

350351
##### Loading JDK and OS trusted certificates

ayza/src/main/java/nl/altindag/ssl/SSLFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,6 @@ public <T extends HostnameVerifier> Builder withHostnameVerifier(T hostnameVerif
779779

780780
public Builder withUnsafeHostnameVerifier() {
781781
this.hostnameVerifier = HostnameVerifierUtils.createUnsafe();
782-
System.setProperty("jdk.internal.httpclient.disableHostnameVerification", Boolean.TRUE.toString());
783782
return this;
784783
}
785784

0 commit comments

Comments
 (0)