Skip to content

Commit 1e188a3

Browse files
committed
ssl: Hardening add RFC compliance clause
1 parent f4506ee commit 1e188a3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/ssl/src/tls_handshake_1_3.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ certificate_verify(PrivateKey, SignatureScheme,
367367
%% Upon receiving a message with type server_hello, implementations MUST
368368
%% first examine the Random value and, if it matches this value, process
369369
%% it as described in Section 4.1.4).
370+
maybe_hello_retry_request(#server_hello{random = ?HELLO_RETRY_REQUEST_RANDOM},
371+
#state{protocol_specific = #{hello_retry := true}}) ->
372+
{error, ?ALERT_REC(?FATAL, ?UNEXPECTED_MESSAGE)};
370373
maybe_hello_retry_request(#server_hello{random = ?HELLO_RETRY_REQUEST_RANDOM} = ServerHello,
371374
#state{protocol_specific = PS} = State0) ->
372375
{error, {State0#state{protocol_specific = PS#{hello_retry => true}}, start, ServerHello}};

0 commit comments

Comments
 (0)