diff options
author | Péter Dimitrov <[email protected]> | 2019-06-17 10:16:18 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2019-06-17 10:16:18 +0200 |
commit | de4f99fb7bfb8197ed18033a0d8c43b1ba4fd262 (patch) | |
tree | 2df3860309aff4e827bee1bad37235c4add27265 /lib/ssl/src/ssl_cipher.erl | |
parent | 59ffbeaa3c9920dc0b45c0c81c18b882b78cb939 (diff) | |
parent | 12ffab821bd9144d9f85bc6cbde25412b8912d64 (diff) | |
download | otp-de4f99fb7bfb8197ed18033a0d8c43b1ba4fd262.tar.gz otp-de4f99fb7bfb8197ed18033a0d8c43b1ba4fd262.tar.bz2 otp-de4f99fb7bfb8197ed18033a0d8c43b1ba4fd262.zip |
Merge branch 'maint'
* maint:
ssl: Add interop test
ssl: Improve handling of signature algorithms
Diffstat (limited to 'lib/ssl/src/ssl_cipher.erl')
-rw-r--r-- | lib/ssl/src/ssl_cipher.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl index 21db887bb5..4da50d2af8 100644 --- a/lib/ssl/src/ssl_cipher.erl +++ b/lib/ssl/src/ssl_cipher.erl @@ -923,6 +923,12 @@ signature_scheme(rsa_pss_pss_sha384) -> ?RSA_PSS_PSS_SHA384; signature_scheme(rsa_pss_pss_sha512) -> ?RSA_PSS_PSS_SHA512; signature_scheme(rsa_pkcs1_sha1) -> ?RSA_PKCS1_SHA1; signature_scheme(ecdsa_sha1) -> ?ECDSA_SHA1; +%% Handling legacy signature algorithms +signature_scheme({Hash0, Sign0}) -> + Hash = hash_algorithm(Hash0), + Sign = sign_algorithm(Sign0), + <<?UINT16(SigAlg)>> = <<?BYTE(Hash),?BYTE(Sign)>>, + SigAlg; signature_scheme(?RSA_PKCS1_SHA256) -> rsa_pkcs1_sha256; signature_scheme(?RSA_PKCS1_SHA384) -> rsa_pkcs1_sha384; signature_scheme(?RSA_PKCS1_SHA512) -> rsa_pkcs1_sha512; @@ -962,7 +968,9 @@ scheme_to_components(rsa_pss_pss_sha256) -> {sha256, rsa_pss_pss, undefined}; scheme_to_components(rsa_pss_pss_sha384) -> {sha384, rsa_pss_pss, undefined}; scheme_to_components(rsa_pss_pss_sha512) -> {sha512, rsa_pss_pss, undefined}; scheme_to_components(rsa_pkcs1_sha1) -> {sha1, rsa_pkcs1, undefined}; -scheme_to_components(ecdsa_sha1) -> {sha1, ecdsa, undefined}. +scheme_to_components(ecdsa_sha1) -> {sha1, ecdsa, undefined}; +%% Handling legacy signature algorithms +scheme_to_components({Hash,Sign}) -> {Hash, Sign, undefined}. %% TODO: Add support for EC and RSA-SSA signatures |