aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_record.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-02-25 12:11:16 +0100
committerIngela Anderton Andin <[email protected]>2015-03-02 15:00:46 +0100
commited540bd0e457fd43a5b3eaf41f9886cb63a2755a (patch)
treec01969146c2b7db293724e0fa24d7a6f27966741 /lib/ssl/src/tls_record.erl
parent2032d22f69ffa8ce6c3ded5d2e2a6ff34b3b5980 (diff)
downloadotp-ed540bd0e457fd43a5b3eaf41f9886cb63a2755a.tar.gz
otp-ed540bd0e457fd43a5b3eaf41f9886cb63a2755a.tar.bz2
otp-ed540bd0e457fd43a5b3eaf41f9886cb63a2755a.zip
ssl: Implement support for TLS_FALLBACK_SCSV
Diffstat (limited to 'lib/ssl/src/tls_record.erl')
-rw-r--r--lib/ssl/src/tls_record.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl
index ed61da2d62..168b2c8fd3 100644
--- a/lib/ssl/src/tls_record.erl
+++ b/lib/ssl/src/tls_record.erl
@@ -41,7 +41,7 @@
%% Protocol version handling
-export([protocol_version/1, lowest_protocol_version/2,
- highest_protocol_version/1, supported_protocol_versions/0,
+ highest_protocol_version/1, is_higher/2, supported_protocol_versions/0,
is_acceptable_version/1, is_acceptable_version/2]).
-export_type([tls_version/0, tls_atom_version/0]).
@@ -236,6 +236,13 @@ highest_protocol_version(Version = {M,_}, [{N,_} | Rest]) when M > N ->
highest_protocol_version(_, [Version | Rest]) ->
highest_protocol_version(Version, Rest).
+is_higher({M, N}, {M, O}) when N > O ->
+ true;
+is_higher({M, _}, {N, _}) when M > N ->
+ true;
+is_higher(_, _) ->
+ false.
+
%%--------------------------------------------------------------------
-spec supported_protocol_versions() -> [tls_version()].
%%