我正在如下代码中使用它。但无法理解它的用途。
URL url = new URL("https://expired.badssl.com/");//https://revoked.grc.com/
HttpsURLConnection urlConnection = (HttpsURLConnection)url.openConnection();
urlConnection.setHostnameVerifier(connection.getHostnameVerifier());
urlConnection.setSSLSocketFactory(connection.getSSLContext().getSocketFactory();
LineNumberReader lnr =
new LineNumberReader(new InputStreamReader(urlConnection.getInputStream()));
String line;
while (null != (line = lnr.readLine()))
System.out.println(line);
答案 0 :(得分:1)
https://expired.badssl.com/
具有过期的SSL证书,用于测试在连接某些网站时可能遇到过期证书的极端情况。
您可以找到更多@ @ https://github.com/chromium/badssl.com
它提供其他子域为
self-signed.badssl.com
测试与自签名证书相关的边缘情况
mixed.badssl.com
等