File 0490-ssl-Fix-alert-record-bug.patch of Package erlang

From 0bc29c565fae58236b43c7b73c4b1db5e7f1fdea Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Thu, 21 Nov 2024 16:34:54 +0100
Subject: [PATCH] ssl: Fix alert record bug

---
 lib/ssl/src/tls_server_connection_1_3.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ssl/src/tls_server_connection_1_3.erl b/lib/ssl/src/tls_server_connection_1_3.erl
index 8801f00b67..684770f5ff 100644
--- a/lib/ssl/src/tls_server_connection_1_3.erl
+++ b/lib/ssl/src/tls_server_connection_1_3.erl
@@ -507,8 +507,8 @@ do_handle_client_hello(#client_hello{cipher_suites = ClientCiphers,
         {Ref, #alert{} = Alert} ->
             Alert;
         error:Reason:ST ->
-            ?SSL_LOG(debug, handshake_error, [{reason, Reason}, {stacktrace, ST}]),
-            ?ALERT_REC(?ILLEGAL_PARAMETER, illegal_parameter_in_client_hello)
+            ?SSL_LOG(info, handshake_error, [{reason, Reason}, {stacktrace, ST}]),
+            ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER, illegal_parameter_in_client_hello)
     end.
 
 send_hello_flight({start_handshake, PSK0},
@@ -590,8 +590,8 @@ send_hello_flight({start_handshake, PSK0},
         {Ref, #alert{} = Alert} ->
             Alert;
         error:Reason:ST ->
-            ?SSL_LOG(debug, crypto_error, [{reason, Reason}, {stacktrace, ST}]),
-            ?ALERT_REC(?ILLEGAL_PARAMETER, illegal_parameter_to_compute_key)
+            ?SSL_LOG(info, crypto_error, [{reason, Reason}, {stacktrace, ST}]),
+            ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER, illegal_parameter_to_compute_key)
     end.
 
 validate_cookie(_Cookie, #state{ssl_options = #{cookie := false}}) ->
-- 
2.43.0

openSUSE Build Service is sponsored by