nghttpx: Require TLSv1.2 or TLSv1.1 for NPN as well

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-26 22:51:39 +09:00
parent 6c66bd5c7c
commit 75bfbc94dd
1 changed files with 6 additions and 0 deletions

View File

@ -385,6 +385,12 @@ int ClientHandler::validate_next_proto()
if(next_proto_len == NGHTTP2_PROTO_VERSION_ID_LEN &&
memcmp(NGHTTP2_PROTO_VERSION_ID, next_proto,
NGHTTP2_PROTO_VERSION_ID_LEN) == 0) {
// For NPN, we must check security requirement here.
if(!ssl::check_http2_requirement(ssl_)) {
return -1;
}
set_bev_cb(upstream_http2_connhd_readcb, upstream_writecb,
upstream_eventcb);
upstream_ = util::make_unique<Http2Upstream>(this);