今天正常运行项目的时候,发现java调用SSL的时候,突然一下抛出一个异常,之前都还是好好的。

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.Handshaker.activate(Handshaker.java:529)
at sun.security.ssl.SSLSocketImpl.kickstartHandshake(SSLSocketImpl.java:1492)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1361)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
经过一阵瞎搞,最后才发现是因为jdk1.8版本导致SSL调用权限上有问题。

解决办法:找到jdk 1.8安装目录,找到C:\Program Files\Java\jre里面的lib\security 下面有个java.security。找到对应的SSLv3,删除掉,重启项目就好了。(删掉SSLv3就是允许SSL调用)

Java调用ssl异常,javax.net.ssl.SSLHandshakeException: No appropriate protocol

 

 


————————————————
版权声明:本文为CSDN博主「IT贱男」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_38111957/article/details/80577688

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2021-12-31
  • 2021-12-19
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-09-29
相关资源
相似解决方案