Rick Macklem e86ac20e9f 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:23:25 +02:00
..
2013-10-10 09:08:23 +02:00
2017-04-04 14:46:23 +02:00
2018-09-21 10:29:39 +02:00
2019-08-27 10:31:42 +02:00
2015-03-06 14:58:13 +01:00
2018-09-12 07:48:17 +02:00
2015-03-06 14:58:13 +01:00
2019-09-25 10:58:17 +02:00
2013-10-10 09:06:58 +02:00
2013-10-10 09:08:23 +02:00
2017-11-10 13:10:08 +01:00
2020-11-13 12:34:01 -06:00
2017-07-13 07:30:06 +02:00
2013-10-10 09:08:23 +02:00
2017-03-08 09:04:18 +01:00
2013-10-10 09:08:23 +02:00
2019-11-13 10:47:04 +01:00
2017-01-10 09:53:31 +01:00
2013-11-11 10:08:05 +01:00
2015-03-06 14:58:13 +01:00
2020-04-15 16:32:34 +02:00
2020-09-10 13:24:18 +02:00
2018-08-02 10:32:20 +02:00
2015-01-29 08:51:43 +01:00
2013-11-11 10:08:05 +01:00
2013-10-31 13:18:46 +01:00
2013-10-10 09:08:23 +02:00
2019-08-11 15:57:54 +02:00