diff options
author | Ingela Anderton Andin <[email protected]> | 2016-05-09 09:26:32 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-05-09 09:26:32 +0200 |
commit | a658b1a5ac41b3f5cb95dae263e908ebfbfddf6e (patch) | |
tree | 3652db245a97ebdef69ccb00477227c9785cef48 /lib/ssl/src/ssl_handshake.erl | |
parent | 87d869dd7b8711d4a43aaaf9a876df16f4f4f5b9 (diff) | |
parent | 8da6f7108cc9a49e7d7ccb07fa6382e293b19a4a (diff) | |
download | otp-a658b1a5ac41b3f5cb95dae263e908ebfbfddf6e.tar.gz otp-a658b1a5ac41b3f5cb95dae263e908ebfbfddf6e.tar.bz2 otp-a658b1a5ac41b3f5cb95dae263e908ebfbfddf6e.zip |
Merge branch 'kennethlakin/tls-use-negotiated-prf/PR-1042/OTP-13546'
* kennethlakin/tls-use-negotiated-prf/PR-1042/OTP-13546:
ssl: Use cipher suite's PRF in prf/5
Diffstat (limited to 'lib/ssl/src/ssl_handshake.erl')
-rw-r--r-- | lib/ssl/src/ssl_handshake.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl index 2a2a7b7d25..598d4e4112 100644 --- a/lib/ssl/src/ssl_handshake.erl +++ b/lib/ssl/src/ssl_handshake.erl @@ -74,7 +74,7 @@ ]). %% MISC --export([select_version/3, prf/5, select_hashsign/5, +-export([select_version/3, prf/6, select_hashsign/5, select_hashsign_algs/3, premaster_secret/2, premaster_secret/3, premaster_secret/4]). @@ -564,17 +564,15 @@ server_key_exchange_hash(md5sha, Value) -> server_key_exchange_hash(Hash, Value) -> crypto:hash(Hash, Value). %%-------------------------------------------------------------------- --spec prf(ssl_record:ssl_version(), binary(), binary(), [binary()], non_neg_integer()) -> +-spec prf(ssl_record:ssl_version(), non_neg_integer(), binary(), binary(), [binary()], non_neg_integer()) -> {ok, binary()} | {error, undefined}. %% %% Description: use the TLS PRF to generate key material %%-------------------------------------------------------------------- -prf({3,0}, _, _, _, _) -> +prf({3,0}, _, _, _, _, _) -> {error, undefined}; -prf({3,1}, Secret, Label, Seed, WantedLength) -> - {ok, tls_v1:prf(?MD5SHA, Secret, Label, Seed, WantedLength)}; -prf({3,_N}, Secret, Label, Seed, WantedLength) -> - {ok, tls_v1:prf(?SHA256, Secret, Label, Seed, WantedLength)}. +prf({3,_N}, PRFAlgo, Secret, Label, Seed, WantedLength) -> + {ok, tls_v1:prf(PRFAlgo, Secret, Label, Seed, WantedLength)}. %%-------------------------------------------------------------------- |