部署https後訪問提存在安全隱患NET::ERR_SSL_OBSOLETE_VERSION
發佈時間:2020-07-28
部署https後訪問域名出現如下提示:
您的連接存在安全隱患
此網站使用的安全性配置已過時,這可能會導致您的信息(例如密碼、消息或信用卡卡號)在發送至此網站的過程中遭到洩露。
NET::ERR_SSL_OBSOLETE_VERSION
原因是服務器openssl版本過低,較新版本的瀏覽器會提示不安全,
openssl version -a可查看openssl版本
Openssl 1.0.0h支持SSLv2,SSLv3和 TLSv1.0
Openssl 1.0.1添加了對TLSv1.1和TLSv1.2的支持
Openssl 1.1.1開始支持TLS1.3
舊版(openssl1.0.2|openssh7.5)升級參看https://www.west.cn/faq/list.asp?unid=1754
升級openssl-1.1.1
cd /usr/local/src wget -c https://www.openssl.org/source/openssl-1.1.1g.tar.gz tar zxvf openssl-1.1.1g.tar.gz cd openssl-1.1.1g ./config --prefix=/usr --shared make -j4 && make install openssl version -a
升級openssh8.3p1
cd /usr/local/src mv /etc/ssh /etc/ssh.bak yum install -y pam-devel wget -c https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gz tar zxvf openssh-8.3p1.tar.gz cd openssh-8.3p1 ./configure --sbindir=/usr/sbin/ --bindir=/usr/bin/ --sysconfdir=/etc/ssh --with-ssl-engine --with-pam make -j4 && make install echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config echo 'Port 22000' >>/etc/ssh/sshd_config cp -a contrib/redhat/sshd.init /etc/init.d/sshd cp -a contrib/redhat/sshd.pam /etc/pam.d/sshd.pam chmod +x /etc/init.d/sshd chkconfig --add sshd chkconfig sshd on service sshd restart
centos7: mv /usr/lib/systemd/system/sshd.service /tmp
systemctl enable sshd
centos7: systemctl restart sshd.service

注意: 如果nginx編譯時指定了自定義openssl路徑,則還需要重新編譯nginx

