aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_cipher.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-08-06 13:04:25 +0200
committerIngela Anderton Andin <[email protected]>2018-08-06 14:35:26 +0200
commit1e82b6329a8b53467453aba1ec52309094ab489d (patch)
treecd1d637cd03f523e7526942be01816994da9b3cd /lib/ssl/src/ssl_cipher.erl
parent757057b32f60fc1626af9593b49975f40fcceefd (diff)
downloadotp-1e82b6329a8b53467453aba1ec52309094ab489d.tar.gz
otp-1e82b6329a8b53467453aba1ec52309094ab489d.tar.bz2
otp-1e82b6329a8b53467453aba1ec52309094ab489d.zip
ssl: Make sure that a correct cipher suite is selected
The keyexchange ECDHE-RSA requires an RSA-keyed server cert (corresponding for ECDHE-ECDSA), the code did not assert this resulting in that a incorrect cipher suite could be selected. Alas test code was also wrong hiding the error.
Diffstat (limited to 'lib/ssl/src/ssl_cipher.erl')
-rw-r--r--lib/ssl/src/ssl_cipher.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index 40d974f6a5..aa453fe3f1 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -2555,6 +2555,8 @@ ecdsa_signed_suites(Ciphers, Version) ->
rsa_keyed(dhe_rsa) ->
true;
+rsa_keyed(ecdhe_rsa) ->
+ true;
rsa_keyed(rsa) ->
true;
rsa_keyed(rsa_psk) ->
@@ -2618,6 +2620,8 @@ ec_keyed(ecdh_ecdsa) ->
true;
ec_keyed(ecdh_rsa) ->
true;
+ec_keyed(ecdhe_ecdsa) ->
+ true;
ec_keyed(_) ->
false.