File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/src/test/java/at/bitfire/cert4android Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1010
1111package at.bitfire.cert4android
1212
13- import org.apache.http.conn.ssl.AllowAllHostnameVerifier
1413import org.junit.Assume.assumeNotNull
1514import org.junit.Before
1615import org.junit.Test
@@ -19,6 +18,7 @@ import java.net.URL
1918import java.security.SecureRandom
2019import java.security.cert.CertificateException
2120import java.security.cert.X509Certificate
21+ import javax.net.ssl.HostnameVerifier
2222import javax.net.ssl.HttpsURLConnection
2323import javax.net.ssl.SSLContext
2424import javax.net.ssl.TrustManager
@@ -100,7 +100,7 @@ class CustomCertManagerTest {
100100 fun getSiteCertificates (url : URL ): List <X509Certificate > {
101101 val conn = url.openConnection() as HttpsURLConnection
102102 try {
103- conn.hostnameVerifier = AllowAllHostnameVerifier ()
103+ conn.hostnameVerifier = HostnameVerifier { _, _ -> true }
104104 conn.sslSocketFactory = SSLContext .getInstance(" TLS" ).apply {
105105 init (
106106 null ,
You can’t perform that action at this time.
0 commit comments