summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-11-07 13:49:18 +0000
committerMatt Caswell <matt@openssl.org>2016-11-07 15:52:33 +0000
commit3c9539d294b931bc430a01510753e10b7a201f11 (patch)
tree72730a514299b48b3f844ac3c1b2f360b0c89108
parent185c29b14eafb9ddacffb82b10c4609e49686e66 (diff)
Ignore the record version in TLS1.3
The record layer version field must be ignored in TLSv1.3, so we remove the check when using that version. Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r--ssl/record/ssl3_record.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c
index f160c06746..181ebbbfb8 100644
--- a/ssl/record/ssl3_record.c
+++ b/ssl/record/ssl3_record.c
@@ -204,8 +204,9 @@ int ssl3_get_record(SSL *s)
rr[num_recs].rec_version = version;
n2s(p, rr[num_recs].length);
- /* Lets check version */
- if (!s->first_packet && version != s->version) {
+ /* Lets check version. In TLSv1.3 we ignore this field */
+ if (!s->first_packet && s->version != TLS1_3_VERSION
+ && version != s->version) {
SSLerr(SSL_F_SSL3_GET_RECORD, SSL_R_WRONG_VERSION_NUMBER);
if ((s->version & 0xFF00) == (version & 0xFF00)
&& !s->enc_write_ctx && !s->write_hash) {