aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_v1.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-09-05 10:43:31 +0200
committerIngela Anderton Andin <[email protected]>2013-09-10 09:37:30 +0200
commit754b87eb181552d67c61c9a80c31ce52e4b39f19 (patch)
treef6f71c630e6cc22fa9e1c6615f43fc4f7dd5cfb0 /lib/ssl/src/dtls_v1.erl
parentfa8b8cd60406ddcb2781f27e291949a8698c2886 (diff)
downloadotp-754b87eb181552d67c61c9a80c31ce52e4b39f19.tar.gz
otp-754b87eb181552d67c61c9a80c31ce52e4b39f19.tar.bz2
otp-754b87eb181552d67c61c9a80c31ce52e4b39f19.zip
ssl: Refactor TLS/DTLS record handling
Diffstat (limited to 'lib/ssl/src/dtls_v1.erl')
-rw-r--r--lib/ssl/src/dtls_v1.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_v1.erl b/lib/ssl/src/dtls_v1.erl
index a9fcf575af..c12e12e424 100644
--- a/lib/ssl/src/dtls_v1.erl
+++ b/lib/ssl/src/dtls_v1.erl
@@ -20,7 +20,7 @@
-include("ssl_cipher.hrl").
--export([suites/1, mac_hash/7, ecc_curves/1]).
+-export([suites/1, mac_hash/7, ecc_curves/1, corresponding_tls_version/1]).
-spec suites(Minor:: 253|255) -> [cipher_suite()].
@@ -34,6 +34,9 @@ mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) ->
ecc_curves({_Major, Minor}) ->
tls_v1:ecc_curves(corresponding_minor_tls_version(Minor)).
+corresponding_tls_version({254, Minor}) ->
+ {3, corresponding_minor_tls_version(Minor)}.
+
corresponding_minor_tls_version(255) ->
2;
corresponding_minor_tls_version(253) ->