diff options
author | Ingela Anderton Andin <[email protected]> | 2017-04-25 16:57:42 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-04-25 16:57:42 +0200 |
commit | 504bb40f3530d5890849f1c51f7ce1aba6766784 (patch) | |
tree | 0b5a9df92c015d62e7153d865738751a3e8a207a /lib/ssl/src/dtls_record.erl | |
parent | 61a20e55ccf6ff89a4863c1ed8754b8909646e88 (diff) | |
parent | edab501fe7bffe3f19871157ebd1851e6dad1bc5 (diff) | |
download | otp-504bb40f3530d5890849f1c51f7ce1aba6766784.tar.gz otp-504bb40f3530d5890849f1c51f7ce1aba6766784.tar.bz2 otp-504bb40f3530d5890849f1c51f7ce1aba6766784.zip |
Merge branch 'ingela/available_hash_signature_algs/OTP-13820'
* ingela/available_hash_signature_algs/OTP-13820:
ssl: TLS-1.2 clients will now always send hello messages on its own format.
Diffstat (limited to 'lib/ssl/src/dtls_record.erl')
-rw-r--r-- | lib/ssl/src/dtls_record.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl index 049f83e49e..de6b6e400f 100644 --- a/lib/ssl/src/dtls_record.erl +++ b/lib/ssl/src/dtls_record.erl @@ -44,7 +44,7 @@ -export([protocol_version/1, lowest_protocol_version/1, lowest_protocol_version/2, highest_protocol_version/1, highest_protocol_version/2, is_higher/2, supported_protocol_versions/0, - is_acceptable_version/2]). + is_acceptable_version/2, hello_version/2]). -export([save_current_connection_state/2, next_epoch/2]). @@ -402,6 +402,15 @@ current_connection_state_epoch(#{current_write := #{epoch := Epoch}}, write) -> Epoch. +-spec hello_version(dtls_version(), [dtls_version()]) -> dtls_version(). +hello_version(Version, Versions) -> + case dtls_v1:corresponding_tls_version(Version) of + TLSVersion when TLSVersion >= {3, 3} -> + Version; + _ -> + lowest_protocol_version(Versions) + end. + %%-------------------------------------------------------------------- %%% Internal functions %%-------------------------------------------------------------------- |