我已经阅读了一个相关的问题,但它似乎没有在我看到失败的同一个地方失败.
我正在尝试一个非常简单的操作:
public static void main(String [] argv) {
try {
URL u = new URL("https://membership.usairways.com/Login.aspx");
Object o = u.getContent();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
但是在我的Mac和Windows机器上使用Java 6运行时会遇到handshake_failure.
其他人继续遇到无法找到证书的问题,但调试日志(-Djavax.net.debug=ssl:handshake
)显示找到的证书很好:
keyStore is : keyStore type is : jks keyStore provider is : init keystore init keymanager of type SunX509 trustStore is: C:\Program Files (x86)\Java\jre6\lib\security\cacerts trustStore type is : jks trustStore provider is : init truststore adding as trusted cert: …