跳过正文
  1. Blogs/

Oneinstack 手动修复 OpenSSL OCSP

·827 字·2 分钟· ·
代码 Oneinstack-Repair-Openssl-Ocsp Oneinstack Nginx Openssl Ocsp
作者
大大的小蜗牛
机会总是垂青于有准备的人!
目录

参考:
http://security.360.cn/cve/CVE-2016-6304/CN.html
https://www.openssl.org/news/secadv/20160922.txt

目前 “Oneinstack”、“LNMP 一键包” 默认的 OpenSSL 版本都不是最新版,修复此漏洞需要重新编译。

Oneinstack 不要用 openssl version 查看版本号,要用 nginx -V 查看版本号。

1、查看 nginx

nginx -V

查看 nginx 版本和 openssl 版本,顺便复制 configure arguments 后面的全部内容,比如我的是:

–prefix=/usr/local/nginx –user=www –group=www –with-http_stub_status_module –with-http_v2_module –with-http_ssl_module –with-ipv6 –with-http_gzip_static_module –with-http_realip_module –with-http_flv_module –with-openssl=../openssl-1.0.2h –with-pcre=../pcre-8.39 –with-pcre-jit –with-ld-opt=-ljemalloc

2、下载源码

cd ~/oneinstack/src

下载对应的 nginx:

wget http://mirrors.linuxeye.com/oneinstack/src/nginx-1.10.1.tar.gz

下载对应的 openssl:

wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz 

(所有版本在这里 https://www.openssl.org/source/

3、解压:

tar xzvf openssl-1.0.2j.tar.gz
tar xzvf nginx-1.10.1.tar.gz

4、编译 nginx:

cd nginx-1.10.1
./configure –prefix=/usr/local/nginx –user=www –group=www –with-http_stub_status_module –with-http_v2_module –with-http_ssl_module –with-ipv6 –with-http_gzip_static_module –with-http_realip_module –with-http_flv_module –with-openssl=../openssl-1.0.2j –with-pcre=../pcre-8.39 –with-pcre-jit –with-ld-opt=-ljemalloc

(主要修改 –with-openssl=../openssl-1.0.2j,其他不变)

make
mv /usr/local/nginx/sbin/nginx {,_`date +% m% d`} #备份现有 nginx
cp objs/nginx/usr/local/nginx/sbin/ #更新 nginx
service nginx restart #重启 nginx

相关文章

Oneinstack Nginx 反代 Google
·382 字·1 分钟
代码 Oneinstack-Nginx-Google Google Oneinstack Nginx Proxy
Web 版 SSH Gateone
·608 字·2 分钟
代码 Gateone Nginx Gateone Ssh Web Shell
Shutter 中文乱码问题
·102 字·1 分钟
代码 Shutter-Chinese-Garbled 中文 Shutter 乱码

加载Giscus评论,或者