From cb73fa1d3b45e111dd8ab6da4ab028c9c54f25a4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 5 Nov 2015 21:26:38 +0900 Subject: [PATCH] h2load: Return SSL_TLSEXT_ERR_NOACK if there is protocol list overlap in NPN --- src/h2load.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/h2load.cc b/src/h2load.cc index 61e1112a..2ef99e78 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -1171,12 +1171,11 @@ int client_select_next_proto_cb(SSL *ssl, unsigned char **out, if (util::select_protocol(const_cast(out), outlen, in, inlen, config.npn_list)) { return SSL_TLSEXT_ERR_OK; - } else if (inlen == 0) { - std::cout - << "Server does not support NPN. Fallback behaviour may be activated." - << std::endl; } - return SSL_TLSEXT_ERR_OK; + + // OpenSSL will terminate handshake with fatal alert if we return + // NOACK. So there is no way to fallback. + return SSL_TLSEXT_ERR_NOACK; } } // namespace