libmongocrypt-helper 1.7.4.0.1002 → 1.8.0.0.1001
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +9 -7
- data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +17 -23
- data/ext/libmongocrypt/libmongocrypt/Earthfile +374 -0
- data/ext/libmongocrypt/libmongocrypt/README.md +7 -7
- data/ext/libmongocrypt/libmongocrypt/VERSION_CURRENT +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +25 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +25 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +3 -2
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/cs.sln +79 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +2 -2
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +6 -4
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/CHANGELOG.md +24 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/README.md +134 -5
- data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/build-static.sh +3 -6
- data/ext/libmongocrypt/libmongocrypt/bindings/node/index.d.ts +203 -77
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/autoEncrypter.js +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/clientEncryption.js +165 -43
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/common.js +12 -14
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/errors.js +75 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/index.js +34 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/aws.js +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/azure.js +178 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/gcp.js +24 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/index.js +54 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/utils.js +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/stateMachine.js +9 -4
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package-lock.json +4440 -5189
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package.json +27 -8
- data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.cc +65 -38
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/autoEncrypter.test.js +4 -7
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/clientEncryption.test.js +434 -42
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/common.test.js +94 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/cryptoCallbacks.test.js +1 -45
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/index.test.js +45 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/mongocryptdManager.test.js +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/providers/credentialsProvider.test.js +551 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/release.test.js +10 -3
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/requirements.helper.js +23 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/stateMachine.test.js +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/tools/chai-addons.js +8 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/types/index.test-d.ts +63 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +2 -2
- data/ext/libmongocrypt/libmongocrypt/bindings/python/build-manylinux-wheel.sh +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +128 -238
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/compat.py +0 -27
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/explicit_encrypter.py +1 -1
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +5 -21
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +2 -2
- data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +5 -5
- data/ext/libmongocrypt/libmongocrypt/bindings/python/setup.py +14 -9
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/__init__.py +1 -10
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +5 -5
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test-requirements.txt +4 -12
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +8 -6
- data/ext/libmongocrypt/libmongocrypt/cmake/IntelDFP.cmake +2 -1
- data/ext/libmongocrypt/libmongocrypt/cmake/Platform.cmake +50 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/mongocrypt-config.cmake +21 -0
- data/ext/libmongocrypt/libmongocrypt/debian/gbp.conf +2 -2
- data/ext/libmongocrypt/libmongocrypt/etc/c6-vault.repo +39 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_aead_generate_tests.py +15 -24
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto.py +66 -54
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_generate_tests.py +14 -23
- data/ext/libmongocrypt/libmongocrypt/etc/fle2v2_aead_generate_tests.py +32 -0
- data/ext/libmongocrypt/libmongocrypt/etc/format-all.sh +12 -0
- data/ext/libmongocrypt/libmongocrypt/etc/format.sh +16 -0
- data/ext/libmongocrypt/libmongocrypt/etc/install-package.sh +48 -0
- data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-libmongocrypt-pr-625.patch +13 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/cng.c +381 -436
- data/ext/libmongocrypt/libmongocrypt/src/crypto/commoncrypto.c +162 -227
- data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +180 -248
- data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +33 -55
- data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +175 -205
- data/ext/libmongocrypt/libmongocrypt/src/mc-array-private.h +10 -21
- data/ext/libmongocrypt/libmongocrypt/src/mc-array.c +44 -56
- data/ext/libmongocrypt/libmongocrypt/src/mc-check-conversions-private.h +4 -8
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +351 -463
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +59 -66
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +7 -11
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +80 -92
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +18 -10
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +59 -70
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +384 -439
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private-v2.h +41 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private.h +11 -18
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-v2.c +135 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +109 -126
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private-v2.h +88 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private.h +24 -27
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-v2.c +137 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +106 -125
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private-v2.h +117 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private.h +28 -36
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-v2.c +294 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +237 -278
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private-v2.h +133 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private.h +67 -56
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-v2.c +437 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +476 -325
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common-private.h +69 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common.c +182 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-private.h +23 -31
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2-private.h +85 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2.c +142 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev.c +104 -231
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-range-operator-private.h +8 -7
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +55 -56
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +517 -580
- data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +36 -66
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +57 -76
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +158 -189
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +36 -42
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +515 -558
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +155 -191
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +43 -53
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +170 -240
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +29 -34
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +289 -338
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +36 -71
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +111 -164
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +55 -49
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +109 -125
- data/ext/libmongocrypt/libmongocrypt/src/mc-writer-private.h +66 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-writer.c +141 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/check.hpp +37 -55
- data/ext/libmongocrypt/libmongocrypt/src/mlib/endian.h +11 -11
- data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +27 -32
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +444 -499
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +251 -334
- data/ext/libmongocrypt/libmongocrypt/src/mlib/macros.h +4 -5
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +196 -231
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +56 -79
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +411 -530
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +116 -131
- data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +17 -26
- data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary-private.h +3 -6
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary.c +31 -48
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +55 -131
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +444 -565
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +1 -2
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +28 -45
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key-private.h +11 -17
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +103 -132
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth-private.h +8 -14
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth.c +78 -90
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +26 -45
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +220 -273
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +13 -25
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +147 -166
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-compat.h +2 -2
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +110 -204
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +1137 -1565
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +425 -472
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +817 -694
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +2394 -2697
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +166 -186
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +308 -351
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +921 -1138
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +16 -24
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endian-private.h +44 -58
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint-private.h +21 -25
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint.c +167 -181
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek-private.h +37 -43
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek.c +215 -253
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker-private.h +73 -108
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +889 -1034
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +27 -44
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +349 -402
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +92 -120
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +1397 -1612
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log-private.h +35 -67
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +49 -83
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +30 -36
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +1821 -1470
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-mutex-private.h +7 -12
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +80 -108
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +354 -424
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +101 -117
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status-private.h +3 -8
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status.c +92 -119
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util-private.h +19 -29
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +136 -176
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util-private.h +11 -21
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +96 -135
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +1092 -1320
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +130 -295
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +66 -78
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +20 -28
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +60 -73
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +8 -16
- data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +57 -87
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload-v2.json +60 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload-v2.json +67 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +2 -2
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-field-map.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/mongocryptd-reply.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/cmd.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-payload.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/mongocryptd-reply.json +58 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-field-map.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload-v2.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload-v2.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload-v2.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload-v2.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload-v2.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/cmd.json +1 -1
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/RNG_DATA.h +65 -65
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/cmd.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/RNG_DATA.h +132 -132
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/RNG_DATA.h +71 -71
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-payload.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/mongocryptd-reply.json +61 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/RNG_DATA.h +68 -68
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/RNG_DATA.h +19 -19
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-field-map.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-payload.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/mongocryptd-reply.json +55 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/RNG_DATA.h +25 -25
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/RNG_DATA.h +65 -65
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-field-map.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-payload.json +44 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/mongocryptd-reply.json +52 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/RNG_DATA.h +68 -68
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/RNG_DATA.h +19 -19
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/RNG_DATA.h +25 -25
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/RNG_DATA.h +15 -15
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload-v2.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-field-map.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-payload.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/mongocryptd-reply.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-field-map.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-payload.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/mongocryptd-reply.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneRangeV2.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneV2.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/README.md +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/aes-ctr.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-fixed.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-generated.json +38 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-decrypt.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-fixed.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-generated.json +122 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-fixed.json +29 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-generated.json +122 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/mcgrew.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/nist.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/tokens/README.md +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/tokens/mc.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/tokens/server.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/example-no-bson.c +4 -4
- data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +278 -323
- data/ext/libmongocrypt/libmongocrypt/test/fuzz_kms.c +8 -7
- data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +6 -7
- data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +221 -283
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +58 -73
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-equality-payload-v2.c +78 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-range-payload-v2.c +89 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev-v2.c +248 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +467 -414
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup-v2.c +172 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +141 -159
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev-v2.c +338 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +238 -176
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +373 -474
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +346 -388
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +708 -825
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +417 -481
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +110 -144
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +124 -207
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +223 -213
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-writer.c +176 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +634 -807
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +1 -2
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +168 -189
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +187 -211
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache-oauth.c +34 -36
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +210 -233
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +185 -220
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +331 -445
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +670 -814
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +102 -135
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.h +54 -71
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +394 -846
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +159 -183
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +867 -1045
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +4349 -4713
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +750 -964
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +991 -1178
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +342 -419
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +23 -30
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +98 -111
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +49 -52
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-broker.c +770 -920
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +354 -407
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key.c +197 -245
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +286 -370
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +147 -166
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +50 -61
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +85 -100
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +656 -692
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +46 -58
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-traverse-util.c +377 -451
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.c +48 -67
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.h +4 -10
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +827 -918
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +111 -172
- data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +508 -559
- data/ext/libmongocrypt/libmongocrypt/test/util/util.c +735 -881
- data/ext/libmongocrypt/libmongocrypt/test/util/util.h +33 -55
- data/lib/libmongocrypt_helper/version.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +154 -26
- metadata.gz.sig +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-document.json +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/credentialsProvider.js +0 -33
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/credentialsProvider.test.js +0 -163
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/aes-ctr.cstructs +0 -359
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-aead.cstructs +0 -109
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload.json +0 -26
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/rangeopts.json +0 -5
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/value-to-encrypt.json +0 -20
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/RNG_DATA.h +0 -70
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload.json +0 -8
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/rangeopts.json +0 -5
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/value-to-encrypt.json +0 -5
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2.cstructs +0 -33
- /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/key-filter.json +0 -0
- /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
- /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
- /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
- /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
@@ -133,6 +133,9 @@ namespace MongoDB.Libmongocrypt
|
|
133
133
|
_mongocrypt_ctx_setopt_algorithm = new Lazy<Delegates.mongocrypt_ctx_setopt_algorithm>(
|
134
134
|
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_setopt_algorithm>(
|
135
135
|
("mongocrypt_ctx_setopt_algorithm")), true);
|
136
|
+
_mongocrypt_ctx_setopt_algorithm_range = new Lazy<Delegates.mongocrypt_ctx_setopt_algorithm_range>(
|
137
|
+
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_setopt_algorithm_range>(
|
138
|
+
("mongocrypt_ctx_setopt_algorithm_range")), true);
|
136
139
|
_mongocrypt_ctx_setopt_contention_factor = new Lazy<Delegates.mongocrypt_ctx_setopt_contention_factor>(
|
137
140
|
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_setopt_contention_factor>(
|
138
141
|
("mongocrypt_ctx_setopt_contention_factor")), true);
|
@@ -151,6 +154,9 @@ namespace MongoDB.Libmongocrypt
|
|
151
154
|
_mongocrypt_ctx_explicit_encrypt_init = new Lazy<Delegates.mongocrypt_ctx_explicit_encrypt_init>(
|
152
155
|
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_explicit_encrypt_init>(
|
153
156
|
("mongocrypt_ctx_explicit_encrypt_init")), true);
|
157
|
+
_mongocrypt_ctx_explicit_encrypt_expression_init = new Lazy<Delegates.mongocrypt_ctx_explicit_encrypt_expression_init>(
|
158
|
+
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_explicit_encrypt_expression_init>(
|
159
|
+
("mongocrypt_ctx_explicit_encrypt_expression_init")), true);
|
154
160
|
_mongocrypt_ctx_explicit_decrypt_init = new Lazy<Delegates.mongocrypt_ctx_explicit_decrypt_init>(
|
155
161
|
() => __loader.Value.GetFunction<Delegates.mongocrypt_ctx_explicit_decrypt_init>(
|
156
162
|
("mongocrypt_ctx_explicit_decrypt_init")), true);
|
@@ -263,6 +269,7 @@ namespace MongoDB.Libmongocrypt
|
|
263
269
|
internal static Delegates.mongocrypt_ctx_encrypt_init mongocrypt_ctx_encrypt_init => _mongocrypt_ctx_encrypt_init.Value;
|
264
270
|
internal static Delegates.mongocrypt_ctx_decrypt_init mongocrypt_ctx_decrypt_init => _mongocrypt_ctx_decrypt_init.Value;
|
265
271
|
internal static Delegates.mongocrypt_ctx_explicit_encrypt_init mongocrypt_ctx_explicit_encrypt_init => _mongocrypt_ctx_explicit_encrypt_init.Value;
|
272
|
+
internal static Delegates.mongocrypt_ctx_explicit_encrypt_expression_init mongocrypt_ctx_explicit_encrypt_expression_init => _mongocrypt_ctx_explicit_encrypt_expression_init.Value;
|
266
273
|
internal static Delegates.mongocrypt_ctx_explicit_decrypt_init mongocrypt_ctx_explicit_decrypt_init => _mongocrypt_ctx_explicit_decrypt_init.Value;
|
267
274
|
internal static Delegates.mongocrypt_ctx_datakey_init mongocrypt_ctx_datakey_init => _mongocrypt_ctx_datakey_init.Value;
|
268
275
|
internal static Delegates.mongocrypt_ctx_provide_kms_providers mongocrypt_ctx_provide_kms_providers => _mongocrypt_ctx_provide_kms_providers.Value;
|
@@ -270,6 +277,7 @@ namespace MongoDB.Libmongocrypt
|
|
270
277
|
internal static Delegates.mongocrypt_ctx_setopt_key_id mongocrypt_ctx_setopt_key_id => _mongocrypt_ctx_setopt_key_id.Value;
|
271
278
|
internal static Delegates.mongocrypt_ctx_setopt_key_alt_name mongocrypt_ctx_setopt_key_alt_name => _mongocrypt_ctx_setopt_key_alt_name.Value;
|
272
279
|
internal static Delegates.mongocrypt_ctx_setopt_algorithm mongocrypt_ctx_setopt_algorithm => _mongocrypt_ctx_setopt_algorithm.Value;
|
280
|
+
internal static Delegates.mongocrypt_ctx_setopt_algorithm_range mongocrypt_ctx_setopt_algorithm_range => _mongocrypt_ctx_setopt_algorithm_range.Value;
|
273
281
|
internal static Delegates.mongocrypt_ctx_setopt_contention_factor mongocrypt_ctx_setopt_contention_factor => _mongocrypt_ctx_setopt_contention_factor.Value;
|
274
282
|
internal static Delegates.mongocrypt_ctx_setopt_query_type mongocrypt_ctx_setopt_query_type => _mongocrypt_ctx_setopt_query_type.Value;
|
275
283
|
|
@@ -342,6 +350,7 @@ namespace MongoDB.Libmongocrypt
|
|
342
350
|
private static readonly Lazy<Delegates.mongocrypt_ctx_decrypt_init> _mongocrypt_ctx_decrypt_init;
|
343
351
|
|
344
352
|
private static readonly Lazy<Delegates.mongocrypt_ctx_explicit_encrypt_init> _mongocrypt_ctx_explicit_encrypt_init;
|
353
|
+
private static readonly Lazy<Delegates.mongocrypt_ctx_explicit_encrypt_expression_init> _mongocrypt_ctx_explicit_encrypt_expression_init;
|
345
354
|
|
346
355
|
private static readonly Lazy<Delegates.mongocrypt_ctx_explicit_decrypt_init> _mongocrypt_ctx_explicit_decrypt_init;
|
347
356
|
|
@@ -353,6 +362,7 @@ namespace MongoDB.Libmongocrypt
|
|
353
362
|
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_key_id> _mongocrypt_ctx_setopt_key_id;
|
354
363
|
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_key_alt_name> _mongocrypt_ctx_setopt_key_alt_name;
|
355
364
|
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_algorithm> _mongocrypt_ctx_setopt_algorithm;
|
365
|
+
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_algorithm_range> _mongocrypt_ctx_setopt_algorithm_range;
|
356
366
|
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_contention_factor> _mongocrypt_ctx_setopt_contention_factor;
|
357
367
|
private static readonly Lazy<Delegates.mongocrypt_ctx_setopt_query_type> _mongocrypt_ctx_setopt_query_type;
|
358
368
|
|
@@ -479,7 +489,7 @@ namespace MongoDB.Libmongocrypt
|
|
479
489
|
/// </summary>
|
480
490
|
[return: MarshalAs(UnmanagedType.I1)]
|
481
491
|
public delegate bool mongocrypt_setopt_encrypted_field_config_map(MongoCryptSafeHandle handle, BinarySafeHandle efc_map);
|
482
|
-
[return: MarshalAs(UnmanagedType.I1)
|
492
|
+
[return: MarshalAs(UnmanagedType.I1)]
|
483
493
|
public delegate bool mongocrypt_setopt_schema_map(MongoCryptSafeHandle handle, BinarySafeHandle schema);
|
484
494
|
/// <summary>
|
485
495
|
/// void mongocrypt_setopt_append_crypt_shared_lib_search_path(mongocrypt_t* crypt, const char* path);
|
@@ -561,9 +571,16 @@ namespace MongoDB.Libmongocrypt
|
|
561
571
|
[return: MarshalAs(UnmanagedType.I1)]
|
562
572
|
public delegate bool mongocrypt_ctx_decrypt_init(ContextSafeHandle handle, BinarySafeHandle binary);
|
563
573
|
|
574
|
+
/// <summary>
|
575
|
+
/// bool mongocrypt_ctx_explicit_encrypt_init(mongocrypt_ctx_t* ctx, mongocrypt_binary_t* msg)
|
576
|
+
/// </summary>
|
564
577
|
[return: MarshalAs(UnmanagedType.I1)]
|
565
|
-
public delegate bool
|
566
|
-
|
578
|
+
public delegate bool mongocrypt_ctx_explicit_encrypt_init(ContextSafeHandle handle, BinarySafeHandle binary);
|
579
|
+
/// <summary>
|
580
|
+
/// bool mongocrypt_ctx_explicit_encrypt_expression_init(mongocrypt_ctx_t* ctx, mongocrypt_binary_t* msg)
|
581
|
+
/// </summary>
|
582
|
+
[return: MarshalAs(UnmanagedType.I1)]
|
583
|
+
public delegate bool mongocrypt_ctx_explicit_encrypt_expression_init(ContextSafeHandle handle, BinarySafeHandle msg);
|
567
584
|
|
568
585
|
[return: MarshalAs(UnmanagedType.I1)]
|
569
586
|
public delegate bool
|
@@ -596,6 +613,11 @@ namespace MongoDB.Libmongocrypt
|
|
596
613
|
[return: MarshalAs(UnmanagedType.I1)]
|
597
614
|
public delegate bool mongocrypt_ctx_setopt_algorithm(ContextSafeHandle handle, [MarshalAs(UnmanagedType.LPStr)] string algorithm, int length);
|
598
615
|
/// <summary>
|
616
|
+
/// bool mongocrypt_ctx_setopt_algorithm_range(mongocrypt_ctx_t* ctx, mongocrypt_binary_t* opts);
|
617
|
+
/// </summary>
|
618
|
+
[return: MarshalAs(UnmanagedType.I1)]
|
619
|
+
public delegate bool mongocrypt_ctx_setopt_algorithm_range(ContextSafeHandle handle, BinarySafeHandle opts);
|
620
|
+
/// <summary>
|
599
621
|
/// bool mongocrypt_ctx_setopt_contention_factor(mongocrypt_ctx_t* ctx, int64_t contention_factor);
|
600
622
|
/// </summary>
|
601
623
|
[return: MarshalAs(UnmanagedType.I1)]
|
@@ -679,7 +679,7 @@ namespace MongoDB.Libmongocrypt.Test
|
|
679
679
|
|
680
680
|
public CryptContext StartExplicitEncryptionContextWithKeyId(CryptClient client, byte[] keyId, string encryptionAlgorithm, byte[] message)
|
681
681
|
{
|
682
|
-
return client.StartExplicitEncryptionContext(keyId, keyAltName: null, queryType: null, contentionFactor: null, encryptionAlgorithm, message);
|
682
|
+
return client.StartExplicitEncryptionContext(keyId, keyAltName: null, queryType: null, contentionFactor: null, encryptionAlgorithm, message, rangeOptions: null);
|
683
683
|
}
|
684
684
|
|
685
685
|
static IEnumerable<string> FindTestDirectories()
|
@@ -17,8 +17,9 @@ var downloadedMongocryptDirectory=buildDirectory.Combine("downloadedMongocryptDi
|
|
17
17
|
var localReleaseVersion = "local-0.0.0";
|
18
18
|
var releaseVersion = GetSettingValue("releaseVersion", localReleaseVersion);
|
19
19
|
var fork = GetSettingValue("fork", "https://github.com/mongodb/libmongocrypt.git");
|
20
|
-
var branch = GetSettingValue("branch", "master");
|
21
|
-
|
20
|
+
var branch = GetSettingValue("branch", "master");
|
21
|
+
// 1.8.0-alpha0
|
22
|
+
var libmongocryptAllUrl = GetSettingValue("url", "https://mciuploads.s3.amazonaws.com/libmongocrypt/all/1.8.0-alpha0/libmongocrypt-all.tar.gz");
|
22
23
|
var csharpBindingsGitTagName = $"csharp-v{releaseVersion}";
|
23
24
|
var csharpBindingsDirectory = buildDirectory.Combine(csharpBindingsGitTagName);
|
24
25
|
var libmongocryptRelWithDebInfoDirectory = csharpBindingsDirectory.Combine("cmake-build").Combine("RelWithDebInfo");
|
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
3
|
+
# Visual Studio 15
|
4
|
+
VisualStudioVersion = 15.0.26124.0
|
5
|
+
MinimumVisualStudioVersion = 15.0.26124.0
|
6
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Libmongocrypt", "MongoDB.Libmongocrypt\MongoDB.Libmongocrypt.csproj", "{90EA4DBB-69E6-426D-985A-C66D65A2E63A}"
|
7
|
+
EndProject
|
8
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Libmongocrypt.Test", "MongoDB.Libmongocrypt.Test\MongoDB.Libmongocrypt.Test.csproj", "{F2D29C5D-DA83-456D-994F-57AB43EA9470}"
|
9
|
+
EndProject
|
10
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Libmongocrypt.Example", "MongoDB.Libmongocrypt.Example\MongoDB.Libmongocrypt.Example.csproj", "{536E0590-7287-4D73-A5D7-5B8EFD2945B8}"
|
11
|
+
EndProject
|
12
|
+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Libmongocrypt.Test32", "MongoDB.Libmongocrypt.Test32\MongoDB.Libmongocrypt.Test32.csproj", "{EBD0FAFF-4794-4346-9313-A286E278EDA7}"
|
13
|
+
EndProject
|
14
|
+
Global
|
15
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
16
|
+
Debug|Any CPU = Debug|Any CPU
|
17
|
+
Debug|x64 = Debug|x64
|
18
|
+
Debug|x86 = Debug|x86
|
19
|
+
Release|Any CPU = Release|Any CPU
|
20
|
+
Release|x64 = Release|x64
|
21
|
+
Release|x86 = Release|x86
|
22
|
+
EndGlobalSection
|
23
|
+
GlobalSection(SolutionProperties) = preSolution
|
24
|
+
HideSolutionNode = FALSE
|
25
|
+
EndGlobalSection
|
26
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
27
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
28
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
29
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
30
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|x64.Build.0 = Debug|Any CPU
|
31
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
32
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Debug|x86.Build.0 = Debug|Any CPU
|
33
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
34
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|Any CPU.Build.0 = Release|Any CPU
|
35
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|x64.ActiveCfg = Release|Any CPU
|
36
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|x64.Build.0 = Release|Any CPU
|
37
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|x86.ActiveCfg = Release|Any CPU
|
38
|
+
{90EA4DBB-69E6-426D-985A-C66D65A2E63A}.Release|x86.Build.0 = Release|Any CPU
|
39
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
40
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
41
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|x64.ActiveCfg = Debug|Any CPU
|
42
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|x64.Build.0 = Debug|Any CPU
|
43
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|x86.ActiveCfg = Debug|Any CPU
|
44
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Debug|x86.Build.0 = Debug|Any CPU
|
45
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
46
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|Any CPU.Build.0 = Release|Any CPU
|
47
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|x64.ActiveCfg = Release|Any CPU
|
48
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|x64.Build.0 = Release|Any CPU
|
49
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|x86.ActiveCfg = Release|Any CPU
|
50
|
+
{F2D29C5D-DA83-456D-994F-57AB43EA9470}.Release|x86.Build.0 = Release|Any CPU
|
51
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
52
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
53
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|x64.ActiveCfg = Debug|Any CPU
|
54
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|x64.Build.0 = Debug|Any CPU
|
55
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|x86.ActiveCfg = Debug|Any CPU
|
56
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Debug|x86.Build.0 = Debug|Any CPU
|
57
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
58
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|Any CPU.Build.0 = Release|Any CPU
|
59
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|x64.ActiveCfg = Release|Any CPU
|
60
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|x64.Build.0 = Release|Any CPU
|
61
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|x86.ActiveCfg = Release|Any CPU
|
62
|
+
{536E0590-7287-4D73-A5D7-5B8EFD2945B8}.Release|x86.Build.0 = Release|Any CPU
|
63
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
64
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
65
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
66
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|x64.Build.0 = Debug|Any CPU
|
67
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
68
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Debug|x86.Build.0 = Debug|Any CPU
|
69
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
70
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|Any CPU.Build.0 = Release|Any CPU
|
71
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|x64.ActiveCfg = Release|Any CPU
|
72
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|x64.Build.0 = Release|Any CPU
|
73
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|x86.ActiveCfg = Release|Any CPU
|
74
|
+
{EBD0FAFF-4794-4346-9313-A286E278EDA7}.Release|x86.Build.0 = Release|Any CPU
|
75
|
+
EndGlobalSection
|
76
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
77
|
+
SolutionGuid = {C644578D-7C87-4AC7-A3E2-AA124E0911B1}
|
78
|
+
EndGlobalSection
|
79
|
+
EndGlobal
|
@@ -43,7 +43,7 @@ repositories {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
group = "org.mongodb"
|
46
|
-
version = "1.
|
46
|
+
version = "1.8.0-SNAPSHOT"
|
47
47
|
description = "MongoDB client-side crypto support"
|
48
48
|
|
49
49
|
java {
|
@@ -133,7 +133,6 @@ tasks.register<Copy>("unzipJava") {
|
|
133
133
|
}
|
134
134
|
into(jnaResourcesDir)
|
135
135
|
mustRunAfter("downloadJava")
|
136
|
-
tasks.withType<ProcessResources>().forEach { t -> t.mustRunAfter("unzipJava") }
|
137
136
|
|
138
137
|
doLast {
|
139
138
|
println("jna.library.path contents: \n ${fileTree(jnaResourcesDir).files.joinToString(",\n ")}")
|
@@ -318,6 +317,7 @@ tasks.register("publishToSonatype") {
|
|
318
317
|
}
|
319
318
|
}
|
320
319
|
|
320
|
+
|
321
321
|
/*
|
322
322
|
For security we allow the signing-related project properties to be passed in as environment variables, which
|
323
323
|
Gradle enables if they are prefixed with "ORG_GRADLE_PROJECT_". But since environment variables can not contain
|
@@ -23,6 +23,7 @@ import org.bson.BsonBinarySubType;
|
|
23
23
|
import org.bson.BsonDocument;
|
24
24
|
import org.bson.BsonString;
|
25
25
|
import org.bson.RawBsonDocument;
|
26
|
+
import org.junit.jupiter.api.Disabled;
|
26
27
|
import org.junit.jupiter.api.Test;
|
27
28
|
|
28
29
|
import java.io.BufferedReader;
|
@@ -197,14 +198,15 @@ public class MongoCryptTest {
|
|
197
198
|
mongoCrypt.close();
|
198
199
|
}
|
199
200
|
|
201
|
+
|
200
202
|
@Test
|
201
203
|
public void testExplicitExpressionEncryption() {
|
202
204
|
MongoCrypt mongoCrypt = createMongoCrypt();
|
203
205
|
assertNotNull(mongoCrypt);
|
204
206
|
|
205
|
-
BsonDocument valueToEncrypt = getResourceAsDocument("fle2-find-range-explicit/int32/value-to-encrypt.json");
|
206
|
-
BsonDocument rangeOptions = getResourceAsDocument("fle2-find-range-explicit/int32/rangeopts.json");
|
207
|
-
BsonDocument expectedEncryptedPayload = getResourceAsDocument("fle2-find-range-explicit/int32/encrypted-payload.json");
|
207
|
+
BsonDocument valueToEncrypt = getResourceAsDocument("fle2-find-range-explicit-v2/int32/value-to-encrypt.json");
|
208
|
+
BsonDocument rangeOptions = getResourceAsDocument("fle2-find-range-explicit-v2/int32/rangeopts.json");
|
209
|
+
BsonDocument expectedEncryptedPayload = getResourceAsDocument("fle2-find-range-explicit-v2/int32/encrypted-payload.json");
|
208
210
|
|
209
211
|
MongoExplicitEncryptOptions options = MongoExplicitEncryptOptions.builder()
|
210
212
|
.keyId(new BsonBinary(BsonBinarySubType.UUID_STANDARD, Base64.getDecoder().decode("q83vqxI0mHYSNBI0VniQEg==")))
|
@@ -216,7 +218,7 @@ public class MongoCryptTest {
|
|
216
218
|
MongoCryptContext encryptor = mongoCrypt.createEncryptExpressionContext(valueToEncrypt, options);
|
217
219
|
assertEquals(State.NEED_MONGO_KEYS, encryptor.getState());
|
218
220
|
|
219
|
-
testKeyDecryptor(encryptor, "fle2-find-range-explicit/int32/key-filter.json", "keys/ABCDEFAB123498761234123456789012-local-document.json");
|
221
|
+
testKeyDecryptor(encryptor, "fle2-find-range-explicit-v2/int32/key-filter.json", "keys/ABCDEFAB123498761234123456789012-local-document.json");
|
220
222
|
|
221
223
|
assertEquals(State.READY, encryptor.getState());
|
222
224
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"v": {
|
3
|
+
"$and": [
|
4
|
+
{
|
5
|
+
"age": {
|
6
|
+
"$gte": {
|
7
|
+
"$binary": {
|
8
|
+
"base64": "Dd0BAAADcGF5bG9hZACZAQAABGcAhQEAAAMwAH0AAAAFZAAgAAAAAInd0noBhIiJMv8QTjcfgRqnnVhxRJRRACLfvgT+CTR/BXMAIAAAAADm0EjqF/T4EmR6Dw6NaPLrL0OuzS4AFvm90czFluAAygVsACAAAAAA5MXcYWjYlzhPFUDebBEa17B5z2bupmaW9uCdtLjc7RkAAzEAfQAAAAVkACAAAAAA7lkNtT6RLw91aJ07K/blwlFs5wi9pQjqUXDcaCTxe98FcwAgAAAAAPwySffuLQihmF70Ot93KtaUMNU8KpmA+niyPRcvarNMBWwAIAAAAACDv6fJXXwRqwZH3O2kO+hdeLZ36U6bMZSui8kv0PsPtAADMgB9AAAABWQAIAAAAACcMWVTbZC4ox5VdjWeYKLgf4oBjpPlbTTAkucm9JPK0wVzACAAAAAA3tIww4ZTytkxFsUKyJbc3zwQ2w7DhkOqaNvX9g8pi3gFbAAgAAAAAGs9XR3Q1JpxV+HPW8P2GvCuCBF5bGZ8Kl1zHqzZcd5/AAASY20ABAAAAAAAAAAAEHBheWxvYWRJZAAAAAAAEGZpcnN0T3BlcmF0b3IAAgAAABBzZWNvbmRPcGVyYXRvcgAEAAAAAA==",
|
9
|
+
"subType": "06"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"age": {
|
16
|
+
"$lte": {
|
17
|
+
"$binary": {
|
18
|
+
"base64": "DTsAAAAQcGF5bG9hZElkAAAAAAAQZmlyc3RPcGVyYXRvcgACAAAAEHNlY29uZE9wZXJhdG9yAAQAAAAA",
|
19
|
+
"subType": "06"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
}
|
@@ -2,6 +2,30 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
4
|
|
5
|
+
## [2.8.0-alpha.1](https://github.com/mongodb/libmongocrypt/compare/node-v2.8.0-alpha.0...node-v2.8.0-alpha.1) (2023-04-27)
|
6
|
+
|
7
|
+
## [2.8.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.7.1...node-v2.8.0-alpha.0) (2023-04-04)
|
8
|
+
|
9
|
+
### [2.7.1](https://github.com/mongodb/libmongocrypt/compare/node-v2.7.0...node-v2.7.1) (2023-03-20)
|
10
|
+
|
11
|
+
## [2.7.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.7.0-alpha.0...node-v2.7.0) (2023-03-20)
|
12
|
+
|
13
|
+
## [2.7.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0...node-v2.7.0-alpha.0) (2023-03-14)
|
14
|
+
|
15
|
+
## [2.6.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0-alpha.0...node-v2.6.0) (2023-02-23)
|
16
|
+
|
17
|
+
## [2.6.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.5.0...node-v2.6.0-alpha.0) (2023-02-16)
|
18
|
+
|
19
|
+
## [2.5.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.4.0...node-v2.5.0) (2023-02-06)
|
20
|
+
|
21
|
+
## [2.4.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.4.0-alpha.2...node-v2.4.0) (2023-01-26)
|
22
|
+
|
23
|
+
## [2.4.0-alpha.2](https://github.com/mongodb/libmongocrypt/compare/node-v2.4.0-alpha.0...node-v2.4.0-alpha.2) (2023-01-24)
|
24
|
+
|
25
|
+
## [2.4.0-alpha.1](https://github.com/mongodb/libmongocrypt/compare/node-v2.4.0-alpha.0...node-v2.4.0-alpha.1) (2023-01-23)
|
26
|
+
|
27
|
+
## [2.4.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.3.0...node-v2.4.0-alpha.0) (2023-01-20)
|
28
|
+
|
5
29
|
## [2.3.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.2.1...node-v2.3.0) (2022-10-05)
|
6
30
|
|
7
31
|
### [2.2.1](https://github.com/mongodb/libmongocrypt/compare/node-v2.2.0...node-v2.2.1) (2022-09-12)
|
@@ -54,11 +54,26 @@ npm test
|
|
54
54
|
<dt><a href="#MongoCryptError">MongoCryptError</a></dt>
|
55
55
|
<dd><p>An error indicating that something went wrong specifically with MongoDB Client Encryption</p>
|
56
56
|
</dd>
|
57
|
+
<dt><a href="#MongoCryptCreateDataKeyError">MongoCryptCreateDataKeyError</a></dt>
|
58
|
+
<dd><p>An error indicating that <code>ClientEncryption.createEncryptedCollection()</code> failed to create data keys</p>
|
59
|
+
</dd>
|
60
|
+
<dt><a href="#MongoCryptCreateEncryptedCollectionError">MongoCryptCreateEncryptedCollectionError</a></dt>
|
61
|
+
<dd><p>An error indicating that <code>ClientEncryption.createEncryptedCollection()</code> failed to create a collection</p>
|
62
|
+
</dd>
|
63
|
+
<dt><a href="#MongoCryptAzureKMSRequestError">MongoCryptAzureKMSRequestError</a></dt>
|
64
|
+
<dd><p>An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.</p>
|
65
|
+
</dd>
|
57
66
|
</dl>
|
58
67
|
|
59
68
|
## Typedefs
|
60
69
|
|
61
70
|
<dl>
|
71
|
+
<dt><a href="#BSONValue">BSONValue</a> : <code>*</code></dt>
|
72
|
+
<dd><p>any serializable BSON value</p>
|
73
|
+
</dd>
|
74
|
+
<dt><a href="#Long">Long</a> : <code>BSON.Long</code></dt>
|
75
|
+
<dd><p>A 64 bit integer, represented by the js-bson Long type.</p>
|
76
|
+
</dd>
|
62
77
|
<dt><a href="#KMSProviders">KMSProviders</a> : <code>object</code></dt>
|
63
78
|
<dd><p>Configuration options that are used by specific KMS providers during key generation, encryption, and decryption.</p>
|
64
79
|
</dd>
|
@@ -100,6 +115,13 @@ query for the data key itself against the key vault namespace.</p>
|
|
100
115
|
<dd></dd>
|
101
116
|
<dt><a href="#ClientEncryptionEncryptCallback">ClientEncryptionEncryptCallback</a> : <code>function</code></dt>
|
102
117
|
<dd></dd>
|
118
|
+
<dt><a href="#RangeOptions">RangeOptions</a> : <code>object</code></dt>
|
119
|
+
<dd><p>min, max, sparsity, and range must match the values set in the encryptedFields of the destination collection.
|
120
|
+
For double and decimal128, min/max/precision must all be set, or all be unset.</p>
|
121
|
+
</dd>
|
122
|
+
<dt><a href="#EncryptOptions">EncryptOptions</a> : <code>object</code></dt>
|
123
|
+
<dd><p>Options to provide when encrypting data.</p>
|
124
|
+
</dd>
|
103
125
|
</dl>
|
104
126
|
|
105
127
|
<a name="AutoEncrypter"></a>
|
@@ -263,8 +285,12 @@ The public interface for explicit in-use encryption
|
|
263
285
|
|
264
286
|
* [.removeKeyAltName(_id, keyAltName)](#ClientEncryption+removeKeyAltName)
|
265
287
|
|
288
|
+
* [.createEncryptedCollection(db, name, options)](#ClientEncryption+createEncryptedCollection)
|
289
|
+
|
266
290
|
* [.encrypt(value, options, [callback])](#ClientEncryption+encrypt)
|
267
291
|
|
292
|
+
* [.encryptExpression(expression, options)](#ClientEncryption+encryptExpression)
|
293
|
+
|
268
294
|
* [.decrypt(value, callback)](#ClientEncryption+decrypt)
|
269
295
|
|
270
296
|
* [.askForKMSCredentials()](#ClientEncryption+askForKMSCredentials)
|
@@ -527,6 +553,30 @@ if (!oldKey) {
|
|
527
553
|
// null is returned if there is no matching document with an id matching the supplied id
|
528
554
|
}
|
529
555
|
```
|
556
|
+
<a name="ClientEncryption+createEncryptedCollection"></a>
|
557
|
+
|
558
|
+
### *clientEncryption*.createEncryptedCollection(db, name, options)
|
559
|
+
**Throws**:
|
560
|
+
|
561
|
+
- [<code>MongoCryptCreateDataKeyError</code>](#MongoCryptCreateDataKeyError) - If part way through the process a createDataKey invocation fails, an error will be rejected that has the partial `encryptedFields` that were created.
|
562
|
+
- [<code>MongoCryptCreateEncryptedCollectionError</code>](#MongoCryptCreateEncryptedCollectionError) - If creating the collection fails, an error will be rejected that has the entire `encryptedFields` that were created.
|
563
|
+
|
564
|
+
**Experimental**: Public Technical Preview
|
565
|
+
|
566
|
+
A convenience method for creating an encrypted collection.
|
567
|
+
This method will create data keys for any encryptedFields that do not have a `keyId` defined
|
568
|
+
and then create a new collection with the full set of encryptedFields.
|
569
|
+
|
570
|
+
| Param | Type | Description |
|
571
|
+
| --- | --- | --- |
|
572
|
+
| db | <code>Db</code> | A Node.js driver Db object with which to create the collection |
|
573
|
+
| name | <code>string</code> | The name of the collection to be created |
|
574
|
+
| options | <code>object</code> | Options for createDataKey and for createCollection |
|
575
|
+
| options.provider | <code>string</code> | KMS provider name |
|
576
|
+
| [options.masterKey] | [<code>AWSEncryptionKeyOptions</code>](#AWSEncryptionKeyOptions) \| [<code>AzureEncryptionKeyOptions</code>](#AzureEncryptionKeyOptions) \| [<code>GCPEncryptionKeyOptions</code>](#GCPEncryptionKeyOptions) | masterKey to pass to createDataKey |
|
577
|
+
| options.createCollectionOptions | <code>CreateCollectionOptions</code> | options to pass to createCollection, must include `encryptedFields` |
|
578
|
+
|
579
|
+
**Returns**: <code>Promise.<{collection: Collection.<TSchema>, encryptedFields: Document}></code> - - created collection and generated encryptedFields
|
530
580
|
<a name="ClientEncryption+encrypt"></a>
|
531
581
|
|
532
582
|
### *clientEncryption*.encrypt(value, options, [callback])
|
@@ -534,10 +584,7 @@ if (!oldKey) {
|
|
534
584
|
| Param | Type | Description |
|
535
585
|
| --- | --- | --- |
|
536
586
|
| value | <code>\*</code> | The value that you wish to serialize. Must be of a type that can be serialized into BSON |
|
537
|
-
| options | <code>
|
538
|
-
| [options.keyId] | [<code>ClientEncryptionDataKeyId</code>](#ClientEncryptionDataKeyId) | The id of the Binary dataKey to use for encryption |
|
539
|
-
| [options.keyAltName] | <code>string</code> | A unique string name corresponding to an already existing dataKey. |
|
540
|
-
| [options.algorithm] | | The algorithm to use for encryption. Must be either `'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'`, `'AEAD_AES_256_CBC_HMAC_SHA_512-Random'`, `'Indexed'` or `'Unindexed'` |
|
587
|
+
| options | [<code>EncryptOptions</code>](#EncryptOptions) | |
|
541
588
|
| [callback] | [<code>ClientEncryptionEncryptCallback</code>](#ClientEncryptionEncryptCallback) | Optional callback to invoke when value is encrypted |
|
542
589
|
|
543
590
|
Explicitly encrypt a provided value. Note that either `options.keyId` or `options.keyAltName` must
|
@@ -572,6 +619,21 @@ async function encryptMyData(value) {
|
|
572
619
|
return clientEncryption.encrypt(value, { keyAltName: 'mySpecialKey', algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic' });
|
573
620
|
}
|
574
621
|
```
|
622
|
+
<a name="ClientEncryption+encryptExpression"></a>
|
623
|
+
|
624
|
+
### *clientEncryption*.encryptExpression(expression, options)
|
625
|
+
**Experimental**: The Range algorithm is experimental only. It is not intended for production use. It is subject to breaking changes.
|
626
|
+
|
627
|
+
| Param | Type | Description |
|
628
|
+
| --- | --- | --- |
|
629
|
+
| expression | <code>object</code> | a BSON document of one of the following forms: 1. A Match Expression of this form: `{$and: [{<field>: {$gt: <value1>}}, {<field>: {$lt: <value2> }}]}` 2. An Aggregate Expression of this form: `{$and: [{$gt: [<fieldpath>, <value1>]}, {$lt: [<fieldpath>, <value2>]}]}` `$gt` may also be `$gte`. `$lt` may also be `$lte`. |
|
630
|
+
| options | [<code>EncryptOptions</code>](#EncryptOptions) | |
|
631
|
+
|
632
|
+
Encrypts a Match Expression or Aggregate Expression to query a range index.
|
633
|
+
|
634
|
+
Only supported when queryType is "rangePreview" and algorithm is "RangePreview".
|
635
|
+
|
636
|
+
**Returns**: <code>Promise.<object></code> - Returns a Promise that either resolves with the encrypted value or rejects with an error.
|
575
637
|
<a name="ClientEncryption+decrypt"></a>
|
576
638
|
|
577
639
|
### *clientEncryption*.decrypt(value, callback)
|
@@ -583,7 +645,7 @@ async function encryptMyData(value) {
|
|
583
645
|
|
584
646
|
Explicitly decrypt a provided encrypted value
|
585
647
|
|
586
|
-
**Returns**: <code>Promise</code> \| <code>void</code> - If no callback is provided, returns a Promise that either resolves with the
|
648
|
+
**Returns**: <code>Promise</code> \| <code>void</code> - If no callback is provided, returns a Promise that either resolves with the decrypted value, or rejects with an error. If a callback is provided, returns nothing.
|
587
649
|
**Example**
|
588
650
|
```js
|
589
651
|
// Decrypting value with callback API
|
@@ -621,6 +683,42 @@ the original ones.
|
|
621
683
|
## MongoCryptError
|
622
684
|
An error indicating that something went wrong specifically with MongoDB Client Encryption
|
623
685
|
|
686
|
+
<a name="MongoCryptCreateDataKeyError"></a>
|
687
|
+
|
688
|
+
## MongoCryptCreateDataKeyError
|
689
|
+
**Experimental**: Public Technical Preview
|
690
|
+
An error indicating that `ClientEncryption.createEncryptedCollection()` failed to create data keys
|
691
|
+
|
692
|
+
<a name="MongoCryptCreateEncryptedCollectionError"></a>
|
693
|
+
|
694
|
+
## MongoCryptCreateEncryptedCollectionError
|
695
|
+
**Experimental**: Public Technical Preview
|
696
|
+
An error indicating that `ClientEncryption.createEncryptedCollection()` failed to create a collection
|
697
|
+
|
698
|
+
<a name="MongoCryptAzureKMSRequestError"></a>
|
699
|
+
|
700
|
+
## MongoCryptAzureKMSRequestError
|
701
|
+
An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.
|
702
|
+
|
703
|
+
<a name="new_MongoCryptAzureKMSRequestError_new"></a>
|
704
|
+
|
705
|
+
### new MongoCryptAzureKMSRequestError(message, body)
|
706
|
+
|
707
|
+
| Param | Type |
|
708
|
+
| --- | --- |
|
709
|
+
| message | <code>string</code> |
|
710
|
+
| body | <code>object</code> \| <code>undefined</code> |
|
711
|
+
|
712
|
+
<a name="BSONValue"></a>
|
713
|
+
|
714
|
+
## BSONValue
|
715
|
+
any serializable BSON value
|
716
|
+
|
717
|
+
<a name="Long"></a>
|
718
|
+
|
719
|
+
## Long
|
720
|
+
A 64 bit integer, represented by the js-bson Long type.
|
721
|
+
|
624
722
|
<a name="KMSProviders"></a>
|
625
723
|
|
626
724
|
## KMSProviders
|
@@ -771,3 +869,34 @@ Configuration options for making an Azure encryption key
|
|
771
869
|
| [err] | <code>Error</code> | If present, indicates an error that occurred in the process of encryption |
|
772
870
|
| [result] | <code>Buffer</code> | If present, is the encrypted result |
|
773
871
|
|
872
|
+
<a name="RangeOptions"></a>
|
873
|
+
|
874
|
+
## RangeOptions
|
875
|
+
**Properties**
|
876
|
+
|
877
|
+
| Name | Type | Description |
|
878
|
+
| --- | --- | --- |
|
879
|
+
| min | [<code>BSONValue</code>](#BSONValue) | is required if precision is set. |
|
880
|
+
| max | [<code>BSONValue</code>](#BSONValue) | is required if precision is set. |
|
881
|
+
| sparsity | <code>BSON.Long</code> | |
|
882
|
+
| precision | <code>number</code> \| <code>undefined</code> | (may only be set for double or decimal128). |
|
883
|
+
|
884
|
+
min, max, sparsity, and range must match the values set in the encryptedFields of the destination collection.
|
885
|
+
For double and decimal128, min/max/precision must all be set, or all be unset.
|
886
|
+
|
887
|
+
<a name="EncryptOptions"></a>
|
888
|
+
|
889
|
+
## EncryptOptions
|
890
|
+
**Properties**
|
891
|
+
|
892
|
+
| Name | Type | Description |
|
893
|
+
| --- | --- | --- |
|
894
|
+
| [keyId] | [<code>ClientEncryptionDataKeyId</code>](#ClientEncryptionDataKeyId) | The id of the Binary dataKey to use for encryption. |
|
895
|
+
| [keyAltName] | <code>string</code> | A unique string name corresponding to an already existing dataKey. |
|
896
|
+
| [algorithm] | <code>string</code> | The algorithm to use for encryption. Must be either `'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'`, `'AEAD_AES_256_CBC_HMAC_SHA_512-Random'`, `'Indexed'` or `'Unindexed'` |
|
897
|
+
| [contentionFactor] | <code>bigint</code> \| <code>number</code> | (experimental) - the contention factor. |
|
898
|
+
| queryType | <code>'equality'</code> \| <code>'rangePreview'</code> | (experimental) - the query type supported. |
|
899
|
+
| [rangeOptions] | [<code>RangeOptions</code>](#RangeOptions) | (experimental) The index options for a Queryable Encryption field supporting "rangePreview" queries. |
|
900
|
+
|
901
|
+
Options to provide when encrypting data.
|
902
|
+
|
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
+
set -o errexit
|
4
|
+
|
3
5
|
THIS_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
4
6
|
. "$THIS_DIR/../../../.evergreen/init.sh"
|
5
7
|
|
@@ -9,9 +11,6 @@ DEPS_PREFIX="$NODE_DIR/deps"
|
|
9
11
|
BUILD_DIR=$DEPS_PREFIX/tmp
|
10
12
|
: "${CMAKE_FLAGS:=}"
|
11
13
|
: "${WINDOWS_CMAKE_FLAGS:=}"
|
12
|
-
: "${NPM_OPTIONS:=}"
|
13
|
-
|
14
|
-
export NPM_OPTIONS="${NPM_OPTIONS}"
|
15
14
|
|
16
15
|
# build and install libmongocrypt
|
17
16
|
mkdir -p $BUILD_DIR/libmongocrypt-build
|
@@ -34,6 +33,4 @@ run_cmake --build . --target install --config RelWithDebInfo
|
|
34
33
|
popd #./
|
35
34
|
|
36
35
|
# build the `mongodb-client-encryption` addon
|
37
|
-
|
38
|
-
# when running as root. See https://github.com/npm/npm/issues/3497
|
39
|
-
BUILD_TYPE=static npm install --unsafe-perm --build-from-source ${NPM_OPTIONS}
|
36
|
+
env BUILD_TYPE=static npm install
|