aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_ssl3.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssl/src/ssl_ssl3.erl')
-rw-r--r--lib/ssl/src/ssl_ssl3.erl21
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_ssl3.erl b/lib/ssl/src/ssl_ssl3.erl
index 2b4ae1539f..11bc663e77 100644
--- a/lib/ssl/src/ssl_ssl3.erl
+++ b/lib/ssl/src/ssl_ssl3.erl
@@ -156,14 +156,22 @@ suites() ->
hash(?MD5, Data) ->
crypto:md5(Data);
hash(?SHA, Data) ->
- crypto:sha(Data).
+ crypto:sha(Data);
+hash(?SHA256, Data) ->
+ crypto:sha256(Data);
+hash(?SHA384, Data) ->
+ crypto:sha384(Data).
%%pad_1(?NULL) ->
%% "";
pad_1(?MD5) ->
<<"666666666666666666666666666666666666666666666666">>;
pad_1(?SHA) ->
- <<"6666666666666666666666666666666666666666">>.
+ <<"6666666666666666666666666666666666666666">>;
+pad_1(?SHA256) ->
+ <<"66666666666666666666666666666666">>;
+pad_1(?SHA384) ->
+ <<"666666666666666666666666666666666666666666666666">>.
%%pad_2(?NULL) ->
%% "";
@@ -172,7 +180,14 @@ pad_2(?MD5) ->
"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\">>;
pad_2(?SHA) ->
<<"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
- "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\">>.
+ "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\">>;
+pad_2(?SHA256) ->
+ <<"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
+ "\\\\\\\\\\\\\\\\\\\\\\\\">>;
+pad_2(?SHA384) ->
+ <<"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
+ "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
+ "\\\\\\\\\\\\\\\\">>.
mac_hash(?NULL, _Secret, _Data) ->
<<>>;