Skip to content

Commit b6fed72

Browse files
committed
PHPC-1483: Enable MONGODB-AWS auth in libmongoc
1 parent 922f6a6 commit b6fed72

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ 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" && "$PHP_MONGODB_SSL" != "no"; then
393+
if test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" != "yes" && test "$PHP_MONGODB_SSL" != "no"; then
394+
AC_SUBST(MONGOC_ENABLE_MONGODB_AWS_AUTH, 1)
394395
PHP_MONGODB_ADD_SOURCES([src/libmongoc/src/kms-message/src/], $PHP_MONGODB_KMS_MESSAGE_SOURCES, $PHP_MONGODB_BUNDLED_CFLAGS)
395396
PHP_MONGODB_ADD_INCLUDE([src/libmongoc/src/kms-message/src/])
396397
PHP_MONGODB_ADD_BUILD_DIR([src/libmongoc/src/kms-message/src/])
@@ -416,6 +417,8 @@ if test "$PHP_MONGODB" != "no"; then
416417
fi
417418

418419
if test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" = "yes"; then
420+
dnl Since libmongocrypt adds kms-message, we can enable AWS auth in this case
421+
AC_SUBST(MONGOC_ENABLE_MONGODB_AWS_AUTH, 1)
419422
AC_SUBST(MONGOCRYPT_ENABLE_TRACE, 1)
420423

421424
dnl Generated with: find src/libmongocrypt/src -maxdepth 1 -name '*.c' -print0 | cut -sz -d / -f 4- | sort -dz | tr '\000' ' '

config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ if (PHP_MONGODB != "no") {
213213
mongoc_opts.MONGOC_ENABLE_CRYPTO_LIBCRYPTO = 1;
214214
mongoc_opts.MONGOC_ENABLE_SSL = 1;
215215
mongoc_opts.MONGOC_ENABLE_CRYPTO = 1;
216+
mongoc_opts.MONGOC_ENABLE_MONGODB_AWS_AUTH = 1;
216217

217218
ADD_FLAG("CFLAGS_MONGODB", "/D KMS_MSG_STATIC=1 /D KMS_MESSAGE_ENABLE_CRYPTO=1 /D KMS_MESSAGE_ENABLE_CRYPTO_LIBCRYPTO=1");
218219
} else {

0 commit comments

Comments
 (0)