]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
KTLS: Handle TLS 1.3 in ssl3_get_record.
authorDaiki Ueno <dueno@redhat.com>
Sun, 10 Oct 2021 06:54:07 +0000 (08:54 +0200)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 19 Oct 2023 18:34:58 +0000 (11:34 -0700)
commitc085ca5245797ae17fc69353bbdf7584acb2feaa
tree5d74be554888811f9000b62617b4f83f2ca0ec71
parent0fc28f22d5b6a75d8a0449262a05cefe1040f982
KTLS: Handle TLS 1.3 in ssl3_get_record.

- Don't unpad records, check the outer record type, or extract the
  inner record type from TLS 1.3 records handled by the kernel.  KTLS
  performs all of these steps and returns the inner record type in the
  TLS header.

- When checking the length of a received TLS 1.3 record don't allow
  for the extra byte for the nested record type when KTLS is used.

- Pass a pointer to the record type in the TLS header to the
  SSL3_RT_INNER_CONTENT_TYPE message callback.  For KTLS, the old
  pointer pointed to the last byte of payload rather than the record
  type.  For the non-KTLS case, the TLS header has been updated with
  the inner type before this callback is invoked.

Obtained from: OpenSSL commit a5fb9605329fb939abb536c1604d44a511741624)
crypto/openssl/ssl/record/ssl3_record.c