|
58 | 58 | import org.slf4j.Logger; |
59 | 59 | import org.slf4j.LoggerFactory; |
60 | 60 |
|
61 | | -import javax.net.ssl.KeyManager; |
62 | 61 | import javax.net.ssl.SSLContext; |
63 | 62 | import javax.net.ssl.SSLException; |
64 | | -import javax.net.ssl.TrustManager; |
65 | | -import javax.net.ssl.X509TrustManager; |
66 | 63 | import java.io.IOException; |
67 | 64 | import java.io.InputStream; |
68 | 65 | import java.io.OutputStream; |
|
77 | 74 | import java.net.URL; |
78 | 75 | import java.net.UnknownHostException; |
79 | 76 | import java.nio.charset.StandardCharsets; |
80 | | -import java.security.KeyManagementException; |
81 | 77 | import java.security.NoSuchAlgorithmException; |
82 | | -import java.security.SecureRandom; |
83 | | -import java.security.cert.X509Certificate; |
84 | 78 | import java.util.Base64; |
85 | 79 | import java.util.Collection; |
86 | 80 | import java.util.Collections; |
@@ -834,22 +828,4 @@ public long getTime() { |
834 | 828 | return count > 0 ? runningAverage / count : 0; |
835 | 829 | } |
836 | 830 | } |
837 | | - |
838 | | - private static final class TrustAllManager implements X509TrustManager { |
839 | | - |
840 | | - @Override |
841 | | - public void checkClientTrusted(X509Certificate[] chain, String authType) { |
842 | | - // ignore |
843 | | - } |
844 | | - |
845 | | - @Override |
846 | | - public void checkServerTrusted(X509Certificate[] chain, String authType) { |
847 | | - // ignore |
848 | | - } |
849 | | - |
850 | | - @Override |
851 | | - public X509Certificate[] getAcceptedIssuers() { |
852 | | - return new X509Certificate[0]; |
853 | | - } |
854 | | - } |
855 | 831 | } |
0 commit comments