Blame SOURCES/openssl-1.1.1-alpn-cb.patch
|
|
9b88be |
commit 9e885a707d604e9528b5491b78fb9c00f41193fc
|
|
|
9b88be |
Author: Tomas Mraz <tmraz@fedoraproject.org>
|
|
|
9b88be |
Date: Thu Mar 26 15:59:00 2020 +0100
|
|
|
9b88be |
|
|
|
9b88be |
s_server: Properly indicate ALPN protocol mismatch
|
|
|
9b88be |
|
|
|
9b88be |
Return SSL_TLSEXT_ERR_ALERT_FATAL from alpn_select_cb so that
|
|
|
9b88be |
an alert is sent to the client on ALPN protocol mismatch.
|
|
|
9b88be |
|
|
|
9b88be |
Fixes: #2708
|
|
|
9b88be |
|
|
|
9b88be |
Reviewed-by: Matt Caswell <matt@openssl.org>
|
|
|
9b88be |
(Merged from https://github.com/openssl/openssl/pull/11415)
|
|
|
9b88be |
|
|
|
9b88be |
diff --git a/apps/s_server.c b/apps/s_server.c
|
|
|
9b88be |
index bcc83e562c..591c6c19c5 100644
|
|
|
9b88be |
--- a/apps/s_server.c
|
|
|
9b88be |
+++ b/apps/s_server.c
|
|
|
9b88be |
@@ -707,7 +707,7 @@ static int alpn_cb(SSL *s, const unsigned char **out, unsigned char *outlen,
|
|
|
9b88be |
if (SSL_select_next_proto
|
|
|
9b88be |
((unsigned char **)out, outlen, alpn_ctx->data, alpn_ctx->len, in,
|
|
|
9b88be |
inlen) != OPENSSL_NPN_NEGOTIATED) {
|
|
|
9b88be |
- return SSL_TLSEXT_ERR_NOACK;
|
|
|
9b88be |
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
|
|
|
9b88be |
}
|
|
|
9b88be |
|
|
|
9b88be |
if (!s_quiet) {
|