From 753a85c822a8d6c2d7b039f142afc7df202c9f18 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Fri, 8 Jul 2016 11:03:39 +0200 Subject: 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. --- lib/ssl/src/ssl.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/ssl/src/ssl.erl') 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 %%%-------------------------------------------------------------------- -- cgit v1.2.3