diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2020-07-29 20:40:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-30 18:20:02 +0000 |
commit | c9d4e17ff66e66f8680db86d4256c0d1fbbffae5 (patch) | |
tree | e8a2fa43857c5e33e18943d8be41ef244e760453 /src/mongo/transport/session_asio.h | |
parent | 311b7982f61009fd08bd7b76b1638d62cc8703de (diff) | |
download | mongo-c9d4e17ff66e66f8680db86d4256c0d1fbbffae5.tar.gz |
SERVER-49080 Add SNI extension logging
Diffstat (limited to 'src/mongo/transport/session_asio.h')
-rw-r--r-- | src/mongo/transport/session_asio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/transport/session_asio.h b/src/mongo/transport/session_asio.h index e0e9701857b..263f76439e4 100644 --- a/src/mongo/transport/session_asio.h +++ b/src/mongo/transport/session_asio.h @@ -713,6 +713,15 @@ private: } }; return doHandshake().then([this](size_t size) { + if (_sslSocket->get_sni()) { + auto sniName = _sslSocket->get_sni().get(); + LOGV2_DEBUG(4908000, + 2, + "Client connected with SNI extension", + "sniName"_attr = sniName); + } else { + LOGV2_DEBUG(4908001, 2, "Client connected without SNI extension"); + } if (SSLPeerInfo::forSession(shared_from_this()).subjectName.empty()) { return getSSLManager() ->parseAndValidatePeerCertificate(_sslSocket->native_handle(), |