Skip to content

Commit

Permalink
Do not crash on unknown hash and signature algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
zinid committed Jun 5, 2015
1 parent 21b8941 commit dd32dd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ssl/src/ssl_cipher.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,8 @@ hash_algorithm(?SHA) -> sha;
hash_algorithm(?SHA224) -> sha224;
hash_algorithm(?SHA256) -> sha256;
hash_algorithm(?SHA384) -> sha384;
hash_algorithm(?SHA512) -> sha512.
hash_algorithm(?SHA512) -> sha512;
hash_algorithm(_) -> null.

sign_algorithm(anon) -> ?ANON;
sign_algorithm(rsa) -> ?RSA;
Expand All @@ -1218,7 +1219,8 @@ sign_algorithm(ecdsa) -> ?ECDSA;
sign_algorithm(?ANON) -> anon;
sign_algorithm(?RSA) -> rsa;
sign_algorithm(?DSA) -> dsa;
sign_algorithm(?ECDSA) -> ecdsa.
sign_algorithm(?ECDSA) -> ecdsa;
sign_algorithm(_) -> anon.

hash_size(null) ->
0;
Expand Down

0 comments on commit dd32dd8

Please sign in to comment.