zoukankan      html  css  js  c++  java
  • java 11.0.11 报SSL错误

    Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
         at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:170) ~[?:?]
         at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98) ~[?:?]
         at sun.security.ssl.TransportContext.kickstart(TransportContext.java:238) ~[?:?]
         at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:394) ~[?:?]
         at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:373) ~[?:?]
         at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:336) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:99) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:325) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:164) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1342) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.NativeSession.connect(NativeSession.java:157) ~[mysql-connector-java-8.0.20.jar:8.0.20]
         at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:850) ~[mysql-connector-java-8.0.20.jar:8.0.20]




    原因: 配置文件中禁用 TLSv1, TLSv1.1


    解决方法:

      ..Javajdk-11.0.11confsecurity


    将 :

    jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA,
         DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL,
         include jdk.disabled.namedCurves


    替换为:

    jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA,
         DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL,
         include jdk.disabled.namedCurves
  • 相关阅读:
    Django的路由系统
    Django的View(视图)
    Django模板语言相关内容
    pip国内镜像
    TestNG 入门教程
    Spring MVC
    Git:代码冲突常见解决方法
    运行Maven项目时出现invalid LOC header (bad signature)错误,Tomcat不能正常启动
    annotation(@Retention@Target)详解
    JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
  • 原文地址:https://www.cnblogs.com/zbw911/p/14873951.html
Copyright © 2011-2022 走看看