Commit 14edd123 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Refactor the code for the anti-replay

parent e6ffdb23
...@@ -219,18 +219,20 @@ int ConnectionHandler::create_single_worker() { ...@@ -219,18 +219,20 @@ int ConnectionHandler::create_single_worker() {
auto config = get_config(); auto config = get_config();
auto &tlsconf = config->tls; auto &tlsconf = config->tls;
auto &memcachedconf = config->tls.session_cache.memcached;
SSL_CTX *session_cache_ssl_ctx = nullptr; SSL_CTX *session_cache_ssl_ctx = nullptr;
{
auto &memcachedconf = config->tls.session_cache.memcached;
if (memcachedconf.tls) { if (memcachedconf.tls) {
session_cache_ssl_ctx = tls::create_ssl_client_context( session_cache_ssl_ctx = tls::create_ssl_client_context(
#ifdef HAVE_NEVERBLEED #ifdef HAVE_NEVERBLEED
nb_.get(), nb_.get(),
#endif // HAVE_NEVERBLEED #endif // HAVE_NEVERBLEED
tlsconf.cacert, memcachedconf.cert_file, memcachedconf.private_key_file, tlsconf.cacert, memcachedconf.cert_file,
nullptr); memcachedconf.private_key_file, nullptr);
all_ssl_ctx_.push_back(session_cache_ssl_ctx); all_ssl_ctx_.push_back(session_cache_ssl_ctx);
} }
}
single_worker_ = make_unique<Worker>( single_worker_ = make_unique<Worker>(
loop_, sv_ssl_ctx, cl_ssl_ctx, session_cache_ssl_ctx, cert_tree_.get(), loop_, sv_ssl_ctx, cl_ssl_ctx, session_cache_ssl_ctx, cert_tree_.get(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment