summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schultz <aschultz@tpip.net>2012-10-12 14:58:11 +0200
committerAndreas Schultz <aschultz@tpip.net>2013-02-27 19:24:13 +0100
commit0e4e6cfc4e3cb0b28598ca9a9db5e6a896027435 (patch)
treeb2b5221afc6ca78552d7b801e7b3a594305fdccd
parent8e691d30faa63013295c1903a0fffd56ce7daa04 (diff)
downloaderlang-0e4e6cfc4e3cb0b28598ca9a9db5e6a896027435.tar.gz
SSL: enable hash_size values for sha224, sha384 and sha512
Some of the PSK and SRP ciphers default to sha384, this enables hash_size for that cipher. It also adds sha512 and sha224 to be prepared for further cipher enhancements.
-rw-r--r--lib/ssl/src/ssl_cipher.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index ad3f91f299..e3231effd4 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -852,14 +852,14 @@ hash_size(md5) ->
16;
hash_size(sha) ->
20;
+hash_size(sha224) ->
+ 28;
hash_size(sha256) ->
- 32.
-%% Currently no supported cipher suites defaults to sha384 or sha512
-%% so these clauses are not needed at the moment.
-%% hash_size(sha384) ->
-%% 48;
-%% hash_size(sha512) ->
-%% 64.
+ 32;
+hash_size(sha384) ->
+ 48;
+hash_size(sha512) ->
+ 64.
%% RFC 5246: 6.2.3.2. CBC Block Cipher
%%