Skip to content

Commit 90476d5

Browse files
authored
MONGOCRYPT-572 remove QE-V1 code and tests (#934)
* do not allow opting in to QEv1 `mongocrypt_setopt_fle2v2` can only be called privately. It is only used in now-defunct tests of QEv1. * remove `_test_encrypt_fle2_delete_v1` QEv2 does not append `deleteTokens` * fix failing tests Update payloads to V2 payloads. Remove `eccCollection`. The `eccCollection` is not used in QEv2. * remove redundant tests v1 tests were converted to v2. v1 is no longer needed. * remove `TESTER_MONGOCRYPT_WITH_CRYPT_V1` * remove `use_v2` * remove unused test files * remove remaining references to `eccCollection` in test data * ignore `eccCollection` The `eccCollection` is unused in QEv2 * remove deleteTokens * remove QEv1 code in mongocrypt-marking.c * remove `mongocrypt_setopt_fle2v2` * test decrypting each payload type * test FLE2InsertUpdatePayload with edges Edges are sent for range payloads. Tested elsewhere. Redundant test is soon to be removed. * remove redundant explicit decryption tests
1 parent edebff5 commit 90476d5

File tree

162 files changed

+736
-4782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+736
-4782
lines changed

bindings/python/test/data/compact/success/encrypted-field-config-map.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"db.test": {
33
"escCollection": "esc",
4-
"eccCollection": "ecc",
54
"ecocCollection": "ecoc",
65
"fields": [
76
{

bindings/python/test/data/encrypted-field-config-map.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"test.test": {
33
"escCollection": "fle2.basic.esc",
4-
"eccCollection": "fle2.basic.ecc",
54
"ecocCollection": "fle2.basic.ecoc",
65
"fields": [
76
{
@@ -24,7 +23,6 @@
2423
},
2524
"test.test2": {
2625
"escCollection": "fle2.basic.esc",
27-
"eccCollection": "fle2.basic.ecc",
2826
"ecocCollection": "fle2.basic.ecoc",
2927
"fields": [
3028
{

src/mongocrypt-ctx-encrypt.c

Lines changed: 6 additions & 244 deletions
Large diffs are not rendered by default.

src/mongocrypt-marking.c

Lines changed: 19 additions & 556 deletions
Large diffs are not rendered by default.

src/mongocrypt-opts-private.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ typedef struct {
118118
bool use_need_mongo_collinfo_with_db_state;
119119
bool bypass_query_analysis;
120120

121-
// When creating new encrypted payloads,
122-
// use V2 variants of the FLE2 datatypes.
123-
bool use_fle2_v2;
124-
125121
// Use the Queryable Encryption Range V2 protocol.
126122
bool use_range_v2;
127123
} _mongocrypt_opts_t;

src/mongocrypt-private.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,4 @@ bool _mongocrypt_needs_credentials_for_provider(mongocrypt_t *crypt,
161161
_mongocrypt_kms_provider_t provider,
162162
const char *name);
163163

164-
/**
165-
* Enable/disable the use of FLE2v2 payload types for write.
166-
*
167-
* @param[in] crypt The @ref mongocrypt_t object.
168-
* @param[in] enable Whether to enable use of FLE2v2 payloads.
169-
*
170-
* @returns A boolean indicating success. If false, an error status is set.
171-
* Retrieve it with @ref mongocrypt_status
172-
*/
173-
bool mongocrypt_setopt_fle2v2(mongocrypt_t *crypt, bool enable);
174-
175164
#endif /* MONGOCRYPT_PRIVATE_H */

src/mongocrypt.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ mongocrypt_t *mongocrypt_new(void) {
118118
crypt->status = mongocrypt_status_new();
119119
_mongocrypt_opts_init(&crypt->opts);
120120
_mongocrypt_log_init(&crypt->log);
121-
// Default to using FLEv2 (aka QEv2)
122-
crypt->opts.use_fle2_v2 = true;
123121
crypt->ctx_counter = 1;
124122
crypt->cache_oauth = mc_mapof_kmsid_to_token_new();
125123
crypt->csfle = (_mongo_crypt_v1_vtable){.okay = false};
@@ -148,13 +146,6 @@ mongocrypt_t *mongocrypt_new(void) {
148146
} \
149147
}
150148

151-
bool mongocrypt_setopt_fle2v2(mongocrypt_t *crypt, bool enable) {
152-
ASSERT_MONGOCRYPT_PARAM_UNINIT(crypt);
153-
154-
crypt->opts.use_fle2_v2 = enable;
155-
return true;
156-
}
157-
158149
bool mongocrypt_setopt_use_range_v2(mongocrypt_t *crypt) {
159150
ASSERT_MONGOCRYPT_PARAM_UNINIT(crypt);
160151

test/data/bulkWrite/jsonSchema/cmd.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

test/data/collection-info-no-schema.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

test/data/compact/anchor-pad/collinfo.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"options": {
33
"encryptedFields": {
44
"escCollection": "esc",
5-
"eccCollection": "ecc",
65
"ecocCollection": "ecoc",
76
"fields": [
87
{

0 commit comments

Comments
 (0)