Ubuntu 20.04 出現 SSL_connect: error:1425F102 .. unsupported protocol問題的解決


在安裝完Ubuntu 20.04后, 這個問題影響了好幾個軟件, 包括MySQL Workbench, Openfortigui等等, 出現的錯誤都是

ERROR:  SSL_connect: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol

在MySQL Workbench里可以將連接參數Use SSL從If available設為No 避免這個問題, 但是在其他軟件里就不行了.

這個錯誤在19.xx時並不存在, 其原因是在Ubuntu 20.04 中, OpenSSL升級到了1.1.1f, 將TLS最低版本設置為了1.2

https://launchpad.net/ubuntu/+source/openssl/+changelog

- Set OPENSSL_TLS_SECURITY_LEVEL=2 as compiled-in minimum security level. Change meaning of SECURITY_LEVEL=2 to prohibit TLS versions below 1.2 and update documentation. Previous default of 1, can be set by calling SSL_CTX_set_security_level(), SSL_set_security_level() or using ':@SECLEVEL=1' CipherString value in openssl.cfg.

解決問題的最好辦法當然是升級服務器的TLS版本到1.2, 對於無法升級服務器的, 只能降低OpenSSL的TLS版本要求

在Ubuntu 20.04上的修改為, 打開 /etc/ssl/openssl.cnf , 找到這行

oid_section             = new_oids

 在這行下面緊接着添加下面幾句

openssl_conf = default_conf

[default_conf]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
MinProtocol = TLSv1.1
CipherString = DEFAULT@SECLEVEL=1

 然后關閉MySQL Workbench應用再重新打開, 就可以連接了.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM