升级Ubuntu 14.04的OpenSSL

升级Ubuntu 14.04的OpenSSL

博客迁移到DO的vps上,顺便就把https给上了,上完https就到https://www.ssllabs.com/ssltest/测试一下ssl是否足够健壮,结果只得了个F,如图:

OpenSSL Padding Oracle vulnerability (CVE-2016-2107)

关于OpenSSL Padding Oracle vulnerability (CVE-2016-2107)漏洞的信息可以查看:https://blog.cloudflare.com/yet-another-padding-oracle-in-openssl-cbc-ciphersuites/

知道是OpenSSL的问题那就直接升级

Shell

$ sudo apt-get update$ sudo apt-get dist-upgrade$ wget ftp://ftp.openssl.org/source/openssl-1.0.2h.tar.gz$ tar -xvzf openssl-1.0.2h.tar.gz$ cd openssl-1.0.2h$ ./config –prefix=/usr/$ make depend$ sudo make install$ openssl version# OpenSSL 1.0.2h  3 May 2016# 重启nginx$ sudo service nginx restart# 重新检测 https://www.ssllabs.com/ssltest/
ssltest

在配置ssl的时候除了OpenSSL漏洞之外,配置合适的ssl_ciphers能让你的加密更加强壮,更不易于被劫持,相关的配置可以参考:https://cipherli.st/

另外,要让nginx支持http2,需要OpenSSL 1.0.2+,nginx 1.9.5+,所以升级OpenSSL到1.0.2之后,可以继续升级nginx到1.9.5+,使得nginx可以支持http2,让你的网站速度更快起来,升级方法:https://by-example.org/install-nginx-with-http2-support-on-ubuntu-14-04-lts/,官方配置说明:http://nginx.org/en/docs/http/ngx_http_v2_module.html友情提醒,记得备份nginx配置

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *