diff options
author | tb <> | 2021-09-10 09:25:29 +0000 |
---|---|---|
committer | tb <> | 2021-09-10 09:25:29 +0000 |
commit | 47a94cad06ffc8bf1c64c7870f0dc905ed8485e4 (patch) | |
tree | 2fcdf6ff9ae24aab6ae8fc69b1f46e80b647dd92 /src/lib/libssl/ssl_err.c | |
parent | d17eb2a4cbcb7c76bb5dd38f9d1c26044d64118f (diff) | |
download | openbsd-47a94cad06ffc8bf1c64c7870f0dc905ed8485e4.tar.gz openbsd-47a94cad06ffc8bf1c64c7870f0dc905ed8485e4.tar.bz2 openbsd-47a94cad06ffc8bf1c64c7870f0dc905ed8485e4.zip |
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
Diffstat (limited to 'src/lib/libssl/ssl_err.c')
-rw-r--r-- | src/lib/libssl/ssl_err.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c index 8507690f79..9ea7cd469a 100644 --- a/src/lib/libssl/ssl_err.c +++ b/src/lib/libssl/ssl_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_err.c,v 1.38 2021/05/16 08:24:21 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_err.c,v 1.39 2021/09/10 09:25:29 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -294,6 +294,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= { | |||
294 | {ERR_REASON(SSL_R_MISSING_VERIFY_MESSAGE), "missing verify message"}, | 294 | {ERR_REASON(SSL_R_MISSING_VERIFY_MESSAGE), "missing verify message"}, |
295 | {ERR_REASON(SSL_R_MULTIPLE_SGC_RESTARTS) , "multiple sgc restarts"}, | 295 | {ERR_REASON(SSL_R_MULTIPLE_SGC_RESTARTS) , "multiple sgc restarts"}, |
296 | {ERR_REASON(SSL_R_NON_SSLV2_INITIAL_PACKET), "non sslv2 initial packet"}, | 296 | {ERR_REASON(SSL_R_NON_SSLV2_INITIAL_PACKET), "non sslv2 initial packet"}, |
297 | {ERR_REASON(SSL_R_NO_APPLICATION_PROTOCOL), "no application protocol"}, | ||
297 | {ERR_REASON(SSL_R_NO_CERTIFICATES_RETURNED), "no certificates returned"}, | 298 | {ERR_REASON(SSL_R_NO_CERTIFICATES_RETURNED), "no certificates returned"}, |
298 | {ERR_REASON(SSL_R_NO_CERTIFICATE_ASSIGNED), "no certificate assigned"}, | 299 | {ERR_REASON(SSL_R_NO_CERTIFICATE_ASSIGNED), "no certificate assigned"}, |
299 | {ERR_REASON(SSL_R_NO_CERTIFICATE_RETURNED), "no certificate returned"}, | 300 | {ERR_REASON(SSL_R_NO_CERTIFICATE_RETURNED), "no certificate returned"}, |