nghttpx: Only send SCT for leaf certificate

This commit is contained in:
Tatsuhiro Tsujikawa 2017-04-09 14:38:18 +09:00
parent c569830dfc
commit 4d10dce61d
1 changed files with 5 additions and 0 deletions

View File

@ -554,6 +554,11 @@ int sct_add_cb(SSL *ssl, unsigned int ext_type, unsigned int context,
<< ", context=" << std::hex << context; << ", context=" << std::hex << context;
} }
// We only have SCTs for leaf certificate.
if (chainidx != 0) {
return 0;
}
auto ssl_ctx = SSL_get_SSL_CTX(ssl); auto ssl_ctx = SSL_get_SSL_CTX(ssl);
auto tls_ctx_data = auto tls_ctx_data =
static_cast<TLSContextData *>(SSL_CTX_get_app_data(ssl_ctx)); static_cast<TLSContextData *>(SSL_CTX_get_app_data(ssl_ctx));