6ed16d17 | 10-Oct-2021 |
Daiki Ueno <dueno@redhat.com> |
KTLS: Enable KTLS for receiving as well in TLS 1.3
This removes a guard condition that prevents KTLS being enabled for receiving in TLS 1.3. Use the correct sequence number and BIO for receive vs t
KTLS: Enable KTLS for receiving as well in TLS 1.3
This removes a guard condition that prevents KTLS being enabled for receiving in TLS 1.3. Use the correct sequence number and BIO for receive vs transmit offload.
Obtained from: OpenSSL commit 7c78932b9a4330fb7c8db72b3fb37cbff1401f8b
show more ...
|
c085ca52 | 10-Oct-2021 |
Daiki Ueno <dueno@redhat.com> |
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 th
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)
show more ...
|
0fc28f22 | 08-Mar-2022 |
John Baldwin <jhb@FreeBSD.org> |
KTLS: Add using_ktls helper variable in ssl3_get_record().
When KTLS receive is enabled, pending data may still be present due to read ahead. This data must still be processed the same as records r
KTLS: Add using_ktls helper variable in ssl3_get_record().
When KTLS receive is enabled, pending data may still be present due to read ahead. This data must still be processed the same as records received without KTLS. To ease readability (especially in consideration of additional checks which will be added for TLS 1.3), add a helper variable 'using_ktls' that is true when the KTLS receive path is being used to receive a record.
Obtained from: OpenSSL commit 031132c297e54cbc20404a0bf8de6ed863196399
show more ...
|
eee55a22 | 24-Feb-2022 |
John Baldwin <jhb@FreeBSD.org> |
KTLS: Check for unprocessed receive records in ktls_configure_crypto.
KTLS implementations currently assume that the start of the in-kernel socket buffer is aligned with the start of a TLS record fo
KTLS: Check for unprocessed receive records in ktls_configure_crypto.
KTLS implementations currently assume that the start of the in-kernel socket buffer is aligned with the start of a TLS record for the receive side. The socket option to enable KTLS specifies the TLS sequence number of this initial record.
When read ahead is enabled, data can be pending in the SSL read buffer after negotiating session keys. This pending data must be examined to ensurs that the kernel's socket buffer does not contain a partial TLS record as well as to determine the correct sequence number of the first TLS record to be processed by the kernel.
In preparation for enabling receive kernel offload for TLS 1.3, move the existing logic to handle read ahead from t1_enc.c into ktls.c and invoke it from ktls_configure_crypto().
Obtained from: OpenSSL commit 85773128d0e80cd8dcc772a6931d385b8cf4acd1
show more ...
|
913616b8 | 04-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
OpenSSL: KTLS: Enable KTLS for receiving as well in TLS 1.3
This removes a guard condition that prevents KTLS being enabled for receiving in TLS 1.3. Use the correct sequence number and BIO for rec
OpenSSL: KTLS: Enable KTLS for receiving as well in TLS 1.3
This removes a guard condition that prevents KTLS being enabled for receiving in TLS 1.3. Use the correct sequence number and BIO for receive vs transmit offload.
Approved by: jkim Obtained from: OpenSSL commit 7c78932b9a4330fb7c8db72b3fb37cbff1401f8b MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34976
show more ...
|
c0f977bf | 04-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
OpenSSL: 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
OpenSSL: 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.
Approved by: jkim Obtained from: OpenSSL commit a5fb9605329fb939abb536c1604d44a511741624 MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34975
show more ...
|
4f1f9c55 | 04-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
OpenSSL: KTLS: Add using_ktls helper variable in ssl3_get_record().
When KTLS receive is enabled, pending data may still be present due to read ahead. This data must still be processed the same as
OpenSSL: KTLS: Add using_ktls helper variable in ssl3_get_record().
When KTLS receive is enabled, pending data may still be present due to read ahead. This data must still be processed the same as records received without KTLS. To ease readability (especially in consideration of additional checks which will be added for TLS 1.3), add a helper variable 'using_ktls' that is true when the KTLS receive path is being used to receive a record.
Approved by: jkim Obtained from: OpenSSL commit 031132c297e54cbc20404a0bf8de6ed863196399 MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34974
show more ...
|
019cff03 | 04-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.
KTLS implementations currently assume that the start of the in-kernel socket buffer is aligned with the start of a TLS
OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.
KTLS implementations currently assume that the start of the in-kernel socket buffer is aligned with the start of a TLS record for the receive side. The socket option to enable KTLS specifies the TLS sequence number of this initial record.
When read ahead is enabled, data can be pending in the SSL read buffer after negotiating session keys. This pending data must be examined to ensurs that the kernel's socket buffer does not contain a partial TLS record as well as to determine the correct sequence number of the first TLS record to be processed by the kernel.
In preparation for enabling receive kernel offload for TLS 1.3, move the existing logic to handle read ahead from t1_enc.c into ktls.c and invoke it from ktls_configure_crypto().
Approved by: jkim Obtained from: OpenSSL commit 85773128d0e80cd8dcc772a6931d385b8cf4acd1 MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34973
show more ...
|