summaryrefslogtreecommitdiff
path: root/src/mongo/util/version.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2018-02-15 11:45:42 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2018-02-15 11:45:42 -0500
commit482e6bedec49a7066b55c54e54797db76ac1dcda (patch)
tree3143f6cab1ba0f56295eec4434e9828f9448c557 /src/mongo/util/version.cpp
parentb778690717b7aab1b0cb5274ce562d373c1bee4c (diff)
downloadmongo-482e6bedec49a7066b55c54e54797db76ac1dcda.tar.gz
SERVER-22411 Add stub implementation of ASIO SChannel integration
Diffstat (limited to 'src/mongo/util/version.cpp')
-rw-r--r--src/mongo/util/version.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mongo/util/version.cpp b/src/mongo/util/version.cpp
index 41933e8c9ac..9536caf1516 100644
--- a/src/mongo/util/version.cpp
+++ b/src/mongo/util/version.cpp
@@ -34,8 +34,10 @@
#include "mongo/config.h"
#ifdef MONGO_CONFIG_SSL
+#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL
#include <openssl/crypto.h>
#endif
+#endif
#include <pcrecpp.h>
@@ -145,7 +147,13 @@ void VersionInfoInterface::appendBuildInfo(BSONObjBuilder* result) const {
BSONObjBuilder opensslInfo(result->subobjStart("openssl"));
#ifdef MONGO_CONFIG_SSL
+#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL
opensslInfo << "running" << openSSLVersion() << "compiled" << OPENSSL_VERSION_TEXT;
+#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS
+ opensslInfo << "Windows SChannel";
+#else
+#error "Unknown SSL Provider"
+#endif // MONGO_CONFIG_SSL_PROVIDER
#else
opensslInfo << "running"
<< "disabled"
@@ -168,9 +176,9 @@ void VersionInfoInterface::appendBuildInfo(BSONObjBuilder* result) const {
}
std::string VersionInfoInterface::openSSLVersion(StringData prefix, StringData suffix) const {
-#ifndef MONGO_CONFIG_SSL
+#if !defined(MONGO_CONFIG_SSL) || MONGO_CONFIG_SSL_PROVIDER != SSL_PROVIDER_OPENSSL
return "";
-#else
+#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL
return prefix.toString() + SSLeay_version(SSLEAY_VERSION) + suffix;
#endif
}
@@ -182,7 +190,7 @@ void VersionInfoInterface::logTargetMinOS() const {
void VersionInfoInterface::logBuildInfo() const {
log() << "git version: " << gitVersion();
-#ifdef MONGO_CONFIG_SSL
+#if defined(MONGO_CONFIG_SSL) && MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL
log() << openSSLVersion("OpenSSL version: ");
#endif