freebsd-src/contrib/serf/buckets
John Baldwin b122886de2 serf: Fix the default return value of the BIO control method.
OpenSSL BIO classes provide an abstraction for dealing with I/O.
OpenSSL provides BIO classes for commonly used I/O primitives backed
by file descriptors, sockets, etc. as well as permitting consumers
of OpenSSL to define custom BIO classes.

One of the methods BIO classes implement is a control method invoked
by BIO_ctrl() for various ancilliary tasks somewhat analgous to
fcntl() and ioctl() on file descriptors.  According to the BIO_ctrl(3)
manual page, control methods should return 0 for unknown control
requests.

KTLS support in OpenSSL adds new control requests.  Two of those new
requests are queries to determine if KTLS is enabled for either
reading or writing.  These control reuquest return 1 if KTLS is
enabled and 0 if it is not.

serf includes two custom BIO classes for wrapping I/O requests from
files and from a buffer in memory.  These BIO classes both use a
custom control method.  However, this custom control method was
returning 1 for unknown or unsupported control requests instead of 0.
As a result, OpenSSL with KTLS believed that these BIOs were using
KTLS and were thus adding headers and doing encryption/decryption in
the BIO.  Correcting the return value removes this confusion.

PR:		253135
Reported by:	Guido Falsi <mad@madpilot.net>
Sponsored by:	Netflix

(cherry picked from commit cb7cc72c54)
2021-02-08 14:38:59 -08:00
..
aggregate_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
allocator.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
barrier_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
bwtp_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
chunk_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
dechunk_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
deflate_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
file_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
headers_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
iovec_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
limit_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
mmap_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
request_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
response_body_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
response_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
simple_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
socket_buckets.c Update Apache Serf to 1.3.9 to support OpenSSL 1.1.1. 2018-10-09 15:28:06 +00:00
ssl_buckets.c serf: Fix the default return value of the BIO control method. 2021-02-08 14:38:59 -08:00