summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/ssl_manager.cpp
diff options
context:
space:
mode:
authorIsabella Siu <isabella.siu@10gen.com>2019-01-04 16:04:27 -0500
committerIsabella Siu <isabella.siu@10gen.com>2019-01-09 11:10:11 -0500
commit0e237325a508f3c49eb6a19ea4a9dbb7c6053058 (patch)
treeadd0173dfb7aa76504b1d0cd18c251fcbfeb099f /src/mongo/util/net/ssl_manager.cpp
parent5d0f13334445fca6e2c5bfc496b5d5b1cb7e0f8a (diff)
downloadmongo-0e237325a508f3c49eb6a19ea4a9dbb7c6053058.tar.gz
SERVER-38738 collapse all getSSLManager() to one implementation and remove mutex
Diffstat (limited to 'src/mongo/util/net/ssl_manager.cpp')
-rw-r--r--src/mongo/util/net/ssl_manager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp
index ac772a97a01..7035053b51f 100644
--- a/src/mongo/util/net/ssl_manager.cpp
+++ b/src/mongo/util/net/ssl_manager.cpp
@@ -53,6 +53,9 @@
#include "mongo/util/text.h"
namespace mongo {
+
+SSLManagerInterface* theSSLManager = nullptr;
+
namespace {
// Some of these duplicate the std::isalpha/std::isxdigit because we don't want them to be
@@ -575,7 +578,7 @@ TLSVersionCounts& TLSVersionCounts::get(ServiceContext* serviceContext) {
MONGO_INITIALIZER_WITH_PREREQUISITES(SSLManagerLogger, ("SSLManager", "GlobalLogManager"))
(InitializerContext*) {
if (!isSSLServer || (sslGlobalParams.sslMode.load() != SSLParams::SSLMode_disabled)) {
- const auto& config = getSSLManager()->getSSLConfiguration();
+ const auto& config = theSSLManager->getSSLConfiguration();
if (!config.clientSubjectName.empty()) {
LOG(1) << "Client Certificate Name: " << config.clientSubjectName;
}
@@ -1159,6 +1162,10 @@ void recordTLSVersion(TLSVersion version, const HostAndPort& hostForLogging) {
}
}
+SSLManagerInterface* getSSLManager() {
+ return theSSLManager;
+}
+
} // namespace mongo
// TODO SERVER-11601 Use NFC Unicode canonicalization