nghttpx: Fix crash with --http2-bridge and both frontend and backend TLS

This commit is contained in:
Tatsuhiro Tsujikawa 2015-06-24 21:31:17 +09:00
parent 7780c07838
commit 285c74c394
1 changed files with 8 additions and 0 deletions

View File

@ -543,6 +543,14 @@ void ConnectionHandler::proceed_next_cert_ocsp() {
auto ssl_ctx = all_ssl_ctx_[ocsp_.next]; auto ssl_ctx = all_ssl_ctx_[ocsp_.next];
auto tls_ctx_data = auto tls_ctx_data =
static_cast<ssl::TLSContextData *>(SSL_CTX_get_app_data(ssl_ctx)); static_cast<ssl::TLSContextData *>(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; auto cert_file = tls_ctx_data->cert_file;
if (start_ocsp_update(cert_file) != 0) { if (start_ocsp_update(cert_file) != 0) {