diff options
author | Gustav Simonsson <[email protected]> | 2012-03-26 15:54:03 +0200 |
---|---|---|
committer | Gustav Simonsson <[email protected]> | 2012-03-26 15:54:03 +0200 |
commit | 7f16b728cbd31de5e4a2a6a5955fd22fe312ea52 (patch) | |
tree | de657654305e125b9a996c3b8c66d8ae0070c11f /lib/ssl/src/ssl.erl | |
parent | a4b0acb38df8efb1c1cff8451f529dba81a3bbae (diff) | |
parent | c1f3ffc3df15422bb60a24eb6417069feec9352f (diff) | |
download | otp-7f16b728cbd31de5e4a2a6a5955fd22fe312ea52.tar.gz otp-7f16b728cbd31de5e4a2a6a5955fd22fe312ea52.tar.bz2 otp-7f16b728cbd31de5e4a2a6a5955fd22fe312ea52.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r-- | lib/ssl/src/ssl.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index d0693445e0..1048583eca 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -30,7 +30,7 @@ controlling_process/2, listen/2, pid/1, peername/1, peercert/1, recv/2, recv/3, send/2, getopts/2, setopts/2, sockname/1, versions/0, session_info/1, format_error/1, - renegotiate/1]). + renegotiate/1, prf/5]). -deprecated({pid, 1, next_major_release}). @@ -67,7 +67,7 @@ -type ssl_imp() :: new | old. -type transport_option() :: {cb_info, {CallbackModule::atom(), DataTag::atom(), ClosedTag::atom()}}. - +-type prf_random() :: client_random | server_random. %%-------------------------------------------------------------------- -spec start() -> ok | {error, reason()}. @@ -414,6 +414,17 @@ versions() -> renegotiate(#sslsocket{pid = Pid, fd = new_ssl}) -> ssl_connection:renegotiation(Pid). +%%-------------------------------------------------------------------- +-spec prf(#sslsocket{}, binary() | 'master_secret', binary(), + binary() | prf_random(), non_neg_integer()) -> + {ok, binary()} | {error, reason()}. +%% +%% Description: use a ssl sessions TLS PRF to generate key material +%%-------------------------------------------------------------------- +prf(#sslsocket{pid = Pid, fd = new_ssl}, + Secret, Label, Seed, WantedLength) -> + ssl_connection:prf(Pid, Secret, Label, Seed, WantedLength). + %%--------------------------------------------------------------- -spec format_error({error, term()}) -> list(). %% |