![如何在 nginx Debian squeeze 上啟用 TLSv1.1 和 TLSv1.2?](https://rvso.com/image/617814/%E5%A6%82%E4%BD%95%E5%9C%A8%20nginx%20Debian%20squeeze%20%E4%B8%8A%E5%95%9F%E7%94%A8%20TLSv1.1%20%E5%92%8C%20TLSv1.2%EF%BC%9F.png)
為了安全起見,我必須使用 TLSv1.1 或 TLS v1.2 設定 nginx 伺服器。預設情況下,nginx 配置 TLSv1。
閱讀文件我發現 nginx 必須設定以下指令:
ssl_protocols TLSv1.1 TLSv1.2;
http://nginx.org/en/docs/http/configuring_https_servers.html
但是當我運行命令時:
# /etc/init.d/nginx configtest
出現以下訊息:
Testing nginx configuration: [warn]: invalid value "TLSv1.1" in /etc/nginx/nginx.conf: 175 configuration file /etc/nginx/nginx.conf test failed
文檔是謊言嗎?
平台是 Debian Squeeze,nginx 版本是 0.7.67
謝謝
答案1
根據 archive.org (http://web.archive.org/web/20120116033748/http://nginx.org/en/docs/http/configuring_https_servers.html) TLSv1.2 支援是在 2012 年 1 月到 2 月之間添加的。
您可能想使用 nginx 1.2 的向後移植(http://packages.debian.org/search?keywords=nginx)而且您幾乎肯定想考慮升級作業系統:P
答案2
openssl@squeeze 是:OpenSSL 0.9.8o 01 Jun 2010
,但你需要 1.0.1x,所以你需要下載 openssl-sources 並告訴 nginx@compile-time 使用哪個版本:
./configure ... --with-http_ssl_module \
--with-openssl=/path/to/openssl_source/ ...
我不建議從向後移植等更新系統的 openssl 軟體包。