Blame SOURCES/openssl-1.1.1-alpn-cb.patch

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