diff options
author | Ingela Anderton Andin <[email protected]> | 2015-03-05 09:15:24 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-03-05 09:15:24 +0100 |
commit | 549785976441514377e1da14c5c1e7fb289456e0 (patch) | |
tree | 70e09cf100cd86020a77f32b4d5d99fe680927a6 /lib/ssl/src/tls_record.erl | |
parent | 71b52f31772210a7160317966ca46e36140b935a (diff) | |
parent | ed540bd0e457fd43a5b3eaf41f9886cb63a2755a (diff) | |
download | otp-549785976441514377e1da14c5c1e7fb289456e0.tar.gz otp-549785976441514377e1da14c5c1e7fb289456e0.tar.bz2 otp-549785976441514377e1da14c5c1e7fb289456e0.zip |
Merge branch 'ia/ssl/TLS_FALLBACK_SCSV/OTP-12458' into maint
* ia/ssl/TLS_FALLBACK_SCSV/OTP-12458:
ssl: Implement support for TLS_FALLBACK_SCSV
Diffstat (limited to 'lib/ssl/src/tls_record.erl')
-rw-r--r-- | lib/ssl/src/tls_record.erl | 9 |
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()]. %% |