aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-07-08 11:03:39 +0200
committerIngela Anderton Andin <[email protected]>2016-09-05 14:37:26 +0200
commit753a85c822a8d6c2d7b039f142afc7df202c9f18 (patch)
tree88afe02d17729655cbd1d0cf585e3eec51d57654 /lib/ssl/src/ssl.erl
parent02f088a76f7ec2a50e25b865c26eb180b8733efb (diff)
downloadotp-753a85c822a8d6c2d7b039f142afc7df202c9f18.tar.gz
otp-753a85c822a8d6c2d7b039f142afc7df202c9f18.tar.bz2
otp-753a85c822a8d6c2d7b039f142afc7df202c9f18.zip
ssl: Make sure common code for TLS and DTLS uses the TLS Version
When protocol version is proagated from the DTLS connection processes state into general ssl functions it must be converted to the corresponding TLS version.
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r--lib/ssl/src/ssl.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index d2aeb3258f..27b753af2e 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -43,7 +43,7 @@
renegotiate/1, prf/5, negotiated_protocol/1, negotiated_next_protocol/1,
connection_information/1, connection_information/2]).
%% Misc
--export([handle_options/2]).
+-export([handle_options/2, tls_version/1]).
-deprecated({negotiated_next_protocol, 1, next_major_release}).
-deprecated({connection_info, 1, next_major_release}).
@@ -607,6 +607,11 @@ format_error(Error) ->
Other
end.
+tls_version({3, _} = Version) ->
+ Version;
+tls_version({254, _} = Version) ->
+ dtls_v1:corresponding_tls_version(Version).
+
%%%--------------------------------------------------------------
%%% Internal functions
%%%--------------------------------------------------------------------