aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_record.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-03-05 09:21:52 +0100
committerIngela Anderton Andin <[email protected]>2015-03-05 09:21:52 +0100
commitccbf6811b1e0379df30e35bd6265f9221632732c (patch)
treead1439f0720651c794935f1abb877faff5a7750c /lib/ssl/src/tls_record.erl
parentac82610a03c8b17b6bcae91aa4252a1930c51e85 (diff)
parent549785976441514377e1da14c5c1e7fb289456e0 (diff)
downloadotp-ccbf6811b1e0379df30e35bd6265f9221632732c.tar.gz
otp-ccbf6811b1e0379df30e35bd6265f9221632732c.tar.bz2
otp-ccbf6811b1e0379df30e35bd6265f9221632732c.zip
Merge branch 'maint'
Conflicts: lib/ssl/src/ssl_cipher.erl lib/ssl/test/ssl_basic_SUITE.erl
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 3d5c5c0da3..14a49ac7da 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]).
@@ -278,6 +278,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()].
%%