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