summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/ssl_manager_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/net/ssl_manager_windows.cpp')
-rw-r--r--src/mongo/util/net/ssl_manager_windows.cpp30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/mongo/util/net/ssl_manager_windows.cpp b/src/mongo/util/net/ssl_manager_windows.cpp
index 6ab4fc2d485..499c74b97eb 100644
--- a/src/mongo/util/net/ssl_manager_windows.cpp
+++ b/src/mongo/util/net/ssl_manager_windows.cpp
@@ -566,9 +566,9 @@ int SSLManagerWindows::SSL_write(SSLConnectionInterface* connInterface, const vo
}
default:
LOGV2_FATAL(23283,
- "Unexpected ASIO state: {state}",
+ "Unexpected ASIO state: {wantStateInt}",
"Unexpected ASIO state",
- "state"_attr = static_cast<int>(want));
+ "wantStateInt"_attr = static_cast<int>(want));
MONGO_UNREACHABLE;
}
}
@@ -1821,30 +1821,16 @@ Status validatePeerCertificate(const std::string& remoteHost,
msg << "The server certificate does not match the host name. Hostname: " << remoteHost
<< " does not match " << certificateNames.str();
-
if (allowInvalidCertificates) {
LOGV2_WARNING(23274,
"SSL peer certificate validation failed ({errorCode}): {error}",
- "SSL peer certificate validation failed",
"errorCode"_attr = integerToHex(certChainPolicyStatus.dwError),
"error"_attr = errnoWithDescription(certChainPolicyStatus.dwError));
-
- LOGV2_WARNING(23275,
- "The server certificate does not match the host name. Hostname: "
- "{remoteHost} does not match {certificateNames}",
- "The server certificate does not match the host name",
- "remoteHost"_attr = remoteHost,
- "certificateNames"_attr = certificateNames.str());
-
+ LOGV2_WARNING(23275, "{msg}", "msg"_attr = msg.ss.str());
*peerSubjectName = SSLX509Name();
return Status::OK();
} else if (allowInvalidHostnames) {
- LOGV2_WARNING(23276,
- "The server certificate does not match the host name. Hostname: "
- "{remoteHost} does not match {certificateNames}",
- "The server certificate does not match the host name",
- "remoteHost"_attr = remoteHost,
- "certificateNames"_attr = certificateNames.str());
+ LOGV2_WARNING(23276, "{msg}", "msg"_attr = msg.ss.str());
return Status::OK();
} else {
return Status(ErrorCodes::SSLHandshakeFailed, msg);
@@ -1854,13 +1840,7 @@ Status validatePeerCertificate(const std::string& remoteHost,
msg << "SSL peer certificate validation failed: ("
<< integerToHex(certChainPolicyStatus.dwError) << ")"
<< errnoWithDescription(certChainPolicyStatus.dwError);
-
-
- LOGV2_ERROR(23279,
- "SSL peer certificate validation failed: ({errorCode}){error}",
- "SSL peer certificate validation failed",
- "errorCode"_attr = integerToHex(certChainPolicyStatus.dwError),
- "error"_attr = errnoWithDescription(certChainPolicyStatus.dwError));
+ LOGV2_ERROR(23279, "{msg}", "msg"_attr = msg.ss.str());
return Status(ErrorCodes::SSLHandshakeFailed, msg);
}
}