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

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