summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Marks <gabriel.marks@mongodb.com>2021-09-29 14:29:26 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-08 19:29:03 +0000
commit230477b7740ec1aa111ce5035a5f8f6a1cd2dd7e (patch)
treed17f59f4c82c3184609d009812f2d056b86230de /src
parentda476fa31ffd606be05d0f1c170bca091bfd65d1 (diff)
downloadmongo-230477b7740ec1aa111ce5035a5f8f6a1cd2dd7e.tar.gz
SERVER-60224 Add SetupOpenSSL as prerequisite for AuditManager initializer
Diffstat (limited to 'src')
-rw-r--r--src/mongo/crypto/SConscript1
-rw-r--r--src/mongo/crypto/symmetric_crypto.cpp1
-rw-r--r--src/mongo/util/net/SConscript3
-rw-r--r--src/mongo/util/net/openssl_init.cpp2
4 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/crypto/SConscript b/src/mongo/crypto/SConscript
index b23e4b387de..4015128bb82 100644
--- a/src/mongo/crypto/SConscript
+++ b/src/mongo/crypto/SConscript
@@ -69,7 +69,6 @@ if get_option('ssl') == 'on':
],
LIBDEPS=[
'$BUILD_DIR/mongo/base/secure_allocator',
- '$BUILD_DIR/mongo/util/net/openssl_init' if 'openssl' in env['MONGO_CRYPTO'] else '',
'$BUILD_DIR/mongo/util/secure_zero_memory',
],
)
diff --git a/src/mongo/crypto/symmetric_crypto.cpp b/src/mongo/crypto/symmetric_crypto.cpp
index 825fb21efd7..fc26c3f1bc6 100644
--- a/src/mongo/crypto/symmetric_crypto.cpp
+++ b/src/mongo/crypto/symmetric_crypto.cpp
@@ -48,6 +48,7 @@ namespace mongo {
namespace crypto {
MONGO_INITIALIZER(CreateKeyEntropySource)(InitializerContext* context) {}
+MONGO_INITIALIZER(CryptographyInitialized)(InitializerContext* context) {}
size_t aesGetIVSize(crypto::aesMode mode) {
switch (mode) {
diff --git a/src/mongo/util/net/SConscript b/src/mongo/util/net/SConscript
index 11afd617e83..739097ceeb6 100644
--- a/src/mongo/util/net/SConscript
+++ b/src/mongo/util/net/SConscript
@@ -99,6 +99,9 @@ if not get_option('ssl') == 'off':
'$BUILD_DIR/mongo/base',
'ssl_options',
],
+ LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/crypto/symmetric_crypto'
+ ]
);
env.Library(
diff --git a/src/mongo/util/net/openssl_init.cpp b/src/mongo/util/net/openssl_init.cpp
index 6dd58bb23c4..2259b47a924 100644
--- a/src/mongo/util/net/openssl_init.cpp
+++ b/src/mongo/util/net/openssl_init.cpp
@@ -162,7 +162,7 @@ void setupFIPS() {
#endif
}
-MONGO_INITIALIZER(SetupOpenSSL)(InitializerContext*) {
+MONGO_INITIALIZER_GENERAL(SetupOpenSSL, (), ("CryptographyInitialized"))(InitializerContext*) {
SSL_library_init();
SSL_load_error_strings();
ERR_load_crypto_strings();