From 285c74c39418537bc5b3f949be301cdb1f9e39f0 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 24 Jun 2015 21:31:17 +0900 Subject: [PATCH] nghttpx: Fix crash with --http2-bridge and both frontend and backend TLS --- src/shrpx_connection_handler.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/shrpx_connection_handler.cc b/src/shrpx_connection_handler.cc index cd93d44d..cbe828b8 100644 --- a/src/shrpx_connection_handler.cc +++ b/src/shrpx_connection_handler.cc @@ -543,6 +543,14 @@ void ConnectionHandler::proceed_next_cert_ocsp() { auto ssl_ctx = all_ssl_ctx_[ocsp_.next]; auto tls_ctx_data = static_cast(SSL_CTX_get_app_data(ssl_ctx)); + + // client SSL_CTX is also included in all_ssl_ctx_, but has no + // tls_ctx_data. + if (!tls_ctx_data) { + ++ocsp_.next; + continue; + } + auto cert_file = tls_ctx_data->cert_file; if (start_ocsp_update(cert_file) != 0) {