Fix a regression in r361804 for TLS 1.3.

I was not including the record type stored in the first byte of the
trailer as part of the payload to be encrypted and hashed.

Sponsored by:	Netflix
This commit is contained in:
John Baldwin 2020-06-12 22:27:26 +00:00
parent 17edf152e5
commit 4e6a381306
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362131

View File

@ -293,6 +293,7 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls,
* record_type even if only the first byte is used.
*/
trailer[0] = record_type;
crp->crp_payload_length++;
iov[iovcnt + 1].iov_base = trailer;
iov[iovcnt + 1].iov_len = AES_GMAC_HASH_LEN + 1;
uio.uio_iovcnt++;