• 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
  • 相关阅读:
    [前端插件]Bootstrap Table服务器分页与在线编辑应用总结
    Accord.NET_Naive Bayes Classifier
    Accord.NET入门
    [C++]STL容器Vector的内存释放
    [设计模式]适配器模式与外观模式
    [设计模式]工厂模式
    Linux下spi驱动开发
    Qt移植对USB鼠标键盘、触摸屏的支持
    linux设备模型详解 http://blog.csdn.net/linux_xiaomugua/article/details/6989386
    LGPL协议的理解
  • 原文地址:https://www.cnblogs.com/zbw911/p/14873951.html
Copyright © 2020-2023  润新知