diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2015-02-05 17:32:09 -0500 |
---|---|---|
committer | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-02-09 16:50:52 -0500 |
commit | 656c47bc864f5fa2a1c95fbdd2cf671d7d6ab669 (patch) | |
tree | 5c80620f3c80a99f5b6d60c2edeaadabc560d1f0 | |
parent | e2e41c48d6d8f1793177abf3299066caf37cea52 (diff) | |
download | mongo-656c47bc864f5fa2a1c95fbdd2cf671d7d6ab669.tar.gz |
SERVER-17022 Re-enable SSL caching as it didn't fix SERVER-10261
(cherry picked from commit 74e5e2904304bef4b874c4ba68fe4e6671e1c12b)
-rw-r--r-- | src/mongo/util/net/ssl_manager.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp index 8526d9b323e..4460abbe78b 100644 --- a/src/mongo/util/net/ssl_manager.cpp +++ b/src/mongo/util/net/ssl_manager.cpp @@ -595,9 +595,14 @@ namespace mongo { // Note: this is for blocking sockets only. SSL_CTX_set_mode(*context, SSL_MODE_AUTO_RETRY); - // Disable session caching (see SERVER-10261) - SSL_CTX_set_session_cache_mode(*context, SSL_SESS_CACHE_OFF); - + massert(28606, + mongoutils::str::stream() << "can't store ssl session id context: " << + getSSLErrorMessage(ERR_get_error()), + SSL_CTX_set_session_id_context( + *context, + static_cast<unsigned char*>(static_cast<void*>(context)), + sizeof(*context))); + // Use the clusterfile for internal outgoing SSL connections if specified if (context == &_clientContext && !params.clusterfile.empty()) { EVP_set_pw_prompt("Enter cluster certificate passphrase"); |