jdk1.7访问https报javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure问题解决
本地jdk版本java version "1.8.0_31",代码中已对https做了相应处理:信任所有来源证书,运行正常;上包到服务器(服务器jdk版本java version "1.7.0_80"),报以下ssl异常
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
解决方案:
更换jdk中jce的jar包
网上资料说这个应该是旧版本jdkjce中安全机制的bug,要去oracle官网下载对应的jce包替换jdk中的jce包
jce所在jdk的路径: %JAVA_HOME%\jre\lib\security里的local_policy.jar,US_export_policy.jar
JDK7 http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
JDK8 http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
云盘:https://pan.baidu.com/s/1Klr3MS8yhpEnlj7nYM1OYw
jdk1.7访问https报javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure问题解决的更多相关文章
- SoapUI 请求 https 报 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
在 E:\ProgramFiles\SmartBear\SoapUI-Pro-5.1.2\bin\SoapUI-Pro-5.1.2.vmoptions 中添加一行代码,代码如下: -Dsoapui.h ...
- 转:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 解决方案
转:javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 解决方案javax.net.ssl.SSL ...
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 解决方案
这个是jdk导致的,jdk里面有一个jce的包,安全性机制导致的访问https会报错,官网上有替代的jar包,换掉就好了 目录 %JAVA_HOME%\jre\lib\security里的local_ ...
- 处理Https 异常记录 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
http://blog.csdn.net/baidu_18607183/article/details/51595330 https://blogs.oracle.com/java-platform- ...
- javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
SSL握手失败:用JDK1.8做发邮件的功能遇到这种问题处理方式是:将目录 %JAVA_HOME%\...\jre\lib\security里的local_policy.jar,US_export_p ...
- SSL异常javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
jdk 7 http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html jdk 8 http: ...
- JAVA连接MySQ报错:Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version at sun.security.ssl.Al ...
- SO2O連接報錯javax.net.ssl.SSLException: Received fatal alert: protocol_version)
原文:https://blog.csdn.net/gudejundd/article/details/89640741 1.什么是TLSSSL 是“Secure Sockets Layer”的缩写,中 ...
- 解决:pycharm连接github报错 Can't login: Received fatal alert: protocol_version
如图1,进行测试连接的时候报错了 知乎的一位网友给了答案,详情参见知乎pycharm连接github报错,如何解决? "" Github 最近升级过协议,可能是你的 JRE 或者 ...
随机推荐
- tbnet编译
下载tbnet 下载地址:http://code.taobao.org/p/tb-common-utils/src/trunk/tbnet/ ,它的svn地址为:http://code.taobao. ...
- union共用体的对齐
union DATE { char a; ]; double b; }; DATE max; cout<< sizeof(max) << endl; 这个问题很好回答,并且我把 ...
- php的ord函数——解决中文字符截断问题
php的ord函数——解决中文字符截断问题 分类: PHP2014-11-26 12:11 1033人阅读 评论(0) 收藏 举报 utf8字符截取 函数是这样定义的: int ord ( strin ...
- 孙源即将分享 DynamicCocoa 实现细节
孙源即将分享 DynamicCocoa 实现细节 我的公众号之前发的一文中提到滴滴做了一个很牛逼的动态化方案 DynamicCocoa.该方案设计得非常精巧,解决了两种不同的语言在代码上如何等价生 ...
- oracle中空值null的判断和转换:NVL的用法
1.NULL空值概念 数据库里有一个很重要的概念:空值即NULL.有时表中,更确切的说是某些字段值,可能会出现空值, 这是因为这个数据不知道是什么值或根本就不存在. 2.NULL空值判断 空值不等同于 ...
- NSString (NSStringPathExtensions)
转自:http://linwwwei.iteye.com/blog/1407520 + (NSString *)pathWithComponents(NSArray *)components 根据co ...
- mr中间结果优化
转载请注明出处:http://blog.csdn.net/lastsweetop/article/details/9187721 作为输入 当压缩文件做为mapreduce的输入时,mapreduce ...
- PHP——数组和数据结构
<body> <?php $arr[0]=5;//赋值定义 $arr[1]="aa"; print_r($arr); echo "<br /> ...
- HTML5关于上传API的一些使用(上)
HTML5提供了很多有用的API,其中就包括上传的API,XMLHttpRequest2.0,在HTML5时代之前,需要进行二进制的上传一般都会才用flash的方案,但是当XMLHttpRequest ...
- IOS 中微信 网页授权报 key[也就是code]失效 解决办法
枪魂微信平台ios手机点击返回 网页授权失败,报key失效.已经解决,原因是授权key只能使用一次,再次使用就会失效. 解决办法:第一次从菜单中进行授权时,用session记录key和open_id. ...