Skip to content

Commit d7fc7c5

Browse files
committed
avoid AllowAllhostnameVerifier deprecation issue by the recommended
class #17
1 parent 0d369be commit d7fc7c5

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/main/java/net/lightbody/bmp/proxy/http/AllowAllHostnameVerifier.java

-18
This file was deleted.

src/main/java/net/lightbody/bmp/proxy/http/TrustingSSLSocketFactory.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.lightbody.bmp.proxy.http;
22

33
import org.apache.http.HttpHost;
4+
import org.apache.http.conn.ssl.NoopHostnameVerifier;
45
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
56
import org.apache.http.protocol.HttpContext;
67
import org.apache.http.ssl.SSLContexts;
@@ -54,7 +55,7 @@ public TrustingSSLSocketFactory(int timeout) throws KeyManagementException,
5455
.loadKeyMaterial(keyStore, keyStorePassword.toCharArray())
5556
.loadTrustMaterial(null, (cert, authType) -> true) //trust strategy is here
5657
.build(),
57-
new AllowAllHostnameVerifier()
58+
new NoopHostnameVerifier()
5859
);
5960

6061
this.timeout = timeout;

0 commit comments

Comments
 (0)