libmongocrypt-helper 1.11.0.0.1001 → 1.13.2.0.1001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +27 -1
- data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +13 -2
- data/ext/libmongocrypt/libmongocrypt/CODEOWNERS +1 -7
- data/ext/libmongocrypt/libmongocrypt/CONTRIBUTING.md +14 -0
- data/ext/libmongocrypt/libmongocrypt/Earthfile +49 -50
- data/ext/libmongocrypt/libmongocrypt/README.md +39 -23
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/README.md +4 -67
- data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +14 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/libmongocrypt-version.txt +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/asynchronous/state_machine.py +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +39 -7
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +32 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pyproject.toml +1 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/sbom.json +10 -9
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/encrypted-field-config-map.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-field-config-map.json +0 -2
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +13 -12
- data/ext/libmongocrypt/libmongocrypt/cmake/FetchMongoC.cmake +4 -2
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +1 -1
- data/ext/libmongocrypt/libmongocrypt/doc/releasing.md +37 -40
- data/ext/libmongocrypt/libmongocrypt/etc/cyclonedx.sbom.json +10 -9
- data/ext/libmongocrypt/libmongocrypt/etc/format.sh +0 -2
- data/ext/libmongocrypt/libmongocrypt/etc/libbson-remove-GCC-diagnostic-in-functions.patch +158 -0
- data/ext/libmongocrypt/libmongocrypt/etc/libbson-remove-GCC-diagnostic-pragma.patch +3 -3
- data/ext/libmongocrypt/libmongocrypt/etc/purls.txt +1 -1
- data/ext/libmongocrypt/libmongocrypt/integrating.md +51 -13
- data/ext/libmongocrypt/libmongocrypt/kms-message/README.md +1 -1
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_windows.c +2 -2
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_response_parser.h +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message_private.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request.c +3 -3
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response_parser.c +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kmip_reader_writer.c +5 -5
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_assert.h +25 -8
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_azure_online.c +2 -2
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_gcp_online.c +3 -3
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_request.c +12 -10
- data/ext/libmongocrypt/libmongocrypt/src/mc-cmp-private.h +137 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +5 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +35 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +5 -2
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +99 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +226 -2
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-v2.c +0 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +0 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private-v2.h +5 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private-v2.h +39 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-v2.c +165 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +0 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private-v2.h +183 -60
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-v2.c +498 -115
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +10 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-tag-and-encrypted-metadata-block-private.h +49 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-tag-and-encrypted-metadata-block.c +98 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +3 -2
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +2 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +1 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +6 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +2 -1
- data/ext/libmongocrypt/libmongocrypt/src/mc-schema-broker-private.h +126 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-schema-broker.c +1075 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-str-encode-string-sets-private.h +95 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-str-encode-string-sets.c +304 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-text-search-str-encode-private.h +45 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-text-search-str-encode.c +248 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +112 -2
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +166 -2
- data/ext/libmongocrypt/libmongocrypt/src/mlib/windows-lean.h +2 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +11 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +36 -3
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +2 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +8 -4
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +429 -858
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +55 -19
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +13 -10
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +15 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +9 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +6 -2
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +6 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +174 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +0 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +4 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +518 -524
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +0 -4
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +8 -12
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +3 -1
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +25 -9
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +65 -6
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +3 -1
- data/ext/libmongocrypt/libmongocrypt/src/unicode/case-fold-map.c +1434 -0
- data/ext/libmongocrypt/libmongocrypt/src/unicode/diacritic-fold-map.c +2884 -0
- data/ext/libmongocrypt/libmongocrypt/src/unicode/fold.c +139 -0
- data/ext/libmongocrypt/libmongocrypt/src/unicode/fold.h +58 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/bulkWrite/unencrypted/payload.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/cleanup/missing-key-id/collinfo.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/cleanup/no-fields/collinfo.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/cleanup/success/collinfo.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/anchor-pad/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/anchor-pad/encrypted-payload-range-v2.json +20 -21
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/missing-key-id/collinfo.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-fields/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-range/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-field-config-map.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-payload-range-v2.json +20 -21
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/cmd-to-mongocryptd.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/collinfo.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/encrypted-payload.json +2 -3
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/mongocryptd-reply.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/cmd-to-mongocryptd.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/collinfo.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/encrypted-payload.json +2 -3
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/mongocryptd-reply.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/cmd-to-mongocryptd.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/collinfo.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/mongocryptd-reply.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/collinfo.json +2 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-extraField.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-missingKeyId.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-oneField-badVersionSet.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-oneField-goodVersionSet.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-oneField.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-textSearchFields-badVersionSet.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-textSearchFields-goodVersionSet.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-textSearchFields.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-twoFields.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/encrypted-field-config-map.json +1 -3
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE1DeterministicEncryptedValue.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE1EncryptionPlaceholder.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE1RandomEncryptedValue.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2EncryptionPlaceholder.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2EqualityIndexedValueV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2FindEqualityPayloadV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2IndexedEqualityEncryptedValue.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2IndexedEqualityEncryptedValueV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2IndexedRangeEncryptedValue.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2IndexedRangeEncryptedValueV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2InsertUpdatePayload-with-edges-V2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2InsertUpdatePayload-with-edges.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-explicit/insert-indexed.json → explicit-decrypt/FLE2InsertUpdatePayload.json} +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2InsertUpdatePayloadV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2RangeIndexedValueV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2UnindexedEncryptedValue.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2UnindexedEncryptedValueV2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/find-with-encryptionInformation.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/collinfo.json +2 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/collinfo.json +2 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-bad-str-encode-version/bad-collinfo.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-bad-str-encode-version/bad-create-cmd-mongocryptd-reply.json +51 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-bad-str-encode-version/bad-create-cmd-to-mongocryptd.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-bad-str-encode-version/bad-create-cmd.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-find-range/int32/encrypted-field-map.json → fle2-bad-str-encode-version/bad-encrypted-field-config-map.json} +7 -12
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-insert → fle2-bad-str-encode-version}/encrypted-payload.json +4 -4
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/cmd-to-mongocryptd.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/encrypted-field-config-map.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection/cmd-to-mongocryptd.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection/cmd.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-find-equality/encrypted-field-map.json → fle2-create-encrypted-collection/encrypted-field-config-map.json} +9 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection/encrypted-payload.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-encrypted-fields-unset-str-encode-version/cmd-to-mongocryptd.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-encrypted-fields-unset-str-encode-version/mongocryptd-reply.json +51 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-with-str-encode-version/cmd-to-mongocryptd.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-with-str-encode-version/cmd.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-with-str-encode-version/encrypted-field-config-map.json +25 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-with-str-encode-version/encrypted-payload.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create-encrypted-collection-with-str-encode-version/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-field-config-map.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload-v2.json +57 -59
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/mongocryptd-reply.json +63 -64
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-field-config-map.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload-v2.json +64 -66
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/mongocryptd-reply.json +69 -70
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/collinfo.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/cmd-to-mongocryptd.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/collinfo.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/encrypted-payload.json +2 -3
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/mongocryptd-reply.json +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongocryptd.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongod.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/reply-from-mongocryptd.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-field-map.json +0 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-text-search/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-find-range/double → fle2-insert-text-search}/encrypted-field-map.json +10 -9
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-text-search/encrypted-payload.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-text-search/mongocryptd-reply.json +55 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-find-range/date → fle2-insert-text-search-with-str-encode-version}/encrypted-field-map.json +12 -10
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-text-search-with-str-encode-version/encrypted-payload.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-text-search-with-str-encode-version/mongocryptd-reply.json +55 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2-with-str-encode-version/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-insert → fle2-insert-v2-with-str-encode-version}/encrypted-field-map.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2-with-str-encode-version/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-insert → fle2-insert-v2-with-str-encode-version}/mongocryptd-reply.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection/cmd-to-mongocryptd.json +55 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection/cmd.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection/encrypted-field-config-map.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection/mongocryptd-reply.json +61 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/cmd-to-mongocryptd.json +56 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/cmd.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/encrypted-field-config-map.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/mongocryptd-reply.json +62 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneRangeV2.json +9 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneText.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneTextLarge.json +930 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneV2.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kms-tests.json +4 -4
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle/cmd-to-mongocryptd.json +60 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle/collInfo-c2.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-facet/cmd.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-mismatch/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/{bindings/cs/MongoDB.Libmongocrypt.Test/test/example/collection-info.json → test/data/lookup/csfle-mismatch/collInfo-c1.json} +12 -10
- data/ext/libmongocrypt/libmongocrypt/{bindings/java/mongocrypt/src/test/resources/collection-info.json → test/data/lookup/csfle-mismatch/collInfo-c3.json} +13 -11
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-nested/cmd.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-only-schemaMap/cmd-to-mongocryptd.json +60 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-only-schemaMap/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-only-schemaMap/schemaMap.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-schemaMap/cmd-to-mongocryptd.json +60 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-schemaMap/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-schemaMap/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-schemaMap/schemaMap.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-self/cmd-to-mongocryptd.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-self/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-self/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-sibling/cmd-to-mongocryptd.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-sibling/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-sibling/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-sibling/collInfo-c2.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-sibling/reply-from-mongocryptd.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-unionWith/cmd.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-view/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-view/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/csfle-view/collInfo-v1.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/cmd-to-mongocryptd.json +65 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/cmd-to-mongod.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/collInfo-c2.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/{bindings/java/mongocrypt/src/test/resources/keys/ABCDEFAB123498761234123456789012-local-document.json → test/data/lookup/mixed/csfle/csfle/key-doc.json} +4 -4
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/csfle/reply-from-mongocryptd.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/cmd-to-mongocryptd.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/cmd-to-mongod.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/collInfo-c2.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/no-schema/reply-from-mongocryptd.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/qe/cmd-to-mongocryptd.json +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/qe/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/qe/collInfo-c1.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/csfle/qe/collInfo-c2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/cmd-to-mongocryptd.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/cmd-to-mongod.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/collInfo-c1.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/collInfo-c2.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/csfle/reply-from-mongocryptd.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/cmd-to-mongocryptd.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/cmd-to-mongod.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/collInfo-c1.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/collInfo-c2.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/no-schema/reply-from-mongocryptd.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/cmd-to-mongocryptd.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/cmd-to-mongod.json +58 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/collInfo-c1.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/collInfo-c2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/no-schema/qe/reply-from-mongocryptd.json +65 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/csfle/cmd-to-mongocryptd.json +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/csfle/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/csfle/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/csfle/collInfo-c2.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/cmd-to-mongocryptd.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/cmd-to-mongod.json +56 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/collInfo-c2.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/no-schema/reply-from-mongocryptd.json +63 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/cmd-to-mongocryptd.json +66 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/cmd-to-mongod.json +71 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/collInfo-c2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/mixed/qe/qe/reply-from-mongocryptd.json +78 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/cmd-to-mongocryptd.json +61 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/cmd-to-mongod.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/cmd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/collInfo-c2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe/reply-from-mongocryptd.json +68 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/cmd-to-mongocryptd.json +66 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/cmd-to-mongod.json +71 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-insert-unindexed/encrypted-field-map.json → lookup/qe-encryptedFieldsMap/encryptedFieldsMap.json} +6 -7
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-encryptedFieldsMap/reply-from-mongocryptd.json +78 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/cmd-to-mongocryptd.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/cmd-to-mongod.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-self/reply-from-mongocryptd.json +58 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/cmd-to-mongocryptd.json +66 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/cmd-to-mongod.json +75 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/cmd.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/collInfo-c1.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/collInfo-c2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/key-doc.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/lookup/qe-with-payload/reply-from-mongocryptd.json +78 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-create/mongocryptd-ismaster.json → mongocryptd-ismaster-17.json} +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-ismaster-26.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/multikey/command.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/{bindings/java/mongocrypt/src/test/resources/key-document.json → test/data/multikey/key-document-a.json} +18 -19
- data/ext/libmongocrypt/libmongocrypt/test/data/multikey/key-document-b.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/multikey/mongocryptd_reply.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/multikey/schema_map.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/{bindings/java/mongocrypt/src/test/resources/kms-reply.txt → test/data/rmd/kms-decrypt-reply-429.txt} +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/collinfo-encryptedFields.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/collinfo-encryptedFields2.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/collinfo-jsonSchema.json +43 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/collinfo-noSchema.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/create-with-jsonSchema.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/encryptedFields.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/encryptedFields2.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/encryptedFieldsMap.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/jsonSchema.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/jsonSchema2.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-broker/schemaMap.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/tokens/mc.json +28 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/tokens/server.json +28 -2
- data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-cmp.c +304 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-encryption-placeholder.c +468 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-equality-payload-v2.c +20 -1
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev-v2.c +370 -22
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup-v2.c +25 -1
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +24 -1
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-tag-and-encrypted-metadata-block.c +91 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +6 -7
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +32 -33
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +68 -75
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-schema-broker.c +1124 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-text-search-str-encode.c +1207 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +144 -37
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +13 -14
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +21 -4
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +25 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +3 -20
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +57 -46
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +37 -7
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +226 -146
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +1529 -1197
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +79 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +160 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +3 -3
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +7 -7
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +6 -5
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +750 -110
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +143 -33
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +39 -4
- data/ext/libmongocrypt/libmongocrypt/test/test-unicode-fold.c +97 -0
- data/lib/libmongocrypt_helper/version.rb +2 -2
- metadata +233 -225
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/CMakeLists.txt +0 -17
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Driver.snk +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs +0 -4
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Binary.cs +0 -145
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/BinarySafeHandle.cs +0 -60
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CheckableSafeHandle.cs +0 -46
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CipherCallbacks.cs +0 -168
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/ContextSafeHandle.cs +0 -48
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +0 -257
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClientFactory.cs +0 -138
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptContext.cs +0 -214
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptException.cs +0 -37
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptOptions.cs +0 -67
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HashCallback.cs +0 -59
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HmacShaCallbacks.cs +0 -96
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/IStatus.cs +0 -26
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsCredentials.cs +0 -53
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsKeyId.cs +0 -91
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequest.cs +0 -125
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequestCollection.cs +0 -60
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +0 -684
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoader.cs +0 -289
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoadingException.cs +0 -34
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/License.txt +0 -14
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LogLevel.cs +0 -26
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoCryptSafeHandle.cs +0 -48
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj +0 -107
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.ruleset +0 -85
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.targets +0 -21
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/OperatingSystemHelper.cs +0 -59
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Package.include.template.csproj +0 -38
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/PinnedBinary.cs +0 -49
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SecureRandomCallback.cs +0 -51
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SigningRSAESPKCSCallback.cs +0 -74
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Status.cs +0 -94
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StatusSafeHandle.cs +0 -60
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StyleCop.ruleset +0 -11
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/stylecop.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +0 -23
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Package.include.template.csproj +0 -11
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Program.cs +0 -442
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +0 -748
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BsonUtil.cs +0 -82
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CallbackUtils.cs +0 -37
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CipherCallbacksTests.cs +0 -46
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HashCallbackTests.cs +0 -37
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HmacShaCallbacksTests.cs +0 -37
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/MongoDB.Libmongocrypt.Test.csproj +0 -37
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/Package.include.template.csproj +0 -23
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/SigningRSAESPKCSCallbackTests.cs +0 -64
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/command-reply.json +0 -13
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command-reply.json +0 -16
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command.json +0 -11
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-value.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-document.json +0 -36
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-filter.json +0 -19
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/list-collections-filter.json +0 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/mongocryptd-command.json +0 -22
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/xunit.runner.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/BasicTests.cs +0 -54
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj +0 -44
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/Package.include.template.csproj +0 -23
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +0 -215
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.config +0 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.ps1 +0 -275
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.sh +0 -77
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/README.md +0 -36
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/benchmarks/build.gradle.kts +0 -28
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/benchmarks/src/main/java/com/mongodb/crypt/benchmark/BenchmarkRunner.java +0 -217
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/benchmarks/src/main/resources/keyDocument.json +0 -24
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +0 -354
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.properties +0 -5
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew +0 -234
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew.bat +0 -89
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/settings.gradle.kts +0 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/BinaryHolder.java +0 -45
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPI.java +0 -1165
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPIHelper.java +0 -96
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CipherCallback.java +0 -92
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/DisposableMemory.java +0 -31
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/JULLogger.java +0 -130
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Logger.java +0 -144
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Loggers.java +0 -50
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MacCallback.java +0 -60
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MessageDigestCallback.java +0 -55
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoAwsKmsProviderOptions.java +0 -104
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypt.java +0 -100
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContext.java +0 -137
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContextImpl.java +0 -164
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptException.java +0 -67
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptImpl.java +0 -423
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptOptions.java +0 -284
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypts.java +0 -38
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoDataKeyOptions.java +0 -125
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoExplicitEncryptOptions.java +0 -227
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptor.java +0 -76
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptorImpl.java +0 -105
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoLocalKmsProviderOptions.java +0 -83
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoRewrapManyDataKeyOptions.java +0 -104
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SLF4JLogger.java +0 -110
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SecureRandomCallback.java +0 -51
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SigningRSAESPKCSCallback.java +0 -76
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/package-info.java +0 -18
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/resources/META-INF/native-image/jni-config.json +0 -180
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/resources/META-INF/native-image/reflect-config.json +0 -134
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +0 -389
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command-reply.json +0 -13
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command-reply.json +0 -16
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command.json +0 -11
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-value.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/key-filter.json +0 -19
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/rangeopts.json +0 -14
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/value-to-encrypt.json +0 -20
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/json-schema.json +0 -15
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter-keyAltName.json +0 -14
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter.json +0 -19
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/list-collections-filter.json +0 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-command.json +0 -22
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-reply.json +0 -18
- data/ext/libmongocrypt/libmongocrypt/etc/silk-create-asset-group.sh +0 -70
- data/ext/libmongocrypt/libmongocrypt/test/data/bulkWrite/jsonSchema/cmd.json +0 -20
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-no-schema.json +0 -19
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-range/encrypted-field-config-map.json +0 -47
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/cmd.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/collinfo.json +0 -9
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/ismaster-to-mongocryptd.json +0 -3
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload.json +0 -91
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload.json +0 -98
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/cmd.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/encrypted-payload.json +0 -41
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/mongocryptd-reply.json +0 -19
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/cmd.json +0 -10
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/encrypted-payload.json +0 -42
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/mongocryptd-reply.json +0 -50
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/cmd.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-payload.json +0 -42
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/mongocryptd-reply.json +0 -50
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/cmd.json +0 -6
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-field-map.json +0 -31
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-payload.json +0 -51
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/mongocryptd-reply.json +0 -59
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/cmd.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/encrypted-payload.json +0 -42
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/mongocryptd-reply.json +0 -50
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/cmd.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-field-map.json +0 -31
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/cmd.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/encrypted-payload.json +0 -42
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/mongocryptd-reply.json +0 -50
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/cmd.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-payload.json +0 -42
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/mongocryptd-reply.json +0 -50
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload-v2.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload.json +0 -16
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/cmd.json +0 -13
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/cmd.json +0 -9
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/cmd.json +0 -9
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-field-map.json +0 -31
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-payload.json +0 -54
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/mongocryptd-reply.json +0 -62
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/cmd.json +0 -11
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/cmd.json +0 -11
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-field-map.json +0 -31
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-payload.json +0 -48
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/mongocryptd-reply.json +0 -56
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/cmd.json +0 -11
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-field-map.json +0 -28
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-payload.json +0 -45
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/mongocryptd-reply.json +0 -53
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload-v2.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/cmd.json +0 -9
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/encrypted-payload.json +0 -14
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/mongocryptd-reply.json +0 -46
- data/ext/libmongocrypt/libmongocrypt/test/data/schema.json +0 -19
- /data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-explicit/find-indexed.json → explicit-decrypt/FLE2FindEqualityPayload.json} +0 -0
- /data/ext/libmongocrypt/libmongocrypt/test/data/{fle2-insert → fle2-insert-text-search-with-str-encode-version}/cmd.json +0 -0
@@ -1,748 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2019–present MongoDB, Inc.
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
using MongoDB.Bson;
|
18
|
-
using System;
|
19
|
-
using System.Collections.Generic;
|
20
|
-
using System.IO;
|
21
|
-
using System.Linq;
|
22
|
-
using System.Reflection;
|
23
|
-
using Xunit;
|
24
|
-
using System.Text;
|
25
|
-
using FluentAssertions;
|
26
|
-
using Xunit.Abstractions;
|
27
|
-
using MongoDB.Libmongocrypt.Test.Callbacks;
|
28
|
-
|
29
|
-
namespace MongoDB.Libmongocrypt.Test
|
30
|
-
{
|
31
|
-
public class BasicTests
|
32
|
-
{
|
33
|
-
private static ITestOutputHelper _output;
|
34
|
-
private const string AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic = "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic";
|
35
|
-
private const string AEAD_AES_256_CBC_HMAC_SHA_512_Random = "AEAD_AES_256_CBC_HMAC_SHA_512-Random";
|
36
|
-
|
37
|
-
public BasicTests(ITestOutputHelper output)
|
38
|
-
{
|
39
|
-
_output = output;
|
40
|
-
}
|
41
|
-
|
42
|
-
[Fact]
|
43
|
-
public void EncryptQuery()
|
44
|
-
{
|
45
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
46
|
-
using (var context =
|
47
|
-
cryptClient.StartEncryptionContext("test", command: BsonUtil.ToBytes(ReadJsonTestFile("cmd.json"))))
|
48
|
-
{
|
49
|
-
var (_, bsonCommand) = ProcessContextToCompletion(context);
|
50
|
-
bsonCommand.Should().Equal((ReadJsonTestFile("encrypted-command.json")));
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
[Fact]
|
55
|
-
public void EncryptQueryStepwise()
|
56
|
-
{
|
57
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
58
|
-
using (var context = cryptClient.StartEncryptionContext("test", command: BsonUtil.ToBytes(ReadJsonTestFile("cmd.json"))))
|
59
|
-
{
|
60
|
-
var (state, _, operationSent) = ProcessState(context);
|
61
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_COLLINFO);
|
62
|
-
operationSent.Should().Equal((ReadJsonTestFile("list-collections-filter.json")));
|
63
|
-
|
64
|
-
(state, _, operationSent) = ProcessState(context);
|
65
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_MARKINGS);
|
66
|
-
operationSent.Should().Equal(ReadJsonTestFile("mongocryptd-command.json"));
|
67
|
-
|
68
|
-
(state, _, operationSent) = ProcessState(context);
|
69
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
70
|
-
operationSent.Should().Equal(ReadJsonTestFile("key-filter.json"));
|
71
|
-
|
72
|
-
(state, _, _) = ProcessState(context);
|
73
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
74
|
-
// kms fluent assertions inside ProcessState()
|
75
|
-
|
76
|
-
(state, _, operationSent) = ProcessState(context);
|
77
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
78
|
-
operationSent.Should().Equal((ReadJsonTestFile("encrypted-command.json")));
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
[Fact]
|
83
|
-
public void EncryptQueryWithSchemaStepwise()
|
84
|
-
{
|
85
|
-
var listCollectionsReply = ReadJsonTestFile("collection-info.json");
|
86
|
-
var schema = new BsonDocument("test.test", listCollectionsReply["options"]["validator"]["$jsonSchema"]);
|
87
|
-
|
88
|
-
var options = new CryptOptions(
|
89
|
-
new[] { CreateKmsCredentials("aws") },
|
90
|
-
BsonUtil.ToBytes(schema));
|
91
|
-
|
92
|
-
using (var cryptClient = CryptClientFactory.Create(options))
|
93
|
-
using (var context =
|
94
|
-
cryptClient.StartEncryptionContext(
|
95
|
-
db: "test",
|
96
|
-
command: BsonUtil.ToBytes(ReadJsonTestFile("cmd.json"))))
|
97
|
-
{
|
98
|
-
|
99
|
-
var (state, _, operationSent) = ProcessState(context);
|
100
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_MARKINGS);
|
101
|
-
var mongoCryptdCommand = ReadJsonTestFile("mongocryptd-command.json");
|
102
|
-
mongoCryptdCommand["isRemoteSchema"] = false;
|
103
|
-
operationSent.Should().Equal(mongoCryptdCommand);
|
104
|
-
|
105
|
-
(state, _, operationSent) = ProcessState(context);
|
106
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
107
|
-
operationSent.Should().Equal(ReadJsonTestFile("key-filter.json"));
|
108
|
-
|
109
|
-
(state, _, _) = ProcessState(context);
|
110
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
111
|
-
// kms fluent assertions inside ProcessState()
|
112
|
-
|
113
|
-
(state, _, operationSent) = ProcessState(context);
|
114
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
115
|
-
operationSent.Should().Equal((ReadJsonTestFile("encrypted-command.json")));
|
116
|
-
}
|
117
|
-
}
|
118
|
-
|
119
|
-
[Fact]
|
120
|
-
public void DecryptQuery()
|
121
|
-
{
|
122
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
123
|
-
using (var context =
|
124
|
-
cryptClient.StartDecryptionContext(BsonUtil.ToBytes(ReadJsonTestFile("encrypted-command-reply.json"))))
|
125
|
-
{
|
126
|
-
var (_, bsonCommand) = ProcessContextToCompletion(context);
|
127
|
-
bsonCommand.Should().Equal(ReadJsonTestFile("command-reply.json"));
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
[Fact]
|
132
|
-
public void DecryptQueryStepwise()
|
133
|
-
{
|
134
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
135
|
-
using (var context = cryptClient.StartDecryptionContext(BsonUtil.ToBytes(ReadJsonTestFile("encrypted-command-reply.json"))))
|
136
|
-
{
|
137
|
-
var (state, _, operationProduced) = ProcessState(context);
|
138
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
139
|
-
operationProduced.Should().Equal(ReadJsonTestFile("key-filter.json"));
|
140
|
-
|
141
|
-
(state, _, _) = ProcessState(context);
|
142
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
143
|
-
// kms fluent assertions inside ProcessState()
|
144
|
-
|
145
|
-
(state, _, operationProduced) = ProcessState(context);
|
146
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
147
|
-
operationProduced.Should().Equal(ReadJsonTestFile("command-reply.json"));
|
148
|
-
|
149
|
-
(state, _, _) = ProcessState(context);
|
150
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
151
|
-
}
|
152
|
-
}
|
153
|
-
|
154
|
-
[Fact]
|
155
|
-
public void EncryptBadBson()
|
156
|
-
{
|
157
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
158
|
-
{
|
159
|
-
Func<CryptContext> startEncryptionContext = () =>
|
160
|
-
cryptClient.StartEncryptionContext("test", command: new byte[] { 0x1, 0x2, 0x3 });
|
161
|
-
|
162
|
-
// Ensure if we encrypt non-sense, it throws an exception demonstrating our exception code is good
|
163
|
-
var exception = Record.Exception(startEncryptionContext);
|
164
|
-
|
165
|
-
exception.Should().BeOfType<CryptException>();
|
166
|
-
}
|
167
|
-
}
|
168
|
-
|
169
|
-
[Fact]
|
170
|
-
public void EncryptExplicit()
|
171
|
-
{
|
172
|
-
var keyDoc = ReadJsonTestFile("key-document.json");
|
173
|
-
var keyId = keyDoc["_id"].AsBsonBinaryData.Bytes;
|
174
|
-
|
175
|
-
BsonDocument doc = new BsonDocument()
|
176
|
-
{
|
177
|
-
{ "v" , "hello" },
|
178
|
-
};
|
179
|
-
|
180
|
-
var testData = BsonUtil.ToBytes(doc);
|
181
|
-
|
182
|
-
byte[] encryptedBytes;
|
183
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
184
|
-
using (var context = StartExplicitEncryptionContextWithKeyId(cryptClient, keyId, AEAD_AES_256_CBC_HMAC_SHA_512_Random, testData))
|
185
|
-
{
|
186
|
-
var (encryptedBinary, encryptedDocument) = ProcessContextToCompletion(context);
|
187
|
-
encryptedBytes = encryptedBinary.ToArray(); // need to copy bytes out before the context gets destroyed
|
188
|
-
}
|
189
|
-
|
190
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
191
|
-
using (var context = cryptClient.StartExplicitDecryptionContext(encryptedBytes))
|
192
|
-
{
|
193
|
-
var (decryptedResult, _) = ProcessContextToCompletion(context);
|
194
|
-
|
195
|
-
decryptedResult.ToArray().Should().Equal(testData);
|
196
|
-
}
|
197
|
-
}
|
198
|
-
|
199
|
-
[Fact]
|
200
|
-
public void EncryptExplicitStepwise()
|
201
|
-
{
|
202
|
-
var keyDoc = ReadJsonTestFile("key-document.json");
|
203
|
-
var keyId = keyDoc["_id"].AsBsonBinaryData.Bytes;
|
204
|
-
|
205
|
-
var doc = new BsonDocument("v", "hello");
|
206
|
-
|
207
|
-
var testData = BsonUtil.ToBytes(doc);
|
208
|
-
|
209
|
-
using (var cryptClient = CryptClientFactory.Create(CreateOptions()))
|
210
|
-
{
|
211
|
-
byte[] encryptedResult;
|
212
|
-
using (var context = StartExplicitEncryptionContextWithKeyId(
|
213
|
-
cryptClient,
|
214
|
-
keyId: keyId,
|
215
|
-
encryptionAlgorithm: AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic,
|
216
|
-
message: testData))
|
217
|
-
{
|
218
|
-
var (state, binaryProduced, operationProduced) = ProcessState(context);
|
219
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
220
|
-
operationProduced.Should().Equal(ReadJsonTestFile("key-filter.json"));
|
221
|
-
|
222
|
-
(state, _, _) = ProcessState(context);
|
223
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
224
|
-
// kms fluent assertions inside ProcessState()
|
225
|
-
|
226
|
-
(state, binaryProduced, operationProduced) = ProcessState(context);
|
227
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
228
|
-
operationProduced.Should().Equal(ReadJsonTestFile("encrypted-value.json"));
|
229
|
-
encryptedResult = binaryProduced.ToArray(); // need to copy bytes out before the context gets destroyed
|
230
|
-
|
231
|
-
(state, _, _) = ProcessState(context);
|
232
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
233
|
-
}
|
234
|
-
|
235
|
-
using (var context = cryptClient.StartExplicitDecryptionContext(encryptedResult))
|
236
|
-
{
|
237
|
-
var (state, decryptedBinary, _) = ProcessState(context);
|
238
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
239
|
-
decryptedBinary.ToArray().Should().Equal(testData);
|
240
|
-
|
241
|
-
(state, _, _) = ProcessState(context);
|
242
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
243
|
-
}
|
244
|
-
}
|
245
|
-
}
|
246
|
-
|
247
|
-
[Fact]
|
248
|
-
public void TestAwsKeyCreationWithEndPoint()
|
249
|
-
{
|
250
|
-
var endpoint = "kms.us-east-1.amazonaws.com";
|
251
|
-
var keyId = CreateKmsKeyId("aws", endpoint);
|
252
|
-
var key = CreateKmsCredentials("aws");
|
253
|
-
|
254
|
-
using (var cryptClient = CryptClientFactory.Create(new CryptOptions(new[] { key })))
|
255
|
-
using (var context = cryptClient.StartCreateDataKeyContext(keyId))
|
256
|
-
{
|
257
|
-
var (_, dataKeyDocument) = ProcessContextToCompletion(context, isKmsDecrypt: false);
|
258
|
-
dataKeyDocument["masterKey"]["endpoint"].Should().Be(endpoint);
|
259
|
-
}
|
260
|
-
}
|
261
|
-
|
262
|
-
[Fact]
|
263
|
-
public void TestAwsKeyCreationWithEndpointStepwise()
|
264
|
-
{
|
265
|
-
var endpoint = "kms.us-east-1.amazonaws.com";
|
266
|
-
var keyId = CreateKmsKeyId("aws", endpoint);
|
267
|
-
var key = CreateKmsCredentials("aws");
|
268
|
-
|
269
|
-
using (var cryptClient = CryptClientFactory.Create(new CryptOptions(new[] { key })))
|
270
|
-
using (var context = cryptClient.StartCreateDataKeyContext(keyId))
|
271
|
-
{
|
272
|
-
BsonDocument dataKeyDocument;
|
273
|
-
var (state, _, _) = ProcessState(context, isKmsDecrypt: false);
|
274
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
275
|
-
|
276
|
-
(state, _, dataKeyDocument) = ProcessState(context, isKmsDecrypt: false);
|
277
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
278
|
-
dataKeyDocument["masterKey"]["endpoint"].Should().Be(endpoint);
|
279
|
-
|
280
|
-
(state, _, _) = ProcessState(context, isKmsDecrypt: false);
|
281
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
282
|
-
}
|
283
|
-
}
|
284
|
-
|
285
|
-
[Fact]
|
286
|
-
public void TestAwsKeyCreationWithkeyAltNames()
|
287
|
-
{
|
288
|
-
var keyAltNames = new[] { "KeyMaker", "Architect" };
|
289
|
-
var keyAltNameDocuments = keyAltNames.Select(name => new BsonDocument("keyAltName", name));
|
290
|
-
var keyAltNameBuffers = keyAltNameDocuments.Select(BsonUtil.ToBytes);
|
291
|
-
var keyId = CreateKmsKeyId("aws", keyAltNameBuffers: keyAltNameBuffers);
|
292
|
-
var key = CreateKmsCredentials("aws");
|
293
|
-
|
294
|
-
using (var cryptClient = CryptClientFactory.Create(new CryptOptions(new[] { key })))
|
295
|
-
using (var context = cryptClient.StartCreateDataKeyContext(keyId))
|
296
|
-
{
|
297
|
-
var (_, dataKeyDocument) = ProcessContextToCompletion(context, isKmsDecrypt: false);
|
298
|
-
dataKeyDocument.Should().NotBeNull();
|
299
|
-
var actualKeyAltNames = dataKeyDocument["keyAltNames"].AsBsonArray.Select(x => x.AsString);
|
300
|
-
var expectedKeyAltNames = keyAltNames.Reverse(); // https://jira.mongodb.org/browse/CDRIVER-3277?
|
301
|
-
actualKeyAltNames.Should().BeEquivalentTo(expectedKeyAltNames);
|
302
|
-
}
|
303
|
-
}
|
304
|
-
|
305
|
-
[Fact]
|
306
|
-
public void TestAwsKeyCreationWithkeyAltNamesStepwise()
|
307
|
-
{
|
308
|
-
var keyAltNames = new[] { "KeyMaker", "Architect" };
|
309
|
-
var keyAltNameDocuments = keyAltNames.Select(name => new BsonDocument("keyAltName", name));
|
310
|
-
var keyAltNameBuffers = keyAltNameDocuments.Select(BsonUtil.ToBytes);
|
311
|
-
var keyId = CreateKmsKeyId("aws", keyAltNameBuffers: keyAltNameBuffers);
|
312
|
-
var key = CreateKmsCredentials("aws");
|
313
|
-
|
314
|
-
using (var cryptClient = CryptClientFactory.Create(new CryptOptions(new[] { key })))
|
315
|
-
using (var context =
|
316
|
-
cryptClient.StartCreateDataKeyContext(keyId))
|
317
|
-
{
|
318
|
-
BsonDocument dataKeyDocument;
|
319
|
-
var (state, _, _) = ProcessState(context, isKmsDecrypt: false);
|
320
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS);
|
321
|
-
|
322
|
-
(state, _, dataKeyDocument) = ProcessState(context, isKmsDecrypt: false);
|
323
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
324
|
-
dataKeyDocument.Should().NotBeNull();
|
325
|
-
var actualKeyAltNames = dataKeyDocument["keyAltNames"].AsBsonArray.Select(x => x.AsString);
|
326
|
-
var expectedKeyAltNames = keyAltNames.Reverse(); // https://jira.mongodb.org/browse/CDRIVER-3277?
|
327
|
-
actualKeyAltNames.Should().BeEquivalentTo(expectedKeyAltNames);
|
328
|
-
|
329
|
-
(state, _, _) = ProcessState(context, isKmsDecrypt: false);
|
330
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
331
|
-
}
|
332
|
-
}
|
333
|
-
|
334
|
-
[Fact]
|
335
|
-
public void TestLocalKeyCreationWithkeyAltNames()
|
336
|
-
{
|
337
|
-
var keyAltNames = new[] { "KeyMaker", "Architect" };
|
338
|
-
var keyAltNameDocuments = keyAltNames.Select(name => new BsonDocument("keyAltName", name));
|
339
|
-
var keyAltNameBuffers = keyAltNameDocuments.Select(BsonUtil.ToBytes);
|
340
|
-
var key = CreateKmsCredentials("local");
|
341
|
-
var keyId = CreateKmsKeyId("local", keyAltNameBuffers: keyAltNameBuffers);
|
342
|
-
var cryptOptions = new CryptOptions(new[] { key });
|
343
|
-
|
344
|
-
using (var cryptClient = CryptClientFactory.Create(cryptOptions))
|
345
|
-
using (var context =
|
346
|
-
cryptClient.StartCreateDataKeyContext(keyId))
|
347
|
-
{
|
348
|
-
var (_, dataKeyDocument) = ProcessContextToCompletion(context);
|
349
|
-
dataKeyDocument.Should().NotBeNull();
|
350
|
-
var actualKeyAltNames = dataKeyDocument["keyAltNames"].AsBsonArray.Select(x => x.AsString);
|
351
|
-
var expectedKeyAltNames = keyAltNames.Reverse(); // https://jira.mongodb.org/browse/CDRIVER-3277?
|
352
|
-
actualKeyAltNames.Should().BeEquivalentTo(expectedKeyAltNames);
|
353
|
-
}
|
354
|
-
}
|
355
|
-
|
356
|
-
[Fact]
|
357
|
-
public void TestLocalKeyCreationWithkeyAltNamesStepwise()
|
358
|
-
{
|
359
|
-
var keyAltNames = new[] { "KeyMaker", "Architect" };
|
360
|
-
var keyAltNameDocuments = keyAltNames.Select(name => new BsonDocument("keyAltName", name));
|
361
|
-
var keyAltNameBuffers = keyAltNameDocuments.Select(BsonUtil.ToBytes);
|
362
|
-
var key = CreateKmsCredentials("local");
|
363
|
-
var keyId = CreateKmsKeyId("local", keyAltNameBuffers: keyAltNameBuffers);
|
364
|
-
var cryptOptions = new CryptOptions(new[] { key });
|
365
|
-
|
366
|
-
using (var cryptClient = CryptClientFactory.Create(cryptOptions))
|
367
|
-
using (var context =
|
368
|
-
cryptClient.StartCreateDataKeyContext(keyId))
|
369
|
-
{
|
370
|
-
var (state, _, dataKeyDocument) = ProcessState(context);
|
371
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
372
|
-
dataKeyDocument.Should().NotBeNull();
|
373
|
-
var actualKeyAltNames = dataKeyDocument["keyAltNames"].AsBsonArray.Select(x => x.AsString);
|
374
|
-
var expectedKeyAltNames = keyAltNames.Reverse(); // https://jira.mongodb.org/browse/CDRIVER-3277?
|
375
|
-
actualKeyAltNames.Should().BeEquivalentTo(expectedKeyAltNames);
|
376
|
-
|
377
|
-
(state, _, _) = ProcessState(context);
|
378
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
379
|
-
}
|
380
|
-
}
|
381
|
-
|
382
|
-
[Fact]
|
383
|
-
public void TestLocalKeyCreation()
|
384
|
-
{
|
385
|
-
var key = CreateKmsCredentials("local");
|
386
|
-
var keyId = CreateKmsKeyId("local");
|
387
|
-
var cryptOptions = new CryptOptions(new[] { key });
|
388
|
-
|
389
|
-
using (var cryptClient = CryptClientFactory.Create(cryptOptions))
|
390
|
-
using (var context =
|
391
|
-
cryptClient.StartCreateDataKeyContext(keyId))
|
392
|
-
{
|
393
|
-
var (_, dataKeyDocument) = ProcessContextToCompletion(context);
|
394
|
-
dataKeyDocument.Should().NotBeNull();
|
395
|
-
}
|
396
|
-
}
|
397
|
-
|
398
|
-
|
399
|
-
[Fact]
|
400
|
-
public void TestLocalKeyCreationStepwise()
|
401
|
-
{
|
402
|
-
var key = CreateKmsCredentials("local");
|
403
|
-
var keyId = CreateKmsKeyId("local");
|
404
|
-
var cryptOptions = new CryptOptions(new[] { key });
|
405
|
-
|
406
|
-
using (var cryptClient = CryptClientFactory.Create(cryptOptions))
|
407
|
-
using (var context =
|
408
|
-
cryptClient.StartCreateDataKeyContext(keyId))
|
409
|
-
{
|
410
|
-
var (state, _, dataKeyDocument) = ProcessState(context);
|
411
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_READY);
|
412
|
-
dataKeyDocument.Should().NotBeNull();
|
413
|
-
|
414
|
-
(state, _, _) = ProcessState(context);
|
415
|
-
state.Should().Be(CryptContext.StateCode.MONGOCRYPT_CTX_DONE);
|
416
|
-
}
|
417
|
-
}
|
418
|
-
|
419
|
-
[Theory]
|
420
|
-
[InlineData("aws")]
|
421
|
-
[InlineData("azure")]
|
422
|
-
#if NETCOREAPP3_0
|
423
|
-
[InlineData("gcp")]
|
424
|
-
#endif
|
425
|
-
[InlineData("kmip")]
|
426
|
-
public void TestGetKmsProviderName(string kmsName)
|
427
|
-
{
|
428
|
-
var key = CreateKmsCredentials(kmsName);
|
429
|
-
var keyId = CreateKmsKeyId(kmsName);
|
430
|
-
var cryptOptions = new CryptOptions(new[] { key });
|
431
|
-
|
432
|
-
using (var cryptClient = CryptClientFactory.Create(cryptOptions))
|
433
|
-
using (var context = cryptClient.StartCreateDataKeyContext(keyId))
|
434
|
-
{
|
435
|
-
var request = context.GetKmsMessageRequests().Single();
|
436
|
-
request.KmsProvider.Should().Be(kmsName);
|
437
|
-
}
|
438
|
-
}
|
439
|
-
|
440
|
-
// private methods
|
441
|
-
private static KmsCredentials CreateKmsCredentials(string kmsName)
|
442
|
-
{
|
443
|
-
BsonDocument kmsCredentialsDocument;
|
444
|
-
switch (kmsName)
|
445
|
-
{
|
446
|
-
case "local":
|
447
|
-
kmsCredentialsDocument = new BsonDocument
|
448
|
-
{
|
449
|
-
{
|
450
|
-
"local",
|
451
|
-
new BsonDocument
|
452
|
-
{
|
453
|
-
{ "key", new BsonBinaryData(new byte[96]) }
|
454
|
-
}
|
455
|
-
}
|
456
|
-
};
|
457
|
-
break;
|
458
|
-
case "aws":
|
459
|
-
kmsCredentialsDocument = new BsonDocument
|
460
|
-
{
|
461
|
-
{
|
462
|
-
"aws",
|
463
|
-
new BsonDocument
|
464
|
-
{
|
465
|
-
{ "secretAccessKey", "dummy" },
|
466
|
-
{ "accessKeyId", "dummy" }
|
467
|
-
}
|
468
|
-
}
|
469
|
-
};
|
470
|
-
break;
|
471
|
-
case "azure":
|
472
|
-
kmsCredentialsDocument = new BsonDocument
|
473
|
-
{
|
474
|
-
{
|
475
|
-
"azure",
|
476
|
-
new BsonDocument
|
477
|
-
{
|
478
|
-
{ "tenantId", "dummy" },
|
479
|
-
{ "clientId", "dummy" },
|
480
|
-
{ "clientSecret", "dummy" }
|
481
|
-
}
|
482
|
-
}
|
483
|
-
};
|
484
|
-
break;
|
485
|
-
case "gcp":
|
486
|
-
kmsCredentialsDocument = new BsonDocument
|
487
|
-
{
|
488
|
-
{
|
489
|
-
"gcp",
|
490
|
-
new BsonDocument
|
491
|
-
{
|
492
|
-
{ "email", "dummy" },
|
493
|
-
{ "privateKey", SigningRSAESPKCSCallbackTests.PrivateKey }
|
494
|
-
}
|
495
|
-
}
|
496
|
-
};
|
497
|
-
break;
|
498
|
-
case "kmip":
|
499
|
-
kmsCredentialsDocument = new BsonDocument
|
500
|
-
{
|
501
|
-
{
|
502
|
-
"kmip",
|
503
|
-
new BsonDocument
|
504
|
-
{
|
505
|
-
{ "endpoint", "dummy" }
|
506
|
-
}
|
507
|
-
}
|
508
|
-
};
|
509
|
-
break;
|
510
|
-
default: throw new Exception($"Unsupported kms {kmsName}.");
|
511
|
-
}
|
512
|
-
return new KmsCredentials(kmsCredentialsDocument.ToBson());
|
513
|
-
}
|
514
|
-
|
515
|
-
private static KmsKeyId CreateKmsKeyId(string kmsName, string endPoint = null, IEnumerable<byte[]> keyAltNameBuffers = null)
|
516
|
-
{
|
517
|
-
BsonDocument datakeyOptionsDocument;
|
518
|
-
switch (kmsName)
|
519
|
-
{
|
520
|
-
case "local":
|
521
|
-
datakeyOptionsDocument = new BsonDocument
|
522
|
-
{
|
523
|
-
{ "provider", "local" },
|
524
|
-
};
|
525
|
-
break;
|
526
|
-
case "aws":
|
527
|
-
datakeyOptionsDocument = new BsonDocument
|
528
|
-
{
|
529
|
-
{ "provider", "aws" },
|
530
|
-
{ "key", "cmk" },
|
531
|
-
{ "region", "us-east-1" },
|
532
|
-
{ "endpoint", () => endPoint, endPoint != null }
|
533
|
-
};
|
534
|
-
break;
|
535
|
-
case "azure":
|
536
|
-
datakeyOptionsDocument = new BsonDocument
|
537
|
-
{
|
538
|
-
{ "provider", "azure" },
|
539
|
-
{ "keyName", "dummy" },
|
540
|
-
{ "keyVaultEndpoint", endPoint ?? "dummy.azure.net" }
|
541
|
-
};
|
542
|
-
break;
|
543
|
-
case "gcp":
|
544
|
-
datakeyOptionsDocument = new BsonDocument
|
545
|
-
{
|
546
|
-
{ "provider", "gcp" },
|
547
|
-
{ "projectId", "dummy" },
|
548
|
-
{ "location", "dummy" },
|
549
|
-
{ "keyRing", "dummy" },
|
550
|
-
{ "keyName", "dummy" },
|
551
|
-
{ "endpoint", () => endPoint, endPoint != null }
|
552
|
-
};
|
553
|
-
break;
|
554
|
-
case "kmip":
|
555
|
-
datakeyOptionsDocument = new BsonDocument
|
556
|
-
{
|
557
|
-
{ "provider", "kmip" }
|
558
|
-
};
|
559
|
-
break;
|
560
|
-
default: throw new Exception($"Unsupported kms {kmsName}.");
|
561
|
-
}
|
562
|
-
return new KmsKeyId(datakeyOptionsDocument.ToBson(), keyAltNameBuffers);
|
563
|
-
}
|
564
|
-
|
565
|
-
private CryptOptions CreateOptions()
|
566
|
-
{
|
567
|
-
return new CryptOptions(
|
568
|
-
new[]
|
569
|
-
{
|
570
|
-
CreateKmsCredentials("aws"),
|
571
|
-
CreateKmsCredentials("local")
|
572
|
-
});
|
573
|
-
}
|
574
|
-
|
575
|
-
private (Binary binarySent, BsonDocument document) ProcessContextToCompletion(CryptContext context, bool isKmsDecrypt = true)
|
576
|
-
{
|
577
|
-
BsonDocument document = null;
|
578
|
-
Binary binary = null;
|
579
|
-
|
580
|
-
while (!context.IsDone)
|
581
|
-
{
|
582
|
-
(_, binary, document) = ProcessState(context, isKmsDecrypt);
|
583
|
-
}
|
584
|
-
|
585
|
-
return (binary, document);
|
586
|
-
}
|
587
|
-
|
588
|
-
/// <summary>
|
589
|
-
/// Processes the current state, simulating the execution the operation/post requests needed to reach the next state
|
590
|
-
/// Returns (stateProcessed, binaryOperationProduced, bsonOperationProduced)
|
591
|
-
/// </summary>
|
592
|
-
/// <exception cref="NotImplementedException"></exception>
|
593
|
-
private (CryptContext.StateCode stateProcessed, Binary binaryProduced, BsonDocument bsonOperationProduced) ProcessState(CryptContext context, bool isKmsDecrypt = true)
|
594
|
-
{
|
595
|
-
_output.WriteLine("\n----------------------------------\nState:" + context.State);
|
596
|
-
switch (context.State)
|
597
|
-
{
|
598
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_COLLINFO:
|
599
|
-
{
|
600
|
-
var binary = context.GetOperation();
|
601
|
-
var doc = BsonUtil.ToDocument(binary);
|
602
|
-
_output.WriteLine("ListCollections: " + doc);
|
603
|
-
var reply = ReadJsonTestFile("collection-info.json");
|
604
|
-
_output.WriteLine("Reply:" + reply);
|
605
|
-
context.Feed(BsonUtil.ToBytes(reply));
|
606
|
-
context.MarkDone();
|
607
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_COLLINFO, binary, doc);
|
608
|
-
}
|
609
|
-
|
610
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_MARKINGS:
|
611
|
-
{
|
612
|
-
var binary = context.GetOperation();
|
613
|
-
var doc = BsonUtil.ToDocument(binary);
|
614
|
-
_output.WriteLine("Markings: " + doc);
|
615
|
-
var reply = ReadJsonTestFile("mongocryptd-reply.json");
|
616
|
-
_output.WriteLine("Reply:" + reply);
|
617
|
-
context.Feed(BsonUtil.ToBytes(reply));
|
618
|
-
context.MarkDone();
|
619
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_MARKINGS, binary, doc);
|
620
|
-
}
|
621
|
-
|
622
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS:
|
623
|
-
{
|
624
|
-
var binary = context.GetOperation();
|
625
|
-
var doc = BsonUtil.ToDocument(binary);
|
626
|
-
_output.WriteLine("Key Document: " + doc);
|
627
|
-
var reply = ReadJsonTestFile("key-document.json");
|
628
|
-
_output.WriteLine("Reply:" + reply);
|
629
|
-
context.Feed(BsonUtil.ToBytes(reply));
|
630
|
-
context.MarkDone();
|
631
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_NEED_MONGO_KEYS, binary, doc);
|
632
|
-
}
|
633
|
-
|
634
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS:
|
635
|
-
{
|
636
|
-
var requests = context.GetKmsMessageRequests();
|
637
|
-
foreach (var req in requests)
|
638
|
-
{
|
639
|
-
var binary = req.Message;
|
640
|
-
_output.WriteLine("Key Document: " + binary);
|
641
|
-
var postRequest = binary.ToString();
|
642
|
-
// TODO: add different hosts handling
|
643
|
-
postRequest.Should().Contain("Host:kms.us-east-1.amazonaws.com"); // only AWS
|
644
|
-
|
645
|
-
var reply = ReadHttpTestFile(isKmsDecrypt ? "kms-decrypt-reply.txt" : "kms-encrypt-reply.txt");
|
646
|
-
_output.WriteLine("Reply: " + reply);
|
647
|
-
req.Feed(Encoding.UTF8.GetBytes(reply));
|
648
|
-
req.BytesNeeded.Should().Be(0);
|
649
|
-
}
|
650
|
-
|
651
|
-
requests.MarkDone();
|
652
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_NEED_KMS, null, null);
|
653
|
-
}
|
654
|
-
|
655
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_READY:
|
656
|
-
{
|
657
|
-
Binary binary = context.FinalizeForEncryption();
|
658
|
-
_output.WriteLine("Buffer:" + binary.ToArray());
|
659
|
-
var document = BsonUtil.ToDocument(binary);
|
660
|
-
_output.WriteLine("Document:" + document);
|
661
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_READY, binary, document);
|
662
|
-
}
|
663
|
-
|
664
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_DONE:
|
665
|
-
{
|
666
|
-
_output.WriteLine("DONE!!");
|
667
|
-
return (CryptContext.StateCode.MONGOCRYPT_CTX_DONE, null, null);
|
668
|
-
}
|
669
|
-
|
670
|
-
case CryptContext.StateCode.MONGOCRYPT_CTX_ERROR:
|
671
|
-
{
|
672
|
-
// We expect exceptions are thrown before we get to this state
|
673
|
-
throw new NotImplementedException();
|
674
|
-
}
|
675
|
-
}
|
676
|
-
|
677
|
-
throw new NotImplementedException();
|
678
|
-
}
|
679
|
-
|
680
|
-
public CryptContext StartExplicitEncryptionContextWithKeyId(CryptClient client, byte[] keyId, string encryptionAlgorithm, byte[] message)
|
681
|
-
{
|
682
|
-
return client.StartExplicitEncryptionContext(keyId, keyAltName: null, queryType: null, contentionFactor: null, encryptionAlgorithm, message, rangeOptions: null);
|
683
|
-
}
|
684
|
-
|
685
|
-
static IEnumerable<string> FindTestDirectories()
|
686
|
-
{
|
687
|
-
string[] searchPaths = new[] { Path.Combine("..", "test", "example"), Path.Combine("..", "test", "data") };
|
688
|
-
var assemblyLocation = Path.GetDirectoryName(typeof(BasicTests).GetTypeInfo().Assembly.Location);
|
689
|
-
string cwd = Directory.GetCurrentDirectory(); // Assume we are in a child directory of the repo
|
690
|
-
var searchDirectory = assemblyLocation ?? cwd;
|
691
|
-
var testDirs = Enumerable.Range(1, 10)
|
692
|
-
.Select(i => Enumerable.Repeat("..", i))
|
693
|
-
.Select(dotsSeq => dotsSeq.Aggregate(Path.Combine))
|
694
|
-
.SelectMany(previousDirectories =>
|
695
|
-
searchPaths.Select(searchPath => Path.Combine(searchDirectory, previousDirectories, searchPath)))
|
696
|
-
.Where(Directory.Exists)
|
697
|
-
.ToArray();
|
698
|
-
|
699
|
-
if (!testDirs.Any())
|
700
|
-
{
|
701
|
-
throw new DirectoryNotFoundException("test/example");
|
702
|
-
}
|
703
|
-
|
704
|
-
return testDirs;
|
705
|
-
}
|
706
|
-
|
707
|
-
static string ReadHttpTestFile(string file)
|
708
|
-
{
|
709
|
-
// The HTTP tests assume \r\n
|
710
|
-
// And git strips \r on Unix machines by default so fix up the files
|
711
|
-
|
712
|
-
var text = ReadTestFile(file);
|
713
|
-
|
714
|
-
StringBuilder builder = new StringBuilder(text.Length);
|
715
|
-
for (int i = 0; i < text.Length; i++)
|
716
|
-
{
|
717
|
-
if (text[i] == '\n' && text[i - 1] != '\r')
|
718
|
-
builder.Append('\r');
|
719
|
-
builder.Append(text[i]);
|
720
|
-
}
|
721
|
-
return builder.ToString();
|
722
|
-
}
|
723
|
-
|
724
|
-
static BsonDocument ReadJsonTestFile(string file)
|
725
|
-
{
|
726
|
-
var text = ReadTestFile(file);
|
727
|
-
|
728
|
-
if (text == null)
|
729
|
-
{
|
730
|
-
throw new FileNotFoundException(file);
|
731
|
-
}
|
732
|
-
|
733
|
-
// Work around C# drivers and C driver have different extended json support
|
734
|
-
text = text.Replace("\"$numberLong\"", "$numberLong");
|
735
|
-
|
736
|
-
return BsonUtil.FromJSON(text);
|
737
|
-
}
|
738
|
-
|
739
|
-
static string ReadTestFile(string fileName)
|
740
|
-
{
|
741
|
-
return FindTestDirectories()
|
742
|
-
.Select(directory => Path.Combine(directory, fileName))
|
743
|
-
.Where(File.Exists)
|
744
|
-
.Select(File.ReadAllText)
|
745
|
-
.FirstOrDefault();
|
746
|
-
}
|
747
|
-
}
|
748
|
-
}
|