From 031e4d02754628a3b9f022c3f8f4a1e27a02c3f4 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 8 Oct 2024 15:54:28 +0200 Subject: [PATCH] ssl: Fix version assertion Make sure assertion is on function clause only and not on selected version closes #8908 --- lib/ssl/src/tls_handshake.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl index 52d6f0bbce78..6377edc02106 100644 --- a/lib/ssl/src/tls_handshake.erl +++ b/lib/ssl/src/tls_handshake.erl @@ -245,8 +245,8 @@ hello(#client_hello{client_version = _ClientVersion, #{versions := Versions = [Version |_]} = SslOpts, Info, Renegotiation) when ?TLS_GTE(Version, ?TLS_1_2)-> try - Version = ssl_handshake:select_supported_version(ClientVersions, Versions), - do_hello(Version, Versions, CipherSuites, Hello, SslOpts, Info, Renegotiation) + SelectedVersion = ssl_handshake:select_supported_version(ClientVersions, Versions), + do_hello(SelectedVersion, Versions, CipherSuites, Hello, SslOpts, Info, Renegotiation) catch error:Reason:ST -> ?SSL_LOG(info, handshake_error, [{reason,Reason}, {stacktrace, ST}]),