Rick Macklem 5f0e04113f uipc_socket.c: Modify MSG_TLSAPPDATA to only do Alert Records
Without this patch, the MSG_TLSAPPDATA flag would cause
soreceive_generic() to return ENXIO for any non-application
data record in a TLS receive stream.

This works ok for TLS1.2, since Alert records appear to be
the only non-application data records received.
However, for TLS1.3, there can be post-handshake handshake
records, such as NewSessionKey sent to the client from the
server. These handshake records cannot be handled by the
upcall which does an SSL_read() with length == 0.

It appears that the client can simply throw away these
NewSessionKey records, but to do so, it needs to receive
them within the kernel.

This patch modifies the semantics of MSG_TLSAPPDATA slightly,
so that it only applies to Alert records and not Handshake
records. It is needed to allow the krpc to work with KTLS1.3.

Reviewed by:	hselasky
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35170
2022-07-07 14:22:54 +02:00
..
2018-04-30 13:42:18 +02:00
2020-04-17 13:18:06 +02:00
2022-03-07 17:04:05 -06:00
2018-09-20 11:23:32 +02:00
2022-06-01 10:34:36 +02:00
2022-06-01 10:34:36 +02:00
2022-06-01 10:34:36 +02:00
2022-06-24 07:33:29 +02:00
2022-05-11 15:21:34 +02:00