
我有一個運行 Centos 6.8 的測試伺服器,在運行 SSL Labs 測試時無法克服此訊息:https://www.ssllabs.com/ssltest/analyze.html?d=biduno.com&latest
此伺服器容易受到 OpenSSL Padding Oracle 漏洞 (CVE-2016-2107) 的影響且不安全。等級設定為 F。
難道和我的密碼有關?
SSLProtocol ALL -SSLv2 -SSLv3 SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:AES256-SHA256:!RC4:高:中:+TLSv1:+TLSv1.1:+TLSv1.2AD!! aNULL:!eNULL:!NULL:!DH:!ADH:!EDH:!AESGCM SSLHonorCipherOrder 上
答案1
嗯,你必須調整協議、密碼和其他一些設定來適應你的口味。您還混合了協議和密碼套件,這可能不好。
這是基本的 SSL/TLS 配置www.cryptopp.com,這是我幫助的一個開源專案。它在 CentOS 7 VM 上運行,並在 Qualsys 測試中獲得“A”。我們都不是 Apache 專家,因此請從表面上理解配置。我們做了足夠的工作,讓用戶不會遇到問題,但也僅止於此。
通常您需要「TLS 1.0 及更高版本」( SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
) 和「現代密碼套件」( SSLCipherSuite HIGH:!aNULL:!kRSA:!MD5:!RC4
) 之類的內容。這!kRSA
意味著“無 RSA 金鑰傳輸”,這實際上留下了 Diffie-Hellman 和前向保密。
此配置也設定 STS 標頭 ( Strict-Transport-Security
)。
# cat /etc/httpd/conf.d/ssl.conf | grep -v '#'
Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost *:443>
SSLEngine on
DocumentRoot "/var/www/html"
ServerName www.cryptopp.com:443
ServerAlias *.cryptopp.com cryptopp.com
ErrorLog logs/error_log
TransferLog logs/access_log
LogLevel warn
SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite HIGH:!aNULL:!kRSA:!MD5:!RC4
SSLCertificateFile /etc/pki/tls/certs/cryptopp-com.chain.pem
SSLCertificateKeyFile /etc/pki/tls/private/cryptopp-com.key.pem
SSLCertificateChainFile /etc/pki/tls/certs/cryptopp-com.chain.pem
SSLVerifyClient none
Header set Strict-Transport-Security "max-age=15552001; includeSubdomains;"
</VirtualHost>
我也猜你是不是使用 OpenSSL 1.1.0。相反,您可能使用的是較舊的 FIPS 版本。以下來自同一個 CetOS 7 VM:
$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
維護者向後移植補丁,所以你所知道的就是(1)你從1.0.1e 左右開始,(2)你並不真正知道你現在擁有什麼,(3)你有一個類似Frekenstein 的裝置,它已經被拼湊在一起。