--- src/mongo/util/net/ssl_manager.cpp.orig +++ src/mongo/util/net/ssl_manager.cpp @@ -186,6 +186,7 @@ void SSLManager::_setupFIPS() { // Turn on FIPS mode if requested. +#ifdef OPENSSL_FIPS int status = FIPS_mode_set(1); if (!status) { error() << "can't activate FIPS mode: " << @@ -193,6 +194,10 @@ fassertFailed(16703); } log() << "FIPS 140-2 mode activated" << endl; +#else + error() << "this version of mongodb was not compiled with FIPS support"; + fassertFailed(17084); +#endif } bool SSLManager::_setupPEM(const std::string& keyFile , const std::string& password) { .