Skip to content

MONGOCRYPT-538#601

Closed
sgolemon wants to merge 8 commits intomongodb:masterfrom
sgolemon:MC-538
Closed

MONGOCRYPT-538#601
sgolemon wants to merge 8 commits intomongodb:masterfrom
sgolemon:MC-538

Conversation

@sgolemon
Copy link
Contributor

@sgolemon sgolemon commented Mar 17, 2023

This is notably missing an integration test for IUP-V2, but I'm waiting on that 'cause I think @shreyaskalyan is working on unit tests for it. Everything else seems to work smoothly though, so it's worth starting review since this is... growing.

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Nice. LGTM. _test_ctx_wrap_and_feed_key looks helpful.

Consider adding tests to _test_encrypt_fle2_explicit for explicit encryption. I expect explicit encryption to "just work". Explicit encryption produces the placeholders. And the placeholders have not changed in FLE2v2.

CHECK_AND_RETURN (K_KeyId);
CHECK_AND_RETURN_KB_STATUS (
_mongocrypt_key_broker_decrypted_key_by_id (kb, K_KeyId, &K_Key));
CHECK_AND_RETURN (mc_FLE2IndexedEqualityEncryptedValue_add_K_Key (
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to these changes. Suggest renaming mc_FLE2IndexedEqualityEncryptedValue_add_K_Key to mc_FLE2IndexedEncryptedValue_add_K_Key since it is used for both Equality and Range payloads.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did have the same thought, actually. Happy to include it.

Copy link
Contributor Author

@sgolemon sgolemon left a comment

Choose a reason for hiding this comment

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

Addressed comments, then rebased now that MC-531 has landed.

CHECK_AND_RETURN (K_KeyId);
CHECK_AND_RETURN_KB_STATUS (
_mongocrypt_key_broker_decrypted_key_by_id (kb, K_KeyId, &K_Key));
CHECK_AND_RETURN (mc_FLE2IndexedEqualityEncryptedValue_add_K_Key (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did have the same thought, actually. Happy to include it.

@sgolemon sgolemon requested a review from erwee March 20, 2023 16:46
@sgolemon
Copy link
Contributor Author

Merged as 4a544db

@sgolemon sgolemon closed this Mar 20, 2023
@sgolemon sgolemon deleted the MC-538 branch March 20, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants