Skip to content

Commit

Permalink
ssl: Fix alert record bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dgud committed Jan 16, 2025
1 parent 5bee1d7 commit 2562614
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ssl/src/tls_server_connection_1_3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
end.

send_hello_flight({start_handshake, PSK0},
Expand Down Expand Up @@ -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)
end.

validate_cookie(_Cookie, #state{ssl_options = #{cookie := false}}) ->
Expand Down

0 comments on commit 2562614

Please sign in to comment.