Skip to content

Commit 20fa54f

Browse files
committed
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.
1 parent 940ec0f commit 20fa54f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ssl/src/tls_server_connection.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ wait_cert_verify(internal, #certificate_verify{signature = Signature,
295295
State#state{handshake_env = HsEnv,
296296
session = Session0#session{sign_alg = HashSign}});
297297
#alert{} = Alert ->
298-
throw(Alert)
298+
ssl_gen_statem:handle_own_alert(Alert, ?STATE(wait_cert_verify), State)
299299
end;
300300
wait_cert_verify(Type, Event, State) ->
301301
ssl_gen_statem:handle_common_event(Type, Event, ?STATE(wait_cert_verify), State).

0 commit comments

Comments
 (0)