Page MenuHomeFreeBSD

Initial support for kernel offload of TLS receive.
AbandonedPublic

Authored by jhb on Apr 16 2020, 9:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 2:38 PM
Unknown Object (File)
Sat, May 4, 2:19 PM
Unknown Object (File)
Fri, May 3, 8:10 AM
Unknown Object (File)
Mar 2 2024, 2:04 AM
Unknown Object (File)
Dec 25 2023, 11:27 PM
Unknown Object (File)
Dec 22 2023, 11:50 PM
Unknown Object (File)
Nov 12 2023, 4:06 AM
Unknown Object (File)
Nov 9 2023, 10:49 PM
Subscribers

Details

Summary
  • Add a new TCP_RXTLS_ENABLE socket option to set the encryption and authentication algorithms and keys as well as the initial sequence number.
  • When reading from a socket using KTLS receive, applications must use recvmsg(). Each successful call to recvmsg() will return a single TLS record. A new TCP control message, TLS_GET_RECORD, will contain the TLS record header of the decrypted record. The regular message buffer passed to recvmsg() will receive the decrypted payload. This is similar to the interface used by Linux's KTLS RX except that Linux does not return the full TLS header in the control message.
  • Add plumbing to the TOE KTLS interface to request either transmit or receive KTLS sessions.
  • When a socket is using receive KTLS, redirect reads from soreceive_stream() into soreceive_generic().
  • Note that this interface is currently only defined for TLS 1.1 and 1.2, though I believe we will be able to reuse the same interface and structures for 1.3.
Test Plan
  • tested with TOE on T6, and the interface has also been tested with a KTLS RX software solution

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 30544
Build 28290: arc lint + arc unit