Skip to content

Commit a22f49f

Browse files
committed
Only enable kms-message support if an SSL library was found
1 parent 4ffd8a2 commit a22f49f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ if test "$PHP_MONGODB" != "no"; then
390390

391391
dnl If compiling without libmongocrypt, use kms_message sources bundled with libmongoc.
392392
dnl If compiling with libmongocrypt, kms_message bundled with libmongocrypt is used as it is most likely newer.
393-
if test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" != "yes"; then
393+
if test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" != "yes" && "$PHP_MONGODB_SSL" != "no"; then
394394
PHP_MONGODB_ADD_SOURCES([src/libmongoc/src/kms-message/src/], $PHP_MONGODB_KMS_MESSAGE_SOURCES, $PHP_MONGODB_BUNDLED_CFLAGS)
395395
PHP_MONGODB_ADD_INCLUDE([src/libmongoc/src/kms-message/src/])
396396
PHP_MONGODB_ADD_BUILD_DIR([src/libmongoc/src/kms-message/src/])

config.w32

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,11 @@ if (PHP_MONGODB != "no") {
285285
mongocrypt_opts
286286
);
287287
} else if (PHP_MONGODB_CLIENT_SIDE_ENCRYPTION != "no") {
288+
// No SSL library found, we can't enable libmongocrypt
288289
WARNING("mongodb libmongocrypt support not enabled, crypto libs not found");
290+
}
289291

292+
if (PHP_MONGODB_CLIENT_SIDE_ENCRYPTION == "no" && mongoc_ssl_found) {
290293
// Add kms_message sources bundled with libmongoc
291294
ADD_SOURCES(configure_module_dirname + "/src/libmongoc/src/kms_message/src", PHP_MONGODB_KMS_MESSAGE_SOURCES, "mongodb");
292295
ADD_FLAG("CFLAGS_MONGODB", "/I" + configure_module_dirname + "/src/libmongoc/src/kms-message/src");

0 commit comments

Comments
 (0)