Move SSL_CTX sessionContext initialization into main SSL_CTX initialization path
authorAnirudh Ramachandran <avr@fb.com>
Mon, 11 Sep 2017 11:54:57 +0000 (04:54 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 11 Sep 2017 12:08:50 +0000 (05:08 -0700)
Summary: This field was only previously set if setupSessionCache was called on the wangle::ServerSSLContext

Reviewed By: yfeldblum

Differential Revision: D5776057

fbshipit-source-id: ecdbe83816fee2ecbe7ea1b26a67b682a571309a

folly/io/async/SSLContext.cpp

index 58f6defad2f8d58f084228897e11e9e58334ee67..aee7ec757708316f25dfa2ace511366e124aa08e 100644 (file)
@@ -573,8 +573,7 @@ void SSLContext::setSessionCacheContext(const std::string& context) {
       ctx_,
       reinterpret_cast<const unsigned char*>(context.data()),
       std::min<unsigned int>(
-          static_cast<unsigned int>(context.length()),
-          SSL_MAX_SSL_SESSION_ID_LENGTH));
+          static_cast<unsigned int>(context.length()), SSL_MAX_SID_CTX_LENGTH));
 }
 
 /**