jsg [Thu, 16 Sep 2021 01:52:57 +0000 (01:52 +0000)]
drm/amdgpu/acp: Make PM domain really work
From Kai-Heng Feng
1f60072320b5f8071946e4b765cbf78a34d22a67 in linux 5.10.y/5.10.65
aff890288de2d818e4f83ec40c9315e2d735df07 in mainline linux
tb [Wed, 15 Sep 2021 17:14:26 +0000 (17:14 +0000)]
bump to LibreSSL 3.4.1
claudio [Wed, 15 Sep 2021 15:51:05 +0000 (15:51 +0000)]
Set the X509 validation depth limit to 12 or double the current depth.
When the limit is reached the object is considered invalid and the tree
traversal stops on that node.
OK beck@ job@
florian [Wed, 15 Sep 2021 15:25:56 +0000 (15:25 +0000)]
Explain that traceroute compresses * * * lines at the end of the
output when we never reach the destination.
Prompted by & input jmc
florian [Wed, 15 Sep 2021 15:18:23 +0000 (15:18 +0000)]
Rewrite and simplify dhcpleasectl(8).
With this
dhcpleasectl em0
does the same as
dhclient em0
used to do. To please people's muscle memory one can be aliased to the other.
earlier version OK benno
with lots of help massaging the output & OK deraadt
fcambus [Wed, 15 Sep 2021 10:21:30 +0000 (10:21 +0000)]
Add build infrastructure for the libclang_rt.profile library.
Not linking it to the build yet.
"go for it" mortimer@
nicm [Wed, 15 Sep 2021 07:38:30 +0000 (07:38 +0000)]
For the moment, restore if-shell and run-shell to parsing at the last
moment (when the shell command completes) rather than when first
invoked, GitHub issue 2872.
djm [Wed, 15 Sep 2021 06:56:01 +0000 (06:56 +0000)]
allow CanonicalizePermittedCNAMEs=none in ssh_config; ok markus@
florian [Wed, 15 Sep 2021 06:08:01 +0000 (06:08 +0000)]
Remove configured routes no longer present in lease.
Problem reported by claudio
OK benno
anton [Wed, 15 Sep 2021 04:59:26 +0000 (04:59 +0000)]
Improve the uhid(4) manual:
* Include the relevant header in the synopsis
* Document all supported ioctl commands
* Emphasis that a pointer is required to all ioctl commands
* Make the write(2) semantics a bit clearer
* Add files section
* Document errors
ok jmc@
anton [Wed, 15 Sep 2021 04:57:47 +0000 (04:57 +0000)]
Change the errno to ENOTTY when encountering an unknown ioctl command as
opposed of using EINVAL which is ambiguous in this context.
ok deraadt@
inoguchi [Tue, 14 Sep 2021 23:07:18 +0000 (23:07 +0000)]
Avoid typedef redefinition
"typedef struct ssl_st SSL;" is defined in ossl_typ.h.
This reverts part of r1.204.
ok tb@
deraadt [Tue, 14 Sep 2021 19:12:12 +0000 (19:12 +0000)]
sync
tb [Tue, 14 Sep 2021 16:37:20 +0000 (16:37 +0000)]
Add missing void to definition of http_init().
ok deraadt florian
kettenis [Tue, 14 Sep 2021 16:21:21 +0000 (16:21 +0000)]
Cleanup some style issues and remove some unused code. In particular,
remove the half-finished code to support the SV48 MMU page table layout.
Currently there is no hardware that supports that model and I don't expect
any hardware that does support it to show up anytime soon.
ok mlarkin@
kettenis [Tue, 14 Sep 2021 16:18:57 +0000 (16:18 +0000)]
Cleanup some style issues.
ok mlarkin@
kettenis [Tue, 14 Sep 2021 16:16:51 +0000 (16:16 +0000)]
Make pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
while walking the page tables.
ok deraadt@
kettenis [Tue, 14 Sep 2021 16:14:50 +0000 (16:14 +0000)]
Make pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
while walking the page tables.
ok mpi@, deraadt@
tb [Tue, 14 Sep 2021 14:35:09 +0000 (14:35 +0000)]
zap trailing white space
tb [Tue, 14 Sep 2021 14:31:21 +0000 (14:31 +0000)]
Call the info cb on connect/accept exit in TLSv1.3
The p5-Net-SSLeay test expects the info callback to be called on
connect exit. This is the behavior in the legacy stack but wasn't
implemented in the TLSv1.3 stack. With this commit, p5-Net-SSLeay
tests are happy again after the bump.
ok bluhm inoguchi jsing
schwarze [Tue, 14 Sep 2021 14:30:57 +0000 (14:30 +0000)]
provide a small manual page for the SSL_set_psk_use_session_callback(3)
stub, written from scratch;
OK tb@ on SSL_set_psk_use_session_callback.3
sthen [Tue, 14 Sep 2021 14:09:21 +0000 (14:09 +0000)]
/usr/bin/timeout should not be in man sets
schwarze [Tue, 14 Sep 2021 14:08:15 +0000 (14:08 +0000)]
Merge the stub SSL_SESSION_is_resumable(3) manual page from the
OpenSSL 1.1.1 branch, which is still under a free license.
A few tweaks to wording and structure by me.
OK tb@ on SSL_SESSION_is_resumable.3
schwarze [Tue, 14 Sep 2021 13:47:59 +0000 (13:47 +0000)]
As suggested by tb@, merge the description of OPENSSL_EC_NAMED_CURVE
and OPENSSL_EC_EXPLICIT_CURVE
from OpenSSL commit
146ca72c Feb 19 14:35:43 2015 +0000
after tb@ changed the default from 0 to OPENSSL_EC_NAMED_CURVE
in ec/ec_lib.c rev. 1.41,
which is the same default that OpenSSL uses since 1.1.0.
While merging, drop the description of the pre-1.1.0 behaviour.
It seems irrelevant to me because tb@ found no application in Debian
codesearch using OPENSSL_EC_EXPLICIT_CURVE. A former devious default
that was probably never relied upon by anyone does not need to be
documented.
jca [Tue, 14 Sep 2021 12:04:34 +0000 (12:04 +0000)]
Sync
jca [Tue, 14 Sep 2021 12:03:49 +0000 (12:03 +0000)]
Provide instruction cache invalidation through sysarch(RISCV_ICACHE_SYNC)
Modelled after the arm implementation. The first consumer would be
__builtin___clear_cache() in libcompiler_rt.
Input from kettenis@ and deraadt@, ok kettenis@
claudio [Tue, 14 Sep 2021 11:38:44 +0000 (11:38 +0000)]
Do not download more than 300 deltas to sync a RRDP repo. Somewhere around
300 the time it takes to fetch and process all the deltas is higher than
fetching just a snapshot.
OK job@ sthen@
mbuhl [Tue, 14 Sep 2021 11:04:21 +0000 (11:04 +0000)]
put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
OK mfriedl@
mpi [Tue, 14 Sep 2021 09:52:12 +0000 (09:52 +0000)]
Fix regression test, prodded by bluhm@
mvs [Tue, 14 Sep 2021 09:15:55 +0000 (09:15 +0000)]
Add missing kernel lock for Bi-directional Forwarding Detection data.
Also bfdset() calls pool_get(9) with PR_WAITOK flag so it should be done
before we check the existence of this `bfd', otherwise it could be added
multiple times.
We have BFD disabled in the default kernel so this diff is for
consistency mostly.
ok mpi@
jan [Tue, 14 Sep 2021 08:19:58 +0000 (08:19 +0000)]
Enable cy(4) on amd64.
ok deraadt
florian [Tue, 14 Sep 2021 07:51:51 +0000 (07:51 +0000)]
When the dhcp server is unreachable via unicast UDP retry broadcast.
The only indication we get is sendto(2) failing, so if our UDP packet
is silently dropped somewhere we won't notice.
This has been observed in the wild with a dhcp server at the remote
end of a VPN. The dhcp server is reachable via broadcast so we get an
initial lease. However the server is not in the same subnet as the
lease we are getting so to reach it unicast we depend on a default
route being set. When the VPN goes down we lose the default route [*]
and when dhcpleased then tries to renew the lease (unicast), sendto(2)
fails with "network unreachable".
[*] The exact mechanics on how this happens are unclear. I.e. why
didn't dhcpleased(8) see a link-state change and transitioned to
REBOOTING / INIT? Regardless, we shouldn't ignore sendto(2) errors.
Reported by stsp, OK benno
dv [Mon, 13 Sep 2021 22:16:27 +0000 (22:16 +0000)]
vmm(4): add limit to number of vcpus
After fixing previous syzbot issues related to lock contention, the reproducer code managed to hit an issue where it can exhaust kernel memory by allocating vcpus. Since each vcpu (regardless if it's SVM or VMX-capable) requires wiring some number of pages of memory, it was possible to starve other parts of the kernel.
This change limits the total number of vcpus to 512, a conservative number given vmm(4) only supports single vcpu guests at the moment.
ok mlarkin@
deraadt [Mon, 13 Sep 2021 17:45:59 +0000 (17:45 +0000)]
sync
jmc [Mon, 13 Sep 2021 17:43:26 +0000 (17:43 +0000)]
fix SEE ALSO;
jmc [Mon, 13 Sep 2021 17:42:47 +0000 (17:42 +0000)]
various formatting fixes;
jmc [Mon, 13 Sep 2021 17:35:27 +0000 (17:35 +0000)]
tweak text in previous and fix SEE ALSO;
claudio [Mon, 13 Sep 2021 15:26:53 +0000 (15:26 +0000)]
In X509_check_issued() do the same dance around x509v3_cache_extensions()
as in all other palces. Check the EXFLAG_SET flag first and if not set
grab the CRYPTO_LOCK_X509 before calling x509v3_cache_extensions().
OK tb@ beck@
krw [Mon, 13 Sep 2021 15:07:51 +0000 (15:07 +0000)]
disk.dk_size can't be 0 as we errx() if that happens during
DISK_open(). So eliminate pointless check when printing geometry.
Replace unit_lookup() with units_size(), reducing four
conversion dances to one. Return pointer to the unit_type used in
the conversion. unit_types[] is now needed only in misc.c.
Fewer variables make for cleaner logic.
No intentional functional change.
deraadt [Mon, 13 Sep 2021 15:05:57 +0000 (15:05 +0000)]
sync
deraadt [Mon, 13 Sep 2021 15:05:44 +0000 (15:05 +0000)]
no longer needed
robert [Mon, 13 Sep 2021 14:41:01 +0000 (14:41 +0000)]
add 7.1 syspatch pubkey
visa [Mon, 13 Sep 2021 12:19:10 +0000 (12:19 +0000)]
Remember to lock user pmap in pmap_extract()
pmap_extract() has to lock user pmap to prevent concurrent pruning
of the page table. The kernel pmap is exempt from this because it uses
a fixed page table structure.
visa [Mon, 13 Sep 2021 12:16:43 +0000 (12:16 +0000)]
Consistently use unsigned long for CPU masks in pmap.c.
robert [Mon, 13 Sep 2021 11:49:21 +0000 (11:49 +0000)]
introduce /etc/bsd.re-config which can be used to configure the kernel
using config(8);
the contents of this configuration file will be fed to config(8) after
kernel relinking is done, so on the next boot the new kernel will have
all the configuration changes set by the user
this comes handy if you still want to use KARL while making changes
to the GENERIC kernel
diff from Paul de Weerd with input from several developers
krw [Mon, 13 Sep 2021 11:44:40 +0000 (11:44 +0000)]
Document that the editing command 'disk' takes an optional units argument.
jmatthew [Mon, 13 Sep 2021 09:57:48 +0000 (09:57 +0000)]
Enable uaq(4) on amd64. Investigations into problems on other platforms
are ongoing.
robert [Mon, 13 Sep 2021 05:17:04 +0000 (05:17 +0000)]
check the installer's /tmp/i/hostname.* files for a configured IP address
so that configurations without a broadcast address are detected as well
ok sthen@
deraadt [Mon, 13 Sep 2021 04:02:15 +0000 (04:02 +0000)]
take us out of beta
jmc [Sun, 12 Sep 2021 16:37:42 +0000 (16:37 +0000)]
freebsd history is irrelevant here; pointed ok by and ok deraadt
krw [Sun, 12 Sep 2021 16:36:52 +0000 (16:36 +0000)]
Stop taking detour through unit_types[SECTORS] to find
dl.d_secsize.
Leave unit_types[SECTORS].ut_conversion at 0, and test that to
determine if a size needs to be converted from a sectors value.
Use consistent dance to find the desired size value to print.
Logic is clearer, unit_types[] is now const, nobody but misc.c
knows about SECTORS.
No intentional functional change.
tb [Sun, 12 Sep 2021 16:23:19 +0000 (16:23 +0000)]
Default to using named curve parameter encoding
The pre-OpenSSL 1.1.0 default was to use explicit curve parameter
encoding. Most applications want to use named curve parameter encoding
and have to opt into this explicitly.
Stephen Henson changed this default in OpenSSL commit
86f300d3 6 years
ago and provided a new OPENSSL_EC_EXPLICIT_CURVE define to opt back into
the old default. According to Debian's codesearch, no application
currently does this, which indicates that we currently have a bad default.
In the future it is more likely that applications expect the new
default, so we follow OpenSSL to avoid problems.
Prompted by schwarze who noted that OPENSSL_EC_EXPLICIT_CURVE is missing.
ok beck inoguchi jsing
anton [Sun, 12 Sep 2021 07:06:59 +0000 (07:06 +0000)]
annotate root only targets; ok bluhm@
anton [Sun, 12 Sep 2021 07:06:08 +0000 (07:06 +0000)]
hook up libagentx; ok martijn@
anton [Sun, 12 Sep 2021 06:58:08 +0000 (06:58 +0000)]
Revert recent uhidev report size changes. It's reported to break fido devices
for as of now unknown reasons.
deraadt [Sat, 11 Sep 2021 23:22:38 +0000 (23:22 +0000)]
Identify TPM2.0 devices and perform the 2.0-specific "suspend" command
(researched by mlarkin). With this, and the latest BIOS which added S3,
the lenovo x1r9 and x1nano can resume.
ok kettenis mlarkin
mglocker [Sat, 11 Sep 2021 22:42:12 +0000 (22:42 +0000)]
Don't set the highspeed bit on bcm2835-sdhci sdhc(4) controllers.
Same approach as on Linux and NetBSD. This fixes bwfm(4) Wi-Fi on the
Raspberry Pi 3 Model B Plus.
help and ok kettenis@
schwarze [Sat, 11 Sep 2021 18:58:41 +0000 (18:58 +0000)]
merge the description of SSL_get_tlsext_status_type(3)
from the OpenSSL 1.1.1 branch, which is still under a free license
kettenis [Sat, 11 Sep 2021 18:08:32 +0000 (18:08 +0000)]
Change the scope of the locking in pmap_extract() to prevent a race between
walking the page tables and another thread calling pmap_remove() that ends
up removing a page table page.
tested by sthen@
ok deraadt@, mpi@
schwarze [Sat, 11 Sep 2021 17:59:04 +0000 (17:59 +0000)]
Merge documentation of EC_GROUP_order_bits(3) from the OpenSSL 1.1.1
branch, which is still under a free license.
While here, also merge a few other improvements, mostly regarding
EC_GROUP_get_order(3) and EC_GROUP_get_cofactor(3); in particular,
some statements below RETURN VALUES were outright wrong.
This patch includes a few minor tweaks and an addition to HISTORY by me.
Feedback and OK tb@.
stsp [Sat, 11 Sep 2021 17:28:44 +0000 (17:28 +0000)]
Zero out iwx(4) Tx descriptors of frames which are done.
This will hopefully prevent the device from ever writing to the former
DMA address of a buffer which has been taken off the Tx ring.
As far as I understand, the Linux driver unmaps (parts of) Tx descriptors
that are done. We use a static DMA mapping for the entire descriptor array,
so unmapping is not an option for us.
Tested by several as part of my Tx aggregation support patch.
stsp [Sat, 11 Sep 2021 17:28:04 +0000 (17:28 +0000)]
Fix a bug in iwx(4) Tx done interrupt processing.
Clear the byte-count for the correct frame while taking frames off the ring.
This should fix some 'fatal firmware errors' seen under load, and prevent
memory corruption: The device could access an mbuf we have freed, but which
is still marked as used in the byte count table and which still has a DMA
address in its Tx descriptor. Problem observed by mlarkin with NFS while
testing my patch for Tx aggregation support.
job [Sat, 11 Sep 2021 13:31:31 +0000 (13:31 +0000)]
Add BGPSec Router (RFC 8209) Key Purpose OID
OK tb@
schwarze [Sat, 11 Sep 2021 09:05:50 +0000 (09:05 +0000)]
Do not ignore SIGINT while waiting for input if editline(3) is not used.
Instead, in non-interactive mode, exit sftp(1), like for other serious errors.
As pointed out by dtucker@, when compiled without editline(3) support in
portable OpenSSH, the el == NULL branch is also used for interactive mode.
In that case, discard the input line and provide a fresh prompt to the user
just like in the case where editline(3) is used.
OK djm@
schwarze [Sat, 11 Sep 2021 08:45:47 +0000 (08:45 +0000)]
Merge documentation for BN_bn2binpad(3), BN_bn2lebinpad(3),
and BN_lebin2bn(3) from the OpenSSL 1.1.1 branch,
which is still under a free license.
While here, tweak a number of details for clarity.
OK tb@
djm [Sat, 11 Sep 2021 00:40:24 +0000 (00:40 +0000)]
when using SFTP protocol, continue transferring files after a
transfer error occurs. This matches original scp/rcp behaviour.
ok dtucker@
millert [Fri, 10 Sep 2021 18:58:43 +0000 (18:58 +0000)]
Calling OpenSSL_add_all_digests() is no longer needed since the library
automatically initializes itself. OK tb@
stsp [Fri, 10 Sep 2021 16:38:35 +0000 (16:38 +0000)]
Let iwx(4) resume directly in DVACT_WAKEUP instead of running the init task.
Suggested by deraadt@ during discussion at k2k21.
With additional input from mlarkin. And deraadt spotted some pointless
splnet() calls which this patch is removing.
Resume from S3 tested by me on an x250 thinkpad with a compatible
ax200 wifi card provided by mlarkin. Hibernate tested by deraadt.
Sync comments about the PCI retry timeout workaround with Linux while here.
ok mlarkin@
krw [Fri, 10 Sep 2021 15:26:36 +0000 (15:26 +0000)]
Stop using NULL as a synonym for "s" (SECTORS). Just use "s".
Remove now pointless NULL check in unit_lookup().
No intentional functional change.
bluhm [Fri, 10 Sep 2021 15:18:36 +0000 (15:18 +0000)]
When writing a message, syslogd did a combination of putting
everything into an iov and do some sprintf() formating later. Better
put everything into the iov upfront based on what the output methods
need. Then either the full iov is written or a line is created by
concatenating.
OK martijn@
tb [Fri, 10 Sep 2021 15:10:38 +0000 (15:10 +0000)]
sync
tb [Fri, 10 Sep 2021 15:09:40 +0000 (15:09 +0000)]
crank major for libcrypto as well
'may as well' deraadt
tb [Fri, 10 Sep 2021 15:06:48 +0000 (15:06 +0000)]
major bump (same type of crank as libssl)
tb [Fri, 10 Sep 2021 15:06:12 +0000 (15:06 +0000)]
bump major after symbol addition and struct removal, struct visibility
changes
tb [Fri, 10 Sep 2021 15:05:35 +0000 (15:05 +0000)]
Update Symbols.list after API additions
tb [Fri, 10 Sep 2021 15:04:49 +0000 (15:04 +0000)]
Bump minor after symbol addition
tb [Fri, 10 Sep 2021 15:04:11 +0000 (15:04 +0000)]
Add BN_bn2{,le}binpad(), BN_lebin2bn(), EC_GROUP_order_bits to Symbols.list
ok beck inoguchi jsing
nicm [Fri, 10 Sep 2021 15:03:18 +0000 (15:03 +0000)]
Do fatal/fatalx a different way so the compiler trick to avoid warnings
becomes unnecessary, prompted by theo.
tb [Fri, 10 Sep 2021 14:58:44 +0000 (14:58 +0000)]
Move SSL_set0_rbio() outside of LIBRESSL_HAS_TLS1_3
ok inoguchi jsing
tb [Fri, 10 Sep 2021 14:57:31 +0000 (14:57 +0000)]
Expose SSL_get_tlext_status_type() in tls1.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:55:53 +0000 (14:55 +0000)]
Expose SSL_R_NO_APPLICATION_PROTOCOL in ssl.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:55:24 +0000 (14:55 +0000)]
Expose SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE in ssl.h
ok beck jsing
tb [Fri, 10 Sep 2021 14:54:14 +0000 (14:54 +0000)]
Expose SSL_CTX_get0_privatekey() in ssl.h
ok beck
tb [Fri, 10 Sep 2021 14:50:19 +0000 (14:50 +0000)]
Remove TLS1_get_{,client_}version()
ok jsing
tb [Fri, 10 Sep 2021 14:49:13 +0000 (14:49 +0000)]
Remove SSL3_RECORD and SSL3_BUFFER
with/ok jsing
tb [Fri, 10 Sep 2021 14:47:24 +0000 (14:47 +0000)]
Remove TLS1_RT_HEARTBEAT
ok jsing
tb [Fri, 10 Sep 2021 14:46:31 +0000 (14:46 +0000)]
Make SSL opaque
with/ok jsing
tb [Fri, 10 Sep 2021 14:44:25 +0000 (14:44 +0000)]
Remove struct tls_session_ticket_ext_st and TLS_SESSION_TICKET_EXT
from public visibility.
with/ok jsing
tb [Fri, 10 Sep 2021 14:39:22 +0000 (14:39 +0000)]
Uncomment LIBRESSL_HAS_{TLS1_3,DTLS1_2} in opensslfeatures.h
tb [Fri, 10 Sep 2021 14:37:14 +0000 (14:37 +0000)]
Use BN_RAND_* instead of mysterious values in the documentation of
BN_rand_range()
From OpenSSL 1.1.1l
ok beck jsing
tb [Fri, 10 Sep 2021 14:35:36 +0000 (14:35 +0000)]
Expose EC_GROUP_order_bits() in <openssl/ec.h>
ok beck jsing
tb [Fri, 10 Sep 2021 14:33:44 +0000 (14:33 +0000)]
Expose BN_bn2{,le}binpad() and BN_lebin2bn() in <openssl/bn.h>
ok beck inoguchi
tb [Fri, 10 Sep 2021 14:32:05 +0000 (14:32 +0000)]
Expose BN_RAND_* in <openssl/bn.h>
ok beck jsing
nicm [Fri, 10 Sep 2021 14:22:24 +0000 (14:22 +0000)]
Get rid of the last two warnings by turning them off around the problem
statements, if the compiler supports it.
schwarze [Fri, 10 Sep 2021 13:23:44 +0000 (13:23 +0000)]
Quirk-compatibility with GNU tbl(1):
With the "nospaces" option, skip space characters before and after "T{",
in addition to skipping those at the beginning and end of data cells.
Minor issue reported by <Oliver dot Corff at email dot de>.
claudio [Fri, 10 Sep 2021 13:20:03 +0000 (13:20 +0000)]
Properly handle keep-alive for HTTP/1.1. If the server uses HTTP/1.1
keep-alive is the default. Check this early on and disable keep-alive
if a Connection: closed header is sent. Fixes the keep-alive issues
I have seen.
OK sthen@
schwarze [Fri, 10 Sep 2021 12:06:29 +0000 (12:06 +0000)]
In a tbl(7) having the "nospaces" option, skip space characters
not only at the end of data cells, but also after "T}",
aligning the behaviour of the parser with GNU tbl(1).
Issue reported by <Oliver dot Corff at email dot de>.
dtucker [Fri, 10 Sep 2021 11:38:38 +0000 (11:38 +0000)]
Document that non-interactive commands are run via the user's shell
using the -c flag. ok jmc@
dtucker [Fri, 10 Sep 2021 10:26:02 +0000 (10:26 +0000)]
Document behaviour of arguments following non-interactive commands.
Prompted by github PR#139 from EvanTheB, feedback & ok djm@ jmc@
tb [Fri, 10 Sep 2021 09:25:29 +0000 (09:25 +0000)]
Do not ignore SSL_TLSEXT_ERR_FATAL from the ALPN callback
As reported by Jeremy Harris, we inherited a strange behavior from
OpenSSL, in that we ignore the SSL_TLSEXT_ERR_FATAL return from the
ALPN callback. RFC 7301, 3.2 states: 'In the event that the server
supports no protocols that the client advertises, then the server
SHALL respond with a fatal "no_application_protocol" alert.'
Honor this requirement and succeed only on SSL_TLSEXT_ERR_{OK,NOACK}
which is the current behavior of OpenSSL. The documentation change
is taken from OpenSSL 1.1.1 as well.
As pointed out by jsing, there is more to be fixed here:
- ensure that the same protocol is selected on session resumption
- should the callback be called even if no ALPN extension was sent?
- ensure for TLSv1.2 and earlier that the SNI has already been processed
ok beck jsing