0
我有java代码是这样的:检查证书是否有效与否
URL url = new URL(endPoint);
String encoding = Base64.encodeBase64String(this.key.getBytes());
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
被打开SSL连接。可以说endPoint
确实使用了自签证书并充当原始网站。是否有可能在java代码中防止这些东西?
在此先感谢。
感谢您的信息。 。 。但是我得到这样的错误'方法getServerCertificates()未定义类型HttpsURLConnection' – sriram