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
@@ -65,8 +65,7 @@ ffi.cdef("""/*
|
|
65
65
|
* @param[out] len An optional length of the returned string. May be NULL.
|
66
66
|
* @returns a NULL terminated version string for libmongocrypt.
|
67
67
|
*/
|
68
|
-
const char *
|
69
|
-
mongocrypt_version (uint32_t *len);
|
68
|
+
const char *mongocrypt_version(uint32_t *len);
|
70
69
|
|
71
70
|
/**
|
72
71
|
* A non-owning view of a byte buffer.
|
@@ -99,8 +98,7 @@ typedef struct _mongocrypt_binary_t mongocrypt_binary_t;
|
|
99
98
|
*
|
100
99
|
* @returns A new mongocrypt_binary_t.
|
101
100
|
*/
|
102
|
-
mongocrypt_binary_t *
|
103
|
-
mongocrypt_binary_new (void);
|
101
|
+
mongocrypt_binary_t *mongocrypt_binary_new(void);
|
104
102
|
|
105
103
|
/**
|
106
104
|
* Create a new non-owning view of a buffer (data + length).
|
@@ -111,8 +109,7 @@ mongocrypt_binary_new (void);
|
|
111
109
|
*
|
112
110
|
* @returns A new @ref mongocrypt_binary_t.
|
113
111
|
*/
|
114
|
-
mongocrypt_binary_t *
|
115
|
-
mongocrypt_binary_new_from_data (uint8_t *data, uint32_t len);
|
112
|
+
mongocrypt_binary_t *mongocrypt_binary_new_from_data(uint8_t *data, uint32_t len);
|
116
113
|
|
117
114
|
/**
|
118
115
|
* Get a pointer to the viewed data.
|
@@ -121,8 +118,7 @@ mongocrypt_binary_new_from_data (uint8_t *data, uint32_t len);
|
|
121
118
|
*
|
122
119
|
* @returns A pointer to the viewed data.
|
123
120
|
*/
|
124
|
-
uint8_t *
|
125
|
-
mongocrypt_binary_data (const mongocrypt_binary_t *binary);
|
121
|
+
uint8_t *mongocrypt_binary_data(const mongocrypt_binary_t *binary);
|
126
122
|
|
127
123
|
/**
|
128
124
|
* Get the length of the viewed data.
|
@@ -131,8 +127,7 @@ mongocrypt_binary_data (const mongocrypt_binary_t *binary);
|
|
131
127
|
*
|
132
128
|
* @returns The length of the viewed data.
|
133
129
|
*/
|
134
|
-
uint32_t
|
135
|
-
mongocrypt_binary_len (const mongocrypt_binary_t *binary);
|
130
|
+
uint32_t mongocrypt_binary_len(const mongocrypt_binary_t *binary);
|
136
131
|
|
137
132
|
/**
|
138
133
|
* Free the @ref mongocrypt_binary_t.
|
@@ -141,8 +136,7 @@ mongocrypt_binary_len (const mongocrypt_binary_t *binary);
|
|
141
136
|
*
|
142
137
|
* @param[in] binary The mongocrypt_binary_t destroy.
|
143
138
|
*/
|
144
|
-
void
|
145
|
-
mongocrypt_binary_destroy (mongocrypt_binary_t *binary);
|
139
|
+
void mongocrypt_binary_destroy(mongocrypt_binary_t *binary);
|
146
140
|
|
147
141
|
/**
|
148
142
|
* Indicates success or contains error information.
|
@@ -158,10 +152,10 @@ typedef struct _mongocrypt_status_t mongocrypt_status_t;
|
|
158
152
|
* Indicates the type of error.
|
159
153
|
*/
|
160
154
|
typedef enum {
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
155
|
+
MONGOCRYPT_STATUS_OK = 0,
|
156
|
+
MONGOCRYPT_STATUS_ERROR_CLIENT = 1,
|
157
|
+
MONGOCRYPT_STATUS_ERROR_KMS = 2,
|
158
|
+
MONGOCRYPT_STATUS_ERROR_CRYPT_SHARED = 3,
|
165
159
|
} mongocrypt_status_type_t;
|
166
160
|
|
167
161
|
/**
|
@@ -173,8 +167,7 @@ typedef enum {
|
|
173
167
|
*
|
174
168
|
* @returns A new status object.
|
175
169
|
*/
|
176
|
-
mongocrypt_status_t *
|
177
|
-
mongocrypt_status_new (void);
|
170
|
+
mongocrypt_status_t *mongocrypt_status_new(void);
|
178
171
|
|
179
172
|
/**
|
180
173
|
* Set a status object with message, type, and code.
|
@@ -192,12 +185,11 @@ mongocrypt_status_new (void);
|
|
192
185
|
* to determine the string's length with strlen.
|
193
186
|
*
|
194
187
|
*/
|
195
|
-
void
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
int32_t message_len);
|
188
|
+
void mongocrypt_status_set(mongocrypt_status_t *status,
|
189
|
+
mongocrypt_status_type_t type,
|
190
|
+
uint32_t code,
|
191
|
+
const char *message,
|
192
|
+
int32_t message_len);
|
201
193
|
|
202
194
|
/**
|
203
195
|
* Indicates success or the type of error.
|
@@ -206,8 +198,7 @@ mongocrypt_status_set (mongocrypt_status_t *status,
|
|
206
198
|
*
|
207
199
|
* @returns A @ref mongocrypt_status_type_t.
|
208
200
|
*/
|
209
|
-
mongocrypt_status_type_t
|
210
|
-
mongocrypt_status_type (mongocrypt_status_t *status);
|
201
|
+
mongocrypt_status_type_t mongocrypt_status_type(mongocrypt_status_t *status);
|
211
202
|
|
212
203
|
/**
|
213
204
|
* Get an error code or 0.
|
@@ -216,8 +207,7 @@ mongocrypt_status_type (mongocrypt_status_t *status);
|
|
216
207
|
*
|
217
208
|
* @returns An error code.
|
218
209
|
*/
|
219
|
-
uint32_t
|
220
|
-
mongocrypt_status_code (mongocrypt_status_t *status);
|
210
|
+
uint32_t mongocrypt_status_code(mongocrypt_status_t *status);
|
221
211
|
|
222
212
|
/**
|
223
213
|
* Get the error message associated with a status or NULL.
|
@@ -228,8 +218,7 @@ mongocrypt_status_code (mongocrypt_status_t *status);
|
|
228
218
|
*
|
229
219
|
* @returns A NULL terminated error message or NULL.
|
230
220
|
*/
|
231
|
-
const char *
|
232
|
-
mongocrypt_status_message (mongocrypt_status_t *status, uint32_t *len);
|
221
|
+
const char *mongocrypt_status_message(mongocrypt_status_t *status, uint32_t *len);
|
233
222
|
|
234
223
|
/**
|
235
224
|
* Returns true if the status indicates success.
|
@@ -239,26 +228,24 @@ mongocrypt_status_message (mongocrypt_status_t *status, uint32_t *len);
|
|
239
228
|
* @returns A boolean indicating success. If false, an error status is set.
|
240
229
|
* Retrieve it with @ref mongocrypt_ctx_status
|
241
230
|
*/
|
242
|
-
bool
|
243
|
-
mongocrypt_status_ok (mongocrypt_status_t *status);
|
231
|
+
bool mongocrypt_status_ok(mongocrypt_status_t *status);
|
244
232
|
|
245
233
|
/**
|
246
234
|
* Free the memory for a status object.
|
247
235
|
*
|
248
236
|
* @param[in] status The status to destroy.
|
249
237
|
*/
|
250
|
-
void
|
251
|
-
mongocrypt_status_destroy (mongocrypt_status_t *status);
|
238
|
+
void mongocrypt_status_destroy(mongocrypt_status_t *status);
|
252
239
|
|
253
240
|
/**
|
254
241
|
* Indicates the type of log message.
|
255
242
|
*/
|
256
243
|
typedef enum {
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
244
|
+
MONGOCRYPT_LOG_LEVEL_FATAL = 0,
|
245
|
+
MONGOCRYPT_LOG_LEVEL_ERROR = 1,
|
246
|
+
MONGOCRYPT_LOG_LEVEL_WARNING = 2,
|
247
|
+
MONGOCRYPT_LOG_LEVEL_INFO = 3,
|
248
|
+
MONGOCRYPT_LOG_LEVEL_TRACE = 4
|
262
249
|
} mongocrypt_log_level_t;
|
263
250
|
|
264
251
|
/**
|
@@ -270,10 +257,7 @@ typedef enum {
|
|
270
257
|
* @param[in] ctx A context provided by the caller of @ref
|
271
258
|
* mongocrypt_setopt_log_handler.
|
272
259
|
*/
|
273
|
-
typedef void (*mongocrypt_log_fn_t)
|
274
|
-
const char *message,
|
275
|
-
uint32_t message_len,
|
276
|
-
void *ctx);
|
260
|
+
typedef void (*mongocrypt_log_fn_t)(mongocrypt_log_level_t level, const char *message, uint32_t message_len, void *ctx);
|
277
261
|
|
278
262
|
/**
|
279
263
|
* The top-level handle to libmongocrypt.
|
@@ -298,8 +282,7 @@ typedef struct _mongocrypt_t mongocrypt_t;
|
|
298
282
|
*
|
299
283
|
* @returns A new @ref mongocrypt_t object.
|
300
284
|
*/
|
301
|
-
mongocrypt_t *
|
302
|
-
mongocrypt_new (void);
|
285
|
+
mongocrypt_t *mongocrypt_new(void);
|
303
286
|
|
304
287
|
/**
|
305
288
|
* Set a handler on the @ref mongocrypt_t object to get called on every log
|
@@ -313,10 +296,7 @@ mongocrypt_new (void);
|
|
313
296
|
* @returns A boolean indicating success. If false, an error status is set.
|
314
297
|
* Retrieve it with @ref mongocrypt_ctx_status
|
315
298
|
*/
|
316
|
-
bool
|
317
|
-
mongocrypt_setopt_log_handler (mongocrypt_t *crypt,
|
318
|
-
mongocrypt_log_fn_t log_fn,
|
319
|
-
void *log_ctx);
|
299
|
+
bool mongocrypt_setopt_log_handler(mongocrypt_t *crypt, mongocrypt_log_fn_t log_fn, void *log_ctx);
|
320
300
|
|
321
301
|
/**
|
322
302
|
* Configure an AWS KMS provider on the @ref mongocrypt_t object.
|
@@ -339,12 +319,11 @@ mongocrypt_setopt_log_handler (mongocrypt_t *crypt,
|
|
339
319
|
* @returns A boolean indicating success. If false, an error status is set.
|
340
320
|
* Retrieve it with @ref mongocrypt_ctx_status
|
341
321
|
*/
|
342
|
-
bool
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
int32_t aws_secret_access_key_len);
|
322
|
+
bool mongocrypt_setopt_kms_provider_aws(mongocrypt_t *crypt,
|
323
|
+
const char *aws_access_key_id,
|
324
|
+
int32_t aws_access_key_id_len,
|
325
|
+
const char *aws_secret_access_key,
|
326
|
+
int32_t aws_secret_access_key_len);
|
348
327
|
|
349
328
|
/**
|
350
329
|
* Configure a local KMS provider on the @ref mongocrypt_t object.
|
@@ -360,9 +339,7 @@ mongocrypt_setopt_kms_provider_aws (mongocrypt_t *crypt,
|
|
360
339
|
* @returns A boolean indicating success. If false, an error status is set.
|
361
340
|
* Retrieve it with @ref mongocrypt_ctx_status
|
362
341
|
*/
|
363
|
-
bool
|
364
|
-
mongocrypt_setopt_kms_provider_local (mongocrypt_t *crypt,
|
365
|
-
mongocrypt_binary_t *key);
|
342
|
+
bool mongocrypt_setopt_kms_provider_local(mongocrypt_t *crypt, mongocrypt_binary_t *key);
|
366
343
|
|
367
344
|
/**
|
368
345
|
* Configure KMS providers with a BSON document.
|
@@ -375,9 +352,7 @@ mongocrypt_setopt_kms_provider_local (mongocrypt_t *crypt,
|
|
375
352
|
* @returns A boolean indicating success. If false, an error status is set.
|
376
353
|
* Retrieve it with @ref mongocrypt_ctx_status
|
377
354
|
*/
|
378
|
-
bool
|
379
|
-
mongocrypt_setopt_kms_providers (mongocrypt_t *crypt,
|
380
|
-
mongocrypt_binary_t *kms_providers);
|
355
|
+
bool mongocrypt_setopt_kms_providers(mongocrypt_t *crypt, mongocrypt_binary_t *kms_providers);
|
381
356
|
|
382
357
|
/**
|
383
358
|
* Set a local schema map for encryption.
|
@@ -391,9 +366,7 @@ mongocrypt_setopt_kms_providers (mongocrypt_t *crypt,
|
|
391
366
|
* @returns A boolean indicating success. If false, an error status is set.
|
392
367
|
* Retrieve it with @ref mongocrypt_status
|
393
368
|
*/
|
394
|
-
bool
|
395
|
-
mongocrypt_setopt_schema_map (mongocrypt_t *crypt,
|
396
|
-
mongocrypt_binary_t *schema_map);
|
369
|
+
bool mongocrypt_setopt_schema_map(mongocrypt_t *crypt, mongocrypt_binary_t *schema_map);
|
397
370
|
|
398
371
|
/**
|
399
372
|
* Set a local EncryptedFieldConfigMap for encryption.
|
@@ -407,9 +380,7 @@ mongocrypt_setopt_schema_map (mongocrypt_t *crypt,
|
|
407
380
|
* @returns A boolean indicating success. If false, an error status is set.
|
408
381
|
* Retrieve it with @ref mongocrypt_status
|
409
382
|
*/
|
410
|
-
bool
|
411
|
-
mongocrypt_setopt_encrypted_field_config_map (mongocrypt_t *crypt,
|
412
|
-
mongocrypt_binary_t *efc_map);
|
383
|
+
bool mongocrypt_setopt_encrypted_field_config_map(mongocrypt_t *crypt, mongocrypt_binary_t *efc_map);
|
413
384
|
|
414
385
|
/**
|
415
386
|
* @brief Append an additional search directory to the search path for loading
|
@@ -439,9 +410,7 @@ mongocrypt_setopt_encrypted_field_config_map (mongocrypt_t *crypt,
|
|
439
410
|
* @ref mongocrypt_setopt_set_crypt_shared_lib_path_override, then paths
|
440
411
|
* appended here will have no effect.
|
441
412
|
*/
|
442
|
-
void
|
443
|
-
mongocrypt_setopt_append_crypt_shared_lib_search_path (mongocrypt_t *crypt,
|
444
|
-
const char *path);
|
413
|
+
void mongocrypt_setopt_append_crypt_shared_lib_search_path(mongocrypt_t *crypt, const char *path);
|
445
414
|
|
446
415
|
/**
|
447
416
|
* @brief Set a single override path for loading the crypt_shared dynamic
|
@@ -466,9 +435,7 @@ mongocrypt_setopt_append_crypt_shared_lib_search_path (mongocrypt_t *crypt,
|
|
466
435
|
* initialize a valid crypt_shared library instance for the path specified, then
|
467
436
|
* the initialization of mongocrypt_t will fail with an error.
|
468
437
|
*/
|
469
|
-
void
|
470
|
-
mongocrypt_setopt_set_crypt_shared_lib_path_override (mongocrypt_t *crypt,
|
471
|
-
const char *path);
|
438
|
+
void mongocrypt_setopt_set_crypt_shared_lib_path_override(mongocrypt_t *crypt, const char *path);
|
472
439
|
|
473
440
|
/**
|
474
441
|
* @brief Opt-into handling the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state.
|
@@ -484,8 +451,7 @@ mongocrypt_setopt_set_crypt_shared_lib_path_override (mongocrypt_t *crypt,
|
|
484
451
|
*
|
485
452
|
* @param[in] crypt The @ref mongocrypt_t object to update
|
486
453
|
*/
|
487
|
-
void
|
488
|
-
mongocrypt_setopt_use_need_kms_credentials_state (mongocrypt_t *crypt);
|
454
|
+
void mongocrypt_setopt_use_need_kms_credentials_state(mongocrypt_t *crypt);
|
489
455
|
|
490
456
|
/**
|
491
457
|
* Initialize new @ref mongocrypt_t object.
|
@@ -500,8 +466,7 @@ mongocrypt_setopt_use_need_kms_credentials_state (mongocrypt_t *crypt);
|
|
500
466
|
* set
|
501
467
|
* options are invalid.
|
502
468
|
*/
|
503
|
-
bool
|
504
|
-
mongocrypt_init (mongocrypt_t *crypt);
|
469
|
+
bool mongocrypt_init(mongocrypt_t *crypt);
|
505
470
|
|
506
471
|
/**
|
507
472
|
* Get the status associated with a @ref mongocrypt_t object.
|
@@ -512,16 +477,14 @@ mongocrypt_init (mongocrypt_t *crypt);
|
|
512
477
|
* @returns A boolean indicating success. If false, an error status is set.
|
513
478
|
* Retrieve it with @ref mongocrypt_ctx_status
|
514
479
|
*/
|
515
|
-
bool
|
516
|
-
mongocrypt_status (mongocrypt_t *crypt, mongocrypt_status_t *status);
|
480
|
+
bool mongocrypt_status(mongocrypt_t *crypt, mongocrypt_status_t *status);
|
517
481
|
|
518
482
|
/**
|
519
483
|
* Destroy the @ref mongocrypt_t object.
|
520
484
|
*
|
521
485
|
* @param[in] crypt The @ref mongocrypt_t object to destroy.
|
522
486
|
*/
|
523
|
-
void
|
524
|
-
mongocrypt_destroy (mongocrypt_t *crypt);
|
487
|
+
void mongocrypt_destroy(mongocrypt_t *crypt);
|
525
488
|
|
526
489
|
/**
|
527
490
|
* Obtain a nul-terminated version string of the loaded crypt_shared dynamic
|
@@ -541,9 +504,7 @@ mongocrypt_destroy (mongocrypt_t *crypt);
|
|
541
504
|
* @note For a numeric value that can be compared against, use
|
542
505
|
* @ref mongocrypt_crypt_shared_lib_version.
|
543
506
|
*/
|
544
|
-
const char *
|
545
|
-
mongocrypt_crypt_shared_lib_version_string (const mongocrypt_t *crypt,
|
546
|
-
uint32_t *len);
|
507
|
+
const char *mongocrypt_crypt_shared_lib_version_string(const mongocrypt_t *crypt, uint32_t *len);
|
547
508
|
|
548
509
|
/**
|
549
510
|
* @brief Obtain a 64-bit constant encoding the version of the loaded
|
@@ -564,8 +525,7 @@ mongocrypt_crypt_shared_lib_version_string (const mongocrypt_t *crypt,
|
|
564
525
|
*
|
565
526
|
* For example, version 6.2.1 would be encoded as: 0x0006'0002'0001'0000
|
566
527
|
*/
|
567
|
-
uint64_t
|
568
|
-
mongocrypt_crypt_shared_lib_version (const mongocrypt_t *crypt);
|
528
|
+
uint64_t mongocrypt_crypt_shared_lib_version(const mongocrypt_t *crypt);
|
569
529
|
|
570
530
|
/**
|
571
531
|
* Manages the state machine for encryption or decryption.
|
@@ -581,8 +541,7 @@ typedef struct _mongocrypt_ctx_t mongocrypt_ctx_t;
|
|
581
541
|
* @param[in] crypt The @ref mongocrypt_t object.
|
582
542
|
* @returns A new context.
|
583
543
|
*/
|
584
|
-
mongocrypt_ctx_t *
|
585
|
-
mongocrypt_ctx_new (mongocrypt_t *crypt);
|
544
|
+
mongocrypt_ctx_t *mongocrypt_ctx_new(mongocrypt_t *crypt);
|
586
545
|
|
587
546
|
/**
|
588
547
|
* Get the status associated with a @ref mongocrypt_ctx_t object.
|
@@ -595,8 +554,7 @@ mongocrypt_ctx_new (mongocrypt_t *crypt);
|
|
595
554
|
*
|
596
555
|
* @see mongocrypt_status_ok
|
597
556
|
*/
|
598
|
-
bool
|
599
|
-
mongocrypt_ctx_status (mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
|
557
|
+
bool mongocrypt_ctx_status(mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
|
600
558
|
|
601
559
|
/**
|
602
560
|
* Set the key id to use for explicit encryption.
|
@@ -612,9 +570,7 @@ mongocrypt_ctx_status (mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
|
|
612
570
|
* @returns A boolean indicating success. If false, an error status is set.
|
613
571
|
* Retrieve it with @ref mongocrypt_ctx_status
|
614
572
|
*/
|
615
|
-
bool
|
616
|
-
mongocrypt_ctx_setopt_key_id (mongocrypt_ctx_t *ctx,
|
617
|
-
mongocrypt_binary_t *key_id);
|
573
|
+
bool mongocrypt_ctx_setopt_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id);
|
618
574
|
|
619
575
|
/**
|
620
576
|
* Set the keyAltName to use for explicit encryption or
|
@@ -638,9 +594,7 @@ mongocrypt_ctx_setopt_key_id (mongocrypt_ctx_t *ctx,
|
|
638
594
|
* @returns A boolean indicating success. If false, an error status is set.
|
639
595
|
* Retrieve it with @ref mongocrypt_ctx_status
|
640
596
|
*/
|
641
|
-
bool
|
642
|
-
mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
|
643
|
-
mongocrypt_binary_t *key_alt_name);
|
597
|
+
bool mongocrypt_ctx_setopt_key_alt_name(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_alt_name);
|
644
598
|
|
645
599
|
/**
|
646
600
|
* Set the keyMaterial to use for encrypting data.
|
@@ -657,9 +611,7 @@ mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
|
|
657
611
|
* @returns A boolean indicating success. If false, an error status is set.
|
658
612
|
* Retrieve it with @ref mongocrypt_ctx_status
|
659
613
|
*/
|
660
|
-
bool
|
661
|
-
mongocrypt_ctx_setopt_key_material (mongocrypt_ctx_t *ctx,
|
662
|
-
mongocrypt_binary_t *key_material);
|
614
|
+
bool mongocrypt_ctx_setopt_key_material(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_material);
|
663
615
|
|
664
616
|
/**
|
665
617
|
* Set the algorithm used for encryption to either
|
@@ -681,10 +633,7 @@ mongocrypt_ctx_setopt_key_material (mongocrypt_ctx_t *ctx,
|
|
681
633
|
* @returns A boolean indicating success. If false, an error status is set.
|
682
634
|
* Retrieve it with @ref mongocrypt_ctx_status
|
683
635
|
*/
|
684
|
-
bool
|
685
|
-
mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
|
686
|
-
const char *algorithm,
|
687
|
-
int len);
|
636
|
+
bool mongocrypt_ctx_setopt_algorithm(mongocrypt_ctx_t *ctx, const char *algorithm, int len);
|
688
637
|
|
689
638
|
/// String constant for setopt_algorithm "Deterministic" encryption
|
690
639
|
/// String constant for setopt_algorithm "Random" encryption
|
@@ -712,12 +661,11 @@ mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
|
|
712
661
|
* @returns A boolean indicating success. If false, an error status is set.
|
713
662
|
* Retrieve it with @ref mongocrypt_ctx_status
|
714
663
|
*/
|
715
|
-
bool
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
int32_t cmk_len);
|
664
|
+
bool mongocrypt_ctx_setopt_masterkey_aws(mongocrypt_ctx_t *ctx,
|
665
|
+
const char *region,
|
666
|
+
int32_t region_len,
|
667
|
+
const char *cmk,
|
668
|
+
int32_t cmk_len);
|
721
669
|
|
722
670
|
/**
|
723
671
|
* Identify a custom AWS endpoint when creating a data key.
|
@@ -736,10 +684,7 @@ mongocrypt_ctx_setopt_masterkey_aws (mongocrypt_ctx_t *ctx,
|
|
736
684
|
* @returns A boolean indicating success. If false, an error status is set.
|
737
685
|
* Retrieve it with @ref mongocrypt_ctx_status
|
738
686
|
*/
|
739
|
-
bool
|
740
|
-
mongocrypt_ctx_setopt_masterkey_aws_endpoint (mongocrypt_ctx_t *ctx,
|
741
|
-
const char *endpoint,
|
742
|
-
int32_t endpoint_len);
|
687
|
+
bool mongocrypt_ctx_setopt_masterkey_aws_endpoint(mongocrypt_ctx_t *ctx, const char *endpoint, int32_t endpoint_len);
|
743
688
|
|
744
689
|
/**
|
745
690
|
* Set the master key to "local" for creating a data key.
|
@@ -751,8 +696,7 @@ mongocrypt_ctx_setopt_masterkey_aws_endpoint (mongocrypt_ctx_t *ctx,
|
|
751
696
|
* @returns A boolean indicating success. If false, an error status is set.
|
752
697
|
* Retrieve it with @ref mongocrypt_ctx_status
|
753
698
|
*/
|
754
|
-
bool
|
755
|
-
mongocrypt_ctx_setopt_masterkey_local (mongocrypt_ctx_t *ctx);
|
699
|
+
bool mongocrypt_ctx_setopt_masterkey_local(mongocrypt_ctx_t *ctx);
|
756
700
|
|
757
701
|
/**
|
758
702
|
* Set key encryption key document for creating a data key or for rewrapping
|
@@ -805,9 +749,7 @@ mongocrypt_ctx_setopt_masterkey_local (mongocrypt_ctx_t *ctx);
|
|
805
749
|
* @returns A boolean indicating success. If false, an error status is set.
|
806
750
|
* Retrieve it with @ref mongocrypt_ctx_status.
|
807
751
|
*/
|
808
|
-
bool
|
809
|
-
mongocrypt_ctx_setopt_key_encryption_key (mongocrypt_ctx_t *ctx,
|
810
|
-
mongocrypt_binary_t *bin);
|
752
|
+
bool mongocrypt_ctx_setopt_key_encryption_key(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *bin);
|
811
753
|
|
812
754
|
/**
|
813
755
|
* Initialize a context to create a data key.
|
@@ -823,8 +765,7 @@ mongocrypt_ctx_setopt_key_encryption_key (mongocrypt_ctx_t *ctx,
|
|
823
765
|
* @pre A master key option has been set, and an associated KMS provider
|
824
766
|
* has been set on the parent @ref mongocrypt_t.
|
825
767
|
*/
|
826
|
-
bool
|
827
|
-
mongocrypt_ctx_datakey_init (mongocrypt_ctx_t *ctx);
|
768
|
+
bool mongocrypt_ctx_datakey_init(mongocrypt_ctx_t *ctx);
|
828
769
|
|
829
770
|
/**
|
830
771
|
* Initialize a context for encryption.
|
@@ -840,11 +781,7 @@ mongocrypt_ctx_datakey_init (mongocrypt_ctx_t *ctx);
|
|
840
781
|
* @returns A boolean indicating success. If false, an error status is set.
|
841
782
|
* Retrieve it with @ref mongocrypt_ctx_status
|
842
783
|
*/
|
843
|
-
bool
|
844
|
-
mongocrypt_ctx_encrypt_init (mongocrypt_ctx_t *ctx,
|
845
|
-
const char *db,
|
846
|
-
int32_t db_len,
|
847
|
-
mongocrypt_binary_t *cmd);
|
784
|
+
bool mongocrypt_ctx_encrypt_init(mongocrypt_ctx_t *ctx, const char *db, int32_t db_len, mongocrypt_binary_t *cmd);
|
848
785
|
|
849
786
|
/**
|
850
787
|
* Explicit helper method to encrypt a single BSON object. Contexts
|
@@ -881,9 +818,7 @@ mongocrypt_ctx_encrypt_init (mongocrypt_ctx_t *ctx,
|
|
881
818
|
* @returns A boolean indicating success. If false, an error status is set.
|
882
819
|
* Retrieve it with @ref mongocrypt_ctx_status
|
883
820
|
*/
|
884
|
-
bool
|
885
|
-
mongocrypt_ctx_explicit_encrypt_init (mongocrypt_ctx_t *ctx,
|
886
|
-
mongocrypt_binary_t *msg);
|
821
|
+
bool mongocrypt_ctx_explicit_encrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
|
887
822
|
|
888
823
|
/**
|
889
824
|
* Explicit helper method to encrypt a Match Expression or Aggregate Expression.
|
@@ -929,9 +864,7 @@ mongocrypt_ctx_explicit_encrypt_init (mongocrypt_ctx_t *ctx,
|
|
929
864
|
* @returns A boolean indicating success. If false, an error status is set.
|
930
865
|
* Retrieve it with @ref mongocrypt_ctx_status
|
931
866
|
*/
|
932
|
-
bool
|
933
|
-
mongocrypt_ctx_explicit_encrypt_expression_init (mongocrypt_ctx_t *ctx,
|
934
|
-
mongocrypt_binary_t *msg);
|
867
|
+
bool mongocrypt_ctx_explicit_encrypt_expression_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
|
935
868
|
|
936
869
|
/**
|
937
870
|
* Initialize a context for decryption.
|
@@ -946,8 +879,7 @@ mongocrypt_ctx_explicit_encrypt_expression_init (mongocrypt_ctx_t *ctx,
|
|
946
879
|
* @returns A boolean indicating success. If false, an error status is set.
|
947
880
|
* Retrieve it with @ref mongocrypt_ctx_status
|
948
881
|
*/
|
949
|
-
bool
|
950
|
-
mongocrypt_ctx_decrypt_init (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
|
882
|
+
bool mongocrypt_ctx_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
|
951
883
|
|
952
884
|
/**
|
953
885
|
* Explicit helper method to decrypt a single BSON object.
|
@@ -962,9 +894,7 @@ mongocrypt_ctx_decrypt_init (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
|
|
962
894
|
* is copied. It is valid to destroy @p msg with @ref mongocrypt_binary_destroy
|
963
895
|
* immediately after.
|
964
896
|
*/
|
965
|
-
bool
|
966
|
-
mongocrypt_ctx_explicit_decrypt_init (mongocrypt_ctx_t *ctx,
|
967
|
-
mongocrypt_binary_t *msg);
|
897
|
+
bool mongocrypt_ctx_explicit_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
|
968
898
|
|
969
899
|
/**
|
970
900
|
* @brief Initialize a context to rewrap datakeys.
|
@@ -978,9 +908,7 @@ mongocrypt_ctx_explicit_decrypt_init (mongocrypt_ctx_t *ctx,
|
|
978
908
|
* @return A boolean indicating success. If false, an error status is set.
|
979
909
|
* Retrieve it with @ref mongocrypt_ctx_status.
|
980
910
|
*/
|
981
|
-
bool
|
982
|
-
mongocrypt_ctx_rewrap_many_datakey_init (mongocrypt_ctx_t *ctx,
|
983
|
-
mongocrypt_binary_t *filter);
|
911
|
+
bool mongocrypt_ctx_rewrap_many_datakey_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *filter);
|
984
912
|
|
985
913
|
/**
|
986
914
|
* Indicates the state of the @ref mongocrypt_ctx_t. Each state requires
|
@@ -989,14 +917,14 @@ mongocrypt_ctx_rewrap_many_datakey_init (mongocrypt_ctx_t *ctx,
|
|
989
917
|
* for information on what to do for each state.
|
990
918
|
*/
|
991
919
|
typedef enum {
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
920
|
+
MONGOCRYPT_CTX_ERROR = 0,
|
921
|
+
MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1, /* run on main MongoClient */
|
922
|
+
MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2, /* run on mongocryptd. */
|
923
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3, /* run on key vault */
|
924
|
+
MONGOCRYPT_CTX_NEED_KMS = 4,
|
925
|
+
MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7, /* fetch/renew KMS credentials */
|
926
|
+
MONGOCRYPT_CTX_READY = 5, /* ready for encryption/decryption */
|
927
|
+
MONGOCRYPT_CTX_DONE = 6,
|
1000
928
|
} mongocrypt_ctx_state_t;
|
1001
929
|
|
1002
930
|
/**
|
@@ -1005,8 +933,7 @@ typedef enum {
|
|
1005
933
|
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1006
934
|
* @returns A @ref mongocrypt_ctx_state_t.
|
1007
935
|
*/
|
1008
|
-
mongocrypt_ctx_state_t
|
1009
|
-
mongocrypt_ctx_state (mongocrypt_ctx_t *ctx);
|
936
|
+
mongocrypt_ctx_state_t mongocrypt_ctx_state(mongocrypt_ctx_t *ctx);
|
1010
937
|
|
1011
938
|
/**
|
1012
939
|
* Get BSON necessary to run the mongo operation when mongocrypt_ctx_t
|
@@ -1028,8 +955,7 @@ mongocrypt_ctx_state (mongocrypt_ctx_t *ctx);
|
|
1028
955
|
* @returns A boolean indicating success. If false, an error status is set.
|
1029
956
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1030
957
|
*/
|
1031
|
-
bool
|
1032
|
-
mongocrypt_ctx_mongo_op (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
|
958
|
+
bool mongocrypt_ctx_mongo_op(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
|
1033
959
|
|
1034
960
|
/**
|
1035
961
|
* Feed a BSON reply or result when mongocrypt_ctx_t is in
|
@@ -1053,8 +979,7 @@ mongocrypt_ctx_mongo_op (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
|
|
1053
979
|
* @returns A boolean indicating success. If false, an error status is set.
|
1054
980
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1055
981
|
*/
|
1056
|
-
bool
|
1057
|
-
mongocrypt_ctx_mongo_feed (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
|
982
|
+
bool mongocrypt_ctx_mongo_feed(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
|
1058
983
|
|
1059
984
|
/**
|
1060
985
|
* Call when done feeding the reply (or replies) back to the context.
|
@@ -1063,8 +988,7 @@ mongocrypt_ctx_mongo_feed (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
|
|
1063
988
|
* @returns A boolean indicating success. If false, an error status is set.
|
1064
989
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1065
990
|
*/
|
1066
|
-
bool
|
1067
|
-
mongocrypt_ctx_mongo_done (mongocrypt_ctx_t *ctx);
|
991
|
+
bool mongocrypt_ctx_mongo_done(mongocrypt_ctx_t *ctx);
|
1068
992
|
|
1069
993
|
/**
|
1070
994
|
* Manages a single KMS HTTP request/response.
|
@@ -1084,8 +1008,7 @@ typedef struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t;
|
|
1084
1008
|
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1085
1009
|
* @returns a new @ref mongocrypt_kms_ctx_t or NULL.
|
1086
1010
|
*/
|
1087
|
-
mongocrypt_kms_ctx_t *
|
1088
|
-
mongocrypt_ctx_next_kms_ctx (mongocrypt_ctx_t *ctx);
|
1011
|
+
mongocrypt_kms_ctx_t *mongocrypt_ctx_next_kms_ctx(mongocrypt_ctx_t *ctx);
|
1089
1012
|
|
1090
1013
|
/**
|
1091
1014
|
* Get the HTTP request message for a KMS handle.
|
@@ -1100,9 +1023,7 @@ mongocrypt_ctx_next_kms_ctx (mongocrypt_ctx_t *ctx);
|
|
1100
1023
|
* @returns A boolean indicating success. If false, an error status is set.
|
1101
1024
|
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1102
1025
|
*/
|
1103
|
-
bool
|
1104
|
-
mongocrypt_kms_ctx_message (mongocrypt_kms_ctx_t *kms,
|
1105
|
-
mongocrypt_binary_t *msg);
|
1026
|
+
bool mongocrypt_kms_ctx_message(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *msg);
|
1106
1027
|
|
1107
1028
|
/**
|
1108
1029
|
* Get the hostname from which to connect over TLS.
|
@@ -1118,8 +1039,7 @@ mongocrypt_kms_ctx_message (mongocrypt_kms_ctx_t *kms,
|
|
1118
1039
|
* @returns A boolean indicating success. If false, an error status is set.
|
1119
1040
|
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1120
1041
|
*/
|
1121
|
-
bool
|
1122
|
-
mongocrypt_kms_ctx_endpoint (mongocrypt_kms_ctx_t *kms, const char **endpoint);
|
1042
|
+
bool mongocrypt_kms_ctx_endpoint(mongocrypt_kms_ctx_t *kms, const char **endpoint);
|
1123
1043
|
|
1124
1044
|
/**
|
1125
1045
|
* Indicates how many bytes to feed into @ref mongocrypt_kms_ctx_feed.
|
@@ -1127,8 +1047,7 @@ mongocrypt_kms_ctx_endpoint (mongocrypt_kms_ctx_t *kms, const char **endpoint);
|
|
1127
1047
|
* @param[in] kms The @ref mongocrypt_kms_ctx_t.
|
1128
1048
|
* @returns The number of requested bytes.
|
1129
1049
|
*/
|
1130
|
-
uint32_t
|
1131
|
-
mongocrypt_kms_ctx_bytes_needed (mongocrypt_kms_ctx_t *kms);
|
1050
|
+
uint32_t mongocrypt_kms_ctx_bytes_needed(mongocrypt_kms_ctx_t *kms);
|
1132
1051
|
|
1133
1052
|
/**
|
1134
1053
|
* Feed bytes from the HTTP response.
|
@@ -1142,8 +1061,7 @@ mongocrypt_kms_ctx_bytes_needed (mongocrypt_kms_ctx_t *kms);
|
|
1142
1061
|
* @returns A boolean indicating success. If false, an error status is set.
|
1143
1062
|
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1144
1063
|
*/
|
1145
|
-
bool
|
1146
|
-
mongocrypt_kms_ctx_feed (mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
|
1064
|
+
bool mongocrypt_kms_ctx_feed(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
|
1147
1065
|
|
1148
1066
|
/**
|
1149
1067
|
* Get the status associated with a @ref mongocrypt_kms_ctx_t object.
|
@@ -1153,9 +1071,7 @@ mongocrypt_kms_ctx_feed (mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
|
|
1153
1071
|
*
|
1154
1072
|
* @returns A boolean indicating success. If false, an error status is set.
|
1155
1073
|
*/
|
1156
|
-
bool
|
1157
|
-
mongocrypt_kms_ctx_status (mongocrypt_kms_ctx_t *kms,
|
1158
|
-
mongocrypt_status_t *status);
|
1074
|
+
bool mongocrypt_kms_ctx_status(mongocrypt_kms_ctx_t *kms, mongocrypt_status_t *status);
|
1159
1075
|
|
1160
1076
|
/**
|
1161
1077
|
* Get the KMS provider identifier associated with this KMS request.
|
@@ -1172,8 +1088,7 @@ mongocrypt_kms_ctx_status (mongocrypt_kms_ctx_t *kms,
|
|
1172
1088
|
* @returns One of the NULL terminated static strings: "aws", "azure", "gcp", or
|
1173
1089
|
* "kmip".
|
1174
1090
|
*/
|
1175
|
-
const char *
|
1176
|
-
mongocrypt_kms_ctx_get_kms_provider (mongocrypt_kms_ctx_t *kms, uint32_t *len);
|
1091
|
+
const char *mongocrypt_kms_ctx_get_kms_provider(mongocrypt_kms_ctx_t *kms, uint32_t *len);
|
1177
1092
|
|
1178
1093
|
/**
|
1179
1094
|
* Call when done handling all KMS contexts.
|
@@ -1183,8 +1098,7 @@ mongocrypt_kms_ctx_get_kms_provider (mongocrypt_kms_ctx_t *kms, uint32_t *len);
|
|
1183
1098
|
* @returns A boolean indicating success. If false, an error status is set.
|
1184
1099
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1185
1100
|
*/
|
1186
|
-
bool
|
1187
|
-
mongocrypt_ctx_kms_done (mongocrypt_ctx_t *ctx);
|
1101
|
+
bool mongocrypt_ctx_kms_done(mongocrypt_ctx_t *ctx);
|
1188
1102
|
|
1189
1103
|
/**
|
1190
1104
|
* Call in response to the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state
|
@@ -1200,9 +1114,7 @@ mongocrypt_ctx_kms_done (mongocrypt_ctx_t *ctx);
|
|
1200
1114
|
* @returns A boolean indicating success. If false, an error status is set.
|
1201
1115
|
* Retrieve it with @ref mongocrypt_ctx_status.
|
1202
1116
|
*/
|
1203
|
-
bool
|
1204
|
-
mongocrypt_ctx_provide_kms_providers (
|
1205
|
-
mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition);
|
1117
|
+
bool mongocrypt_ctx_provide_kms_providers(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition);
|
1206
1118
|
|
1207
1119
|
/**
|
1208
1120
|
* Perform the final encryption or decryption.
|
@@ -1240,16 +1152,14 @@ mongocrypt_ctx_provide_kms_providers (
|
|
1240
1152
|
* @returns a bool indicating success. If false, an error status is set.
|
1241
1153
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1242
1154
|
*/
|
1243
|
-
bool
|
1244
|
-
mongocrypt_ctx_finalize (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
|
1155
|
+
bool mongocrypt_ctx_finalize(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
|
1245
1156
|
|
1246
1157
|
/**
|
1247
1158
|
* Destroy and free all memory associated with a @ref mongocrypt_ctx_t.
|
1248
1159
|
*
|
1249
1160
|
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1250
1161
|
*/
|
1251
|
-
void
|
1252
|
-
mongocrypt_ctx_destroy (mongocrypt_ctx_t *ctx);
|
1162
|
+
void mongocrypt_ctx_destroy(mongocrypt_ctx_t *ctx);
|
1253
1163
|
|
1254
1164
|
/**
|
1255
1165
|
* An crypto AES-256-CBC encrypt or decrypt function.
|
@@ -1268,13 +1178,13 @@ mongocrypt_ctx_destroy (mongocrypt_ctx_t *ctx);
|
|
1268
1178
|
* @returns A boolean indicating success. If returning false, set @p status
|
1269
1179
|
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1270
1180
|
*/
|
1271
|
-
typedef bool (*mongocrypt_crypto_fn)
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1181
|
+
typedef bool (*mongocrypt_crypto_fn)(void *ctx,
|
1182
|
+
mongocrypt_binary_t *key,
|
1183
|
+
mongocrypt_binary_t *iv,
|
1184
|
+
mongocrypt_binary_t *in,
|
1185
|
+
mongocrypt_binary_t *out,
|
1186
|
+
uint32_t *bytes_written,
|
1187
|
+
mongocrypt_status_t *status);
|
1278
1188
|
|
1279
1189
|
/**
|
1280
1190
|
* A crypto signature or HMAC function.
|
@@ -1293,11 +1203,11 @@ typedef bool (*mongocrypt_crypto_fn) (void *ctx,
|
|
1293
1203
|
* @returns A boolean indicating success. If returning false, set @p status
|
1294
1204
|
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1295
1205
|
*/
|
1296
|
-
typedef bool (*mongocrypt_hmac_fn)
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1206
|
+
typedef bool (*mongocrypt_hmac_fn)(void *ctx,
|
1207
|
+
mongocrypt_binary_t *key,
|
1208
|
+
mongocrypt_binary_t *in,
|
1209
|
+
mongocrypt_binary_t *out,
|
1210
|
+
mongocrypt_status_t *status);
|
1301
1211
|
|
1302
1212
|
/**
|
1303
1213
|
* A crypto hash (SHA-256) function.
|
@@ -1312,10 +1222,10 @@ typedef bool (*mongocrypt_hmac_fn) (void *ctx,
|
|
1312
1222
|
* @returns A boolean indicating success. If returning false, set @p status
|
1313
1223
|
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1314
1224
|
*/
|
1315
|
-
typedef bool (*mongocrypt_hash_fn)
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1225
|
+
typedef bool (*mongocrypt_hash_fn)(void *ctx,
|
1226
|
+
mongocrypt_binary_t *in,
|
1227
|
+
mongocrypt_binary_t *out,
|
1228
|
+
mongocrypt_status_t *status);
|
1319
1229
|
|
1320
1230
|
/**
|
1321
1231
|
* A crypto secure random function.
|
@@ -1330,20 +1240,16 @@ typedef bool (*mongocrypt_hash_fn) (void *ctx,
|
|
1330
1240
|
* @returns A boolean indicating success. If returning false, set @p status
|
1331
1241
|
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1332
1242
|
*/
|
1333
|
-
typedef bool (*mongocrypt_random_fn)
|
1334
|
-
mongocrypt_binary_t *out,
|
1335
|
-
uint32_t count,
|
1336
|
-
mongocrypt_status_t *status);
|
1243
|
+
typedef bool (*mongocrypt_random_fn)(void *ctx, mongocrypt_binary_t *out, uint32_t count, mongocrypt_status_t *status);
|
1337
1244
|
|
1338
|
-
bool
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
void *ctx);
|
1245
|
+
bool mongocrypt_setopt_crypto_hooks(mongocrypt_t *crypt,
|
1246
|
+
mongocrypt_crypto_fn aes_256_cbc_encrypt,
|
1247
|
+
mongocrypt_crypto_fn aes_256_cbc_decrypt,
|
1248
|
+
mongocrypt_random_fn random,
|
1249
|
+
mongocrypt_hmac_fn hmac_sha_512,
|
1250
|
+
mongocrypt_hmac_fn hmac_sha_256,
|
1251
|
+
mongocrypt_hash_fn sha_256,
|
1252
|
+
void *ctx);
|
1347
1253
|
|
1348
1254
|
/**
|
1349
1255
|
* Set a crypto hook for the AES256-CTR operations.
|
@@ -1360,11 +1266,10 @@ mongocrypt_setopt_crypto_hooks (mongocrypt_t *crypt,
|
|
1360
1266
|
* Retrieve it with @ref mongocrypt_status
|
1361
1267
|
*
|
1362
1268
|
*/
|
1363
|
-
bool
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
void *ctx);
|
1269
|
+
bool mongocrypt_setopt_aes_256_ctr(mongocrypt_t *crypt,
|
1270
|
+
mongocrypt_crypto_fn aes_256_ctr_encrypt,
|
1271
|
+
mongocrypt_crypto_fn aes_256_ctr_decrypt,
|
1272
|
+
void *ctx);
|
1368
1273
|
|
1369
1274
|
/**
|
1370
1275
|
* Set an AES256-ECB crypto hook for the AES256-CTR operations. If CTR hook was
|
@@ -1381,10 +1286,7 @@ mongocrypt_setopt_aes_256_ctr (mongocrypt_t *crypt,
|
|
1381
1286
|
* Retrieve it with @ref mongocrypt_status
|
1382
1287
|
*
|
1383
1288
|
*/
|
1384
|
-
bool
|
1385
|
-
mongocrypt_setopt_aes_256_ecb (mongocrypt_t *crypt,
|
1386
|
-
mongocrypt_crypto_fn aes_256_ecb_encrypt,
|
1387
|
-
void *ctx);
|
1289
|
+
bool mongocrypt_setopt_aes_256_ecb(mongocrypt_t *crypt, mongocrypt_crypto_fn aes_256_ecb_encrypt, void *ctx);
|
1388
1290
|
|
1389
1291
|
/**
|
1390
1292
|
* Set a crypto hook for the RSASSA-PKCS1-v1_5 algorithm with a SHA-256 hash.
|
@@ -1403,11 +1305,9 @@ mongocrypt_setopt_aes_256_ecb (mongocrypt_t *crypt,
|
|
1403
1305
|
* Retrieve it with @ref mongocrypt_status
|
1404
1306
|
*
|
1405
1307
|
*/
|
1406
|
-
bool
|
1407
|
-
|
1408
|
-
|
1409
|
-
mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
|
1410
|
-
void *sign_ctx);
|
1308
|
+
bool mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5(mongocrypt_t *crypt,
|
1309
|
+
mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
|
1310
|
+
void *sign_ctx);
|
1411
1311
|
|
1412
1312
|
/**
|
1413
1313
|
* @brief Opt-into skipping query analysis.
|
@@ -1418,8 +1318,7 @@ mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5 (
|
|
1418
1318
|
*
|
1419
1319
|
* @param[in] crypt The @ref mongocrypt_t object to update
|
1420
1320
|
*/
|
1421
|
-
void
|
1422
|
-
mongocrypt_setopt_bypass_query_analysis (mongocrypt_t *crypt);
|
1321
|
+
void mongocrypt_setopt_bypass_query_analysis(mongocrypt_t *crypt);
|
1423
1322
|
|
1424
1323
|
/**
|
1425
1324
|
* Set the contention factor used for explicit encryption.
|
@@ -1431,9 +1330,7 @@ mongocrypt_setopt_bypass_query_analysis (mongocrypt_t *crypt);
|
|
1431
1330
|
* @returns A boolean indicating success. If false, an error status is set.
|
1432
1331
|
* Retrieve it with @ref mongocrypt_ctx_status.
|
1433
1332
|
*/
|
1434
|
-
bool
|
1435
|
-
mongocrypt_ctx_setopt_contention_factor (mongocrypt_ctx_t *ctx,
|
1436
|
-
int64_t contention_factor);
|
1333
|
+
bool mongocrypt_ctx_setopt_contention_factor(mongocrypt_ctx_t *ctx, int64_t contention_factor);
|
1437
1334
|
|
1438
1335
|
/**
|
1439
1336
|
* Set the index key id to use for explicit Queryable Encryption.
|
@@ -1450,9 +1347,7 @@ mongocrypt_ctx_setopt_contention_factor (mongocrypt_ctx_t *ctx,
|
|
1450
1347
|
* @returns A boolean indicating success. If false, an error status is set.
|
1451
1348
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1452
1349
|
*/
|
1453
|
-
bool
|
1454
|
-
mongocrypt_ctx_setopt_index_key_id (mongocrypt_ctx_t *ctx,
|
1455
|
-
mongocrypt_binary_t *key_id);
|
1350
|
+
bool mongocrypt_ctx_setopt_index_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id);
|
1456
1351
|
|
1457
1352
|
/**
|
1458
1353
|
* Set the query type to use for explicit Queryable Encryption.
|
@@ -1464,10 +1359,7 @@ mongocrypt_ctx_setopt_index_key_id (mongocrypt_ctx_t *ctx,
|
|
1464
1359
|
* @returns A boolean indicating success. If false, an error status is set.
|
1465
1360
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1466
1361
|
*/
|
1467
|
-
bool
|
1468
|
-
mongocrypt_ctx_setopt_query_type (mongocrypt_ctx_t *ctx,
|
1469
|
-
const char *query_type,
|
1470
|
-
int len);
|
1362
|
+
bool mongocrypt_ctx_setopt_query_type(mongocrypt_ctx_t *ctx, const char *query_type, int len);
|
1471
1363
|
|
1472
1364
|
/**
|
1473
1365
|
* Set options for explicit encryption with the "rangePreview" algorithm.
|
@@ -1488,9 +1380,7 @@ mongocrypt_ctx_setopt_query_type (mongocrypt_ctx_t *ctx,
|
|
1488
1380
|
* @returns A boolean indicating success. If false, an error status is set.
|
1489
1381
|
* Retrieve it with @ref mongocrypt_ctx_status
|
1490
1382
|
*/
|
1491
|
-
bool
|
1492
|
-
mongocrypt_ctx_setopt_algorithm_range (mongocrypt_ctx_t *ctx,
|
1493
|
-
mongocrypt_binary_t *opts);
|
1383
|
+
bool mongocrypt_ctx_setopt_algorithm_range(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *opts);
|
1494
1384
|
|
1495
1385
|
/// String constants for setopt_query_type
|
1496
1386
|
// NOTE: The RangePreview algorithm is experimental only. It is not intended for
|