diff options
author | EKR <ekr@rtfm.com> | 2016-02-21 14:21:45 -0800 |
---|---|---|
committer | EKR <ekr@rtfm.com> | 2016-02-21 14:21:45 -0800 |
commit | 76cdb100646b93bc3c4a45cdbc262a10cb5063cb (patch) | |
tree | 258edb36cb6beee5edc8b477d2aec58e35e51694 | |
parent | 01a78c3cacb73dda342e55e105e19e423d2fa4ef (diff) | |
download | nss-hg-76cdb100646b93bc3c4a45cdbc262a10cb5063cb.tar.gz |
Bug 1249940 - Fix version number for TLS 1.3 unencrypted records. r=mt
-rw-r--r-- | lib/ssl/ssl3con.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c index 42723ffc7..c40fc7122 100644 --- a/lib/ssl/ssl3con.c +++ b/lib/ssl/ssl3con.c @@ -2925,9 +2925,10 @@ ssl3_CompressMACEncryptRecord(ssl3CipherSpec *cwSpec, else { SSL3ProtocolVersion version = cwSpec->version; - if (capRecordVersion) { + if (capRecordVersion || version >= SSL_LIBRARY_VERSION_TLS_1_3) { version = PR_MIN(SSL_LIBRARY_VERSION_TLS_1_0, version); } + wrBuf->buf[1] = MSB(version); wrBuf->buf[2] = LSB(version); wrBuf->buf[3] = MSB(cipherBytes); |