mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
tls_process_server_hello: Disallow repeated HRR
Repeated HRR must be rejected. Fixes #17934 Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17936)
This commit is contained in:
parent
514bd51a8c
commit
d204a50b89
@ -1395,6 +1395,10 @@ MSG_PROCESS_RETURN tls_process_server_hello(SSL *s, PACKET *pkt)
|
||||
&& sversion == TLS1_2_VERSION
|
||||
&& PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
|
||||
&& memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
|
||||
if (s->hello_retry_request != SSL_HRR_NONE) {
|
||||
SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
|
||||
goto err;
|
||||
}
|
||||
s->hello_retry_request = SSL_HRR_PENDING;
|
||||
hrr = 1;
|
||||
if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user