Remove SSL_IS_TLS13() and hello_retry_request
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)
if (num_recs == 1
&& thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
- && (SSL_CONNECTION_IS_TLS13(s) || s->hello_retry_request != SSL_HRR_NONE)
+ /* The following can happen in tlsany_meth after HRR */
+ && rl->version == TLS1_3_VERSION
&& rl->is_first_handshake) {
/*
* CCS messages must be exactly 1 byte long, containing the value 0x01
/* We just set it here. We validate it in ssl_choose_client_version */
s->version = version;
+ s->rrlmethod->set_protocol_version(s->rrl, version);
return 1;
}
goto err;
}
s->hello_retry_request = SSL_HRR_PENDING;
+ /* Tell the record layer that we know we're going to get TLSv1.3 */
+ s->rrlmethod->set_protocol_version(s->rrl, s->version);
hrr = 1;
if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);