diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2020-06-26 15:42:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-08 23:23:41 +0000 |
commit | b0b09d66b99d80a0a65c4bc552b6e9f443aadb3b (patch) | |
tree | dca13f3eab48c9edb4f276ba89f5c8efd4338b5f /src/mongo/client/async_client.cpp | |
parent | 8895e4ca0321aa121cd0558a8622286bdf1f41b2 (diff) | |
download | mongo-b0b09d66b99d80a0a65c4bc552b6e9f443aadb3b.tar.gz |
SERVER-49112 Add Session::getSSLConfiguration
Diffstat (limited to 'src/mongo/client/async_client.cpp')
-rw-r--r-- | src/mongo/client/async_client.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/client/async_client.cpp b/src/mongo/client/async_client.cpp index 55cf701b484..41d08e5245e 100644 --- a/src/mongo/client/async_client.cpp +++ b/src/mongo/client/async_client.cpp @@ -52,6 +52,7 @@ #include "mongo/rpc/reply_interface.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/net/ssl_manager.h" +#include "mongo/util/net/ssl_peer_info.h" #include "mongo/util/version.h" namespace mongo { @@ -153,8 +154,9 @@ Future<void> AsyncDBClient::authenticate(const BSONObj& params) { // We will only have a valid clientName if SSL is enabled. std::string clientName; #ifdef MONGO_CONFIG_SSL - if (getSSLManager()) { - clientName = getSSLManager()->getSSLConfiguration().clientSubjectName.toString(); + auto sslConfiguration = _session->getSSLConfiguration(); + if (sslConfiguration) { + clientName = sslConfiguration->clientSubjectName.toString(); } #endif @@ -169,8 +171,9 @@ Future<void> AsyncDBClient::authenticateInternal(boost::optional<std::string> me // We will only have a valid clientName if SSL is enabled. std::string clientName; #ifdef MONGO_CONFIG_SSL - if (getSSLManager()) { - clientName = getSSLManager()->getSSLConfiguration().clientSubjectName.toString(); + auto sslConfiguration = _session->getSSLConfiguration(); + if (sslConfiguration) { + clientName = sslConfiguration->clientSubjectName.toString(); } #endif |