summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/ssl_manager.cpp
diff options
context:
space:
mode:
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