Fix a bug in ALPN comparation code of a test case
authorPaul Yang <yang.yang@baishancloud.com>
Tue, 10 Oct 2017 16:25:26 +0000 (00:25 +0800)
committerMatt Caswell <matt@openssl.org>
Mon, 16 Oct 2017 09:08:53 +0000 (10:08 +0100)
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4497)

test/sslapitest.c

index 3412aff17f1a519f25b9820e248c9722e7076cee..6267ce8e92aaccc5a35b66877d4488105b3d3b14 100644 (file)
@@ -1987,7 +1987,7 @@ static int alpn_select_cb(SSL *ssl, const unsigned char **out,
             return SSL_TLSEXT_ERR_NOACK;
 
         if (protlen == strlen(servalpn)
-                && memcmp(prot, "goodalpn", protlen) == 0) {
+                && memcmp(prot, servalpn, protlen) == 0) {
             *out = prot;
             *outlen = protlen;
             return SSL_TLSEXT_ERR_OK;