We should use the macro for testing if we are using TLSv1.3 rather than
checking s->version directly.
Reviewed-by: Rich Salz <rsalz@openssl.org>
n2s(p, rr[num_recs].length);
/* Lets check version. In TLSv1.3 we ignore this field */
- if (!s->first_packet && s->version != TLS1_3_VERSION
+ if (!s->first_packet && !SSL_IS_TLS13(s)
&& version != s->version) {
SSLerr(SSL_F_SSL3_GET_RECORD, SSL_R_WRONG_VERSION_NUMBER);
if ((s->version & 0xFF00) == (version & 0xFF00)
}
/* Check we've got a key_share for TLSv1.3 */
- if (s->version == TLS1_3_VERSION && s->s3->peer_tmp == NULL && !s->hit) {
+ if (SSL_IS_TLS13(s) && s->s3->peer_tmp == NULL && !s->hit) {
/* No suitable share */
/* TODO(TLS1.3): Send a HelloRetryRequest */
al = SSL_AD_HANDSHAKE_FAILURE;