javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2017-01-06 00:00
791 查看
最近在使用java访问https时候遇到一个错误:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure,经过测试是因为jdk版本导致,使用jdk1.7则无此问题。由于此项目生产环境上使用的版本为jdk1.6,为了项目稳定,避免升级jdk版本带来的大规模测试,经查阅资料找到了不升级版本的解决办法。
网上查阅资料解释说是jdk安全机制导致的访问https会报错,在官网(http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html)下载jar包,替换掉目录 %JAVA_HOME%\jre\lib\security里的local_policy.jar,US_export_policy.jar。
然而按照上述方法不能解决本人遇到的问题,最终查到在jvm启动参数中加入-Dhttps.protocols=SSLv3,TLSv1,即可避免访问https的问题。
网上查阅资料解释说是jdk安全机制导致的访问https会报错,在官网(http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html)下载jar包,替换掉目录 %JAVA_HOME%\jre\lib\security里的local_policy.jar,US_export_policy.jar。
然而按照上述方法不能解决本人遇到的问题,最终查到在jvm启动参数中加入-Dhttps.protocols=SSLv3,TLSv1,即可避免访问https的问题。
相关文章推荐
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 转:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 解决方案
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 解决方案
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- eclipse javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 访问https,抛出的异常javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 使用Java访问https接口javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 处理Https 异常记录 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- ios信息推送 异常 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshak
- XMPP/Smack/Openfire javax.net.ssl.SSLException: Received fatal alert: internal_error
- XMPP/Smack/Openfire javax.net.ssl.SSLException: Received fatal alert: internal_error
- SSLHandshakeException: Received fatal alert: handshake_failure
- XMPP/Smack/Openfire javax.net.ssl.SSLException: Received fatal alert: internal_error