我正在尝试配置我的 Debian 盒子并mod_gnutls
实现(为了 SNI),以获得最佳结果TLSv1.0/1.1/1.2
(不考虑 SSL2 和 SSL3)
然而在我看来,在 中使用ECDHE-ECDSA
/是不可能的,而可以使用ECDHE-RSA
mod_gnutls
gnutls-cli
+ECDHE-RSA:+ECDHE-ECDSA
触发GnuTLSPriorities
错误Syntax error parsing priorities string at ...
我当前的配置行:
GnuTLSPriorities NONE:+SHA512:+SHA384:+SHA256:+DHE-RSA:+DHE-PSK:
+DHE-DSS:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:
+VERS-TLS1.1:+VERS-TLS1.0:+COMP-NULL:+SHA1:+SIGN-ALL
其中输出nmap
> nmap --script ssl-enum-ciphers -p 443 www.mydomain.tld
Starting Nmap 6.47 ( http://nmap.org ) at 2014-10-27 00:55 CET
Nmap scan report for www.mydomain.tld (46.249.37.143)
Host is up (0.046s latency).
rDNS record for 46.249.37.143: lampicka.cz
PORT STATE SERVICE
443/tcp open https
| ssl-enum-ciphers:
| TLSv1.0:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_256_CBC_SHA - strong
| compressors:
| NULL
| TLSv1.1:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_256_CBC_SHA - strong
| compressors:
| NULL
| TLSv1.2:
| ciphers:
| TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - strong
| TLS_DHE_RSA_WITH_AES_256_CBC_SHA - strong
| TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - strong
| compressors:
| NULL
gnutls-cli
当给定附加配置时,输出+ECDHE-RSA:+ECDHE-ECDSA
> gnutls-cli -l --priority "NONE:+SHA512:+SHA384:+SHA256:+DHE-RSA:+DHE-PSK:+DHE-DSS:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0:+COMP-NULL:+SHA1:+SIGN-ALL:+ECDHE-RSA:+ECDHE-ECDSA"
Cipher suites for NONE:+SHA512:+SHA384:+SHA256:+DHE-RSA:+DHE-PSK:+DHE-DSS:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0:+COMP-NULL:+SHA1:+SIGN-ALL:+ECDHE-RSA:+ECDHE-ECDSA
TLS_DHE_RSA_AES_256_CBC_SHA256 0x00, 0x6b TLS1.0
TLS_DHE_RSA_AES_256_CBC_SHA1 0x00, 0x39 SSL3.0
TLS_DHE_RSA_AES_128_CBC_SHA256 0x00, 0x67 TLS1.0
TLS_DHE_RSA_AES_128_CBC_SHA1 0x00, 0x33 SSL3.0
TLS_DHE_RSA_3DES_EDE_CBC_SHA1 0x00, 0x16 SSL3.0
TLS_DHE_PSK_AES_256_CBC_SHA384 0x00, 0xb3 TLS1.0
TLS_DHE_PSK_AES_256_CBC_SHA1 0x00, 0x91 SSL3.0
TLS_DHE_PSK_AES_128_CBC_SHA256 0x00, 0xb2 TLS1.0
TLS_DHE_PSK_AES_128_CBC_SHA1 0x00, 0x90 SSL3.0
TLS_DHE_PSK_3DES_EDE_CBC_SHA1 0x00, 0x8f SSL3.0
TLS_DHE_DSS_AES_256_CBC_SHA256 0x00, 0x6a TLS1.0
TLS_DHE_DSS_AES_256_CBC_SHA1 0x00, 0x38 SSL3.0
TLS_DHE_DSS_AES_128_CBC_SHA256 0x00, 0x40 TLS1.0
TLS_DHE_DSS_AES_128_CBC_SHA1 0x00, 0x32 SSL3.0
TLS_DHE_DSS_3DES_EDE_CBC_SHA1 0x00, 0x13 SSL3.0
TLS_ECDHE_RSA_AES_256_CBC_SHA384 0xc0, 0x28 TLS1.0
TLS_ECDHE_RSA_AES_256_CBC_SHA1 0xc0, 0x14 SSL3.0
TLS_ECDHE_RSA_AES_128_CBC_SHA256 0xc0, 0x27 TLS1.0
TLS_ECDHE_RSA_AES_128_CBC_SHA1 0xc0, 0x13 SSL3.0
TLS_ECDHE_RSA_3DES_EDE_CBC_SHA1 0xc0, 0x12 SSL3.0
TLS_ECDHE_ECDSA_AES_256_CBC_SHA384 0xc0, 0x24 TLS1.0
TLS_ECDHE_ECDSA_AES_256_CBC_SHA1 0xc0, 0x0a SSL3.0
TLS_ECDHE_ECDSA_AES_128_CBC_SHA256 0xc0, 0x23 TLS1.0
TLS_ECDHE_ECDSA_AES_128_CBC_SHA1 0xc0, 0x09 SSL3.0
TLS_ECDHE_ECDSA_3DES_EDE_CBC_SHA1 0xc0, 0x08 SSL3.0
Certificate types: none
Protocols: VERS-TLS1.2, VERS-TLS1.1, VERS-TLS1.0
Compression: COMP-NULL
Elliptic curves: none
PK-signatures: SIGN-RSA-SHA256, SIGN-DSA-SHA256, SIGN-ECDSA-SHA256, SIGN-RSA-SHA384, SIGN-ECDSA-SHA384, SIGN-RSA-SHA512, SIGN-ECDSA-SHA512, SIGN-RSA-SHA224, SIGN-DSA-SHA224, SIGN-ECDSA-SHA224, SIGN-RSA-SHA1, SIGN-DSA-SHA1, SIGN-ECDSA-SHA1
我的软件版本是:
- libapache2-修改-gnutls
- 0.5.10-1.1
- 阿帕奇2
- 2.2.22-13+deb7u3
- gnutls-bin
- 3.3.8-3
答案1
嗯,原来是libapache2-mod-gnutls
版本问题。
版本0.5.X
与 链接libgnutls26
,不包含这些密码
版本0.6.X
与 链接libgnutls28
,包含 ECDHE-RSA/ECDHE-ECDSA
所以解决方案有两个:
- 升级到 libapache2-mod-gnutls 的新版本,需要
Apache 2.4
- 使用 Apache 2.2 版本中包含的 OpenSSL,并进行适当配置
libapache2-mod-gnutls 的有效配置是:
GnuTLSPriorities NONE:+SHA512:+SHA384:+SHA256:+ECDHE-RSA:+ECDHE-ECDSA:+DHE-RSA:+DHE-PSK:
+DHE-DSS:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:
+VERS-TLS1.1:+VERS-TLS1.0:+COMP-NULL:+SHA1:+SIGN-ALL
apache2(openssl)的有效配置是:
SSLCipherSuite ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:RC4-RSA:HIGH:!MD5:!aNULL
SSLHonorCipherOrder on
SSLCompression off
SSLProtocol all -SSLv2 -SSLv3
Header add Strict-Transport-Security "max-age=15768000"