Skip to content

CDRIVER-4817 update compile-libmongocrypt for KMIP delegated #1563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .evergreen/scripts/compile-libmongocrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ compile_libmongocrypt() {
# git clone -q --depth=1 https://github.com/mongodb/libmongocrypt --branch 1.9.0 || return
{
git clone -q https://github.com/mongodb/libmongocrypt || return
# Check out commit containing MONGOCRYPT-605
git -C libmongocrypt checkout c87cc3489c9a68875ff7fab541154841469991fb
# Check out commit containing MONGOCRYPT-614
git -C libmongocrypt checkout 9ce5db1ca353a4b82788724257d460a9ce67a3e9
}

declare -a crypt_cmake_flags=(
Expand Down
9 changes: 9 additions & 0 deletions src/libmongoc/src/mongoc/mongoc-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,15 @@ _state_machine_run (_state_machine_t *state_machine, bson_t *result, bson_error_
break;
case MONGOCRYPT_CTX_DONE:
goto success;
break;
case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adriandole this introduced breakage in the PHP driver, where we test with the latest version of libmongoc. The issue is that the current stable libmongocrypt version doesn't have MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB defined, causing a compilation error. This should be wrapped in an #ifdef block unless there is proper documentation that libmongocrypt 1.10 (which hasn't been released yet) or newer is required to compile libmongoc 1.27.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libmongoc 1.27 is expected to release after libmongocrypt 1.10 (CDRIVER-5299 depends on MONGOCRYPT-665). https://github.com/mongodb/mongo-c-driver/pull/1573/files bumps the required libmongocrypt to 1.10.

If updating to a libmongoc 1.27 prerelease, consider also updating libmongocrypt to a 1.10 prerelease containing mongodb/libmongocrypt@1793ff4 (introduces MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB).

bson_set_error (error,
MONGOC_ERROR_CLIENT_SIDE_ENCRYPTION,
MONGOC_ERROR_CLIENT_INVALID_ENCRYPTION_STATE,
"MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB is "
"unimplemented");
goto fail;
break;
}
}

Expand Down