diff options
Diffstat (limited to 'database/mongodb/fips.patch')
-rw-r--r-- | database/mongodb/fips.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/database/mongodb/fips.patch b/database/mongodb/fips.patch new file mode 100644 index 0000000000..c0da948ea1 --- /dev/null +++ b/database/mongodb/fips.patch @@ -0,0 +1,21 @@ +--- 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) { |