Rick Macklem 4de7ab7e97 Add the MSG_TLSAPPDATA flag to indicate "return ENXIO" for non-application TLS data records.
The kernel RPC cannot process non-application data records when
using TLS. It must to an upcall to a userspace daemon that will
call SSL_read() to process them.

This patch adds a new flag called MSG_TLSAPPDATA that the kernel
RPC can use to tell sorecieve() to return ENXIO instead of a non-application
data record, when that is what is at the top of the receive queue.
I put the code in #ifdef KERN_TLS/#endif, although it will build without
that, so that it is recognized as only useful when KERN_TLS is enabled.
The alternative to doing this is to have the kernel RPC re-queue the
non-application data message after receiving it, but that seems more
complicated and might introduce message ordering issues when there
are multiple non-application data records one after another.

I do not know what, if any, changes will be required to support TLS1.3.

Reviewed by:	glebius
Differential Revision:	https://reviews.freebsd.org/D25923
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