尝试获取https链接的响应时出现此异常
javax.net.ssl.SSLHandshakeException:无法验证SSL证书:https:// [... link ...]
以下是我使用的代码。我做错了什么?
URL productsURL = new URL(link + authenticationExtension);
URLConnection connection = productsURL.openConnection();
connection.setRequestProperty("Authorization", "Basic " + userNamePasswordB64);
connection.connect();
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));