File 0526-ssl-Correct-gen_statem-behaviour-modules-own-alert-h.patch of Package erlang
From f55b778679ea9867b6dcfb0396b609b4dffbc79c Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Wed, 15 Oct 2025 16:36:49 +0200
Subject: [PATCH] ssl: Correct gen_statem behaviour modules own alert handling
Own alerts shall be handled by the function
ssl_gen_statem:handle_own_alert and not thrown as a local return
in the behaviour modules. Alerts are only thrown from helper
modules and caught by the main state machine behaviour module that
will then call ssl_gen_statem:handle_own_alert.
---
lib/ssl/src/tls_server_connection.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ssl/src/tls_server_connection.erl b/lib/ssl/src/tls_server_connection.erl
index 51b27c2cf0..f6bcc71ef9 100644
--- a/lib/ssl/src/tls_server_connection.erl
+++ b/lib/ssl/src/tls_server_connection.erl
@@ -300,7 +300,7 @@ wait_cert_verify(internal, #certificate_verify{signature = Signature,
State#state{handshake_env = HsEnv,
session = Session0#session{sign_alg = HashSign}});
#alert{} = Alert ->
- throw(Alert)
+ ssl_gen_statem:handle_own_alert(Alert, ?STATE(wait_cert_verify), State)
end;
wait_cert_verify(Type, Event, State) ->
ssl_gen_statem:handle_common_event(Type, Event, ?STATE(wait_cert_verify), State).
--
2.51.0