We are having issues with SSL cipher suites on a Windows installation of RabbitMQ/Erlang. All the connections to the RabbitMQ server (Linux and Windows clients) only get "tlsv1.2 rsa aes_256_cbc sha256" for the SSL connection. They should be using a ecdhe_* or dhe_* cipher instead which is way more secure. For some reason it only uses simple rsa cipher suites although the other ones are .
This issue doesn't happen with a Linux RabbitMQ server that is using the exact same configuration (I actually got this configuration from the Linux one).
The ssl_options part of the rabbitmq.conf looks like this:
{cacertfile,"C:\\Program Files (x86)\Application\\ssl\\..\\RabbitMQ\\Data\\ssl\\cacert.pem"},
{certfile,"C:\\Program Files (x86)\\Application\\ssl\\..\\RabbitMQ\\Data\\ssl\\cert.pem"},
{keyfile,"C:\\Program Files (x86)\\Application\\ssl\\..\\RabbitMQ\\Data\\ssl\\key.pem"},
{verify,verify_none},
{fail_if_no_peer_cert,false},
{ciphers,[
{ecdhe_ecdsa,aes_256_cbc,sha384},
{ecdhe_rsa,aes_256_cbc,sha384},
{ecdh_ecdsa,aes_256_cbc,sha384},
{ecdh_rsa,aes_256_cbc,sha384},
{dhe_rsa,aes_256_cbc,sha256},
{dhe_dss,aes_256_cbc,sha256},
{rsa,aes_256_cbc,sha256},
{ecdhe_ecdsa,aes_128_cbc,sha256},
{ecdhe_rsa,aes_128_cbc,sha256},
{ecdh_ecdsa,aes_128_cbc,sha256},
{ecdh_rsa,aes_128_cbc,sha256},
{dhe_rsa,aes_128_cbc,sha256},
{dhe_dss,aes_128_cbc,sha256},
{rsa,aes_128_cbc,sha256},
{dhe_rsa,aes_256_cbc,sha},
{rsa,aes_128_cbc,sha}]},
{client_renegotiation, false},
{versions, ['tlsv1.2', 'tlsv1.1']},
{honor_cipher_order, true}
cipher_suites/0 lists this:
9> ssl:cipher_suites().
[{ecdhe_ecdsa,aes_256_cbc,sha384},
{ecdhe_rsa,aes_256_cbc,sha384},
{ecdh_ecdsa,aes_256_cbc,sha384},
{ecdh_rsa,aes_256_cbc,sha384},
{dhe_rsa,aes_256_cbc,sha256},
{dhe_dss,aes_256_cbc,sha256},
{rsa,aes_256_cbc,sha256},
{ecdhe_ecdsa,aes_128_cbc,sha256},
{ecdhe_rsa,aes_128_cbc,sha256},
{ecdh_ecdsa,aes_128_cbc,sha256},
{ecdh_rsa,aes_128_cbc,sha256},
{dhe_rsa,aes_128_cbc,sha256},
{dhe_dss,aes_128_cbc,sha256},
{rsa,aes_128_cbc,sha256},
{ecdhe_ecdsa,aes_256_cbc,sha},
{ecdhe_rsa,aes_256_cbc,sha},
{dhe_rsa,aes_256_cbc,sha},
{dhe_dss,aes_256_cbc,sha},
{ecdh_ecdsa,aes_256_cbc,sha},
{ecdh_rsa,aes_256_cbc,sha},
{rsa,aes_256_cbc,sha},
{ecdhe_ecdsa,'3des_ede_cbc',sha},
{ecdhe_rsa,'3des_ede_cbc',sha},
{dhe_rsa,'3des_ede_cbc',sha},
{dhe_dss,'3des_ede_cbc',sha},
{ecdh_ecdsa,'3des_ede_cbc',sha},
{ecdh_rsa,'3des_ede_cbc',...},
{rsa,...},
{...}|...]
Using sslyze shows this:
* TLSV1_2 Cipher Suites:
Preferred:
TLS_RSA_WITH_AES_256_CBC_SHA256 - 256 bits
Accepted:
TLS_RSA_WITH_AES_256_CBC_SHA256 - 256 bits
TLS_RSA_WITH_AES_128_CBC_SHA256 - 128 bits
TLS_RSA_WITH_AES_128_CBC_SHA - 128 bits
For the Linux server sslyze shows this (although there's a weird error with one cipher which doesn't happen with other servers using SSL like httpd):
* TLSV1_2 Cipher Suites:
Preferred:
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 ECDH-256 bits 256 bits
Accepted:
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 ECDH-256 bits 256 bits
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 DH-1024 bits 256 bits
TLS_DHE_RSA_WITH_AES_256_CBC_SHA DH-1024 bits 256 bits
TLS_RSA_WITH_AES_256_CBC_SHA256 - 256 bits
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 ECDH-256 bits 128 bits
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 DH-1024 bits 128 bits
TLS_RSA_WITH_AES_128_CBC_SHA256 - 128 bits
TLS_RSA_WITH_AES_128_CBC_SHA - 128 bits
Undefined - An unexpected error happened:
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 OpenSSLError -
error:1409017F:SSL routines:ssl3_get_server_certificate:wrong certificate type
I also think there's a small error in the documentation on
https://www.rabbitmq.com/ssl.html since it says you should call "ssl:cipher_suites(openssl)." to get a list of all supported cipher suites, but that returns the ciphers in the wrong format. It should just be the call without any parameter.