libmongocrypt-helper 1.7.0.0.1001 → 1.7.4.0.1000
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/extconf.rb +70 -0
- data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +164 -0
- data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +699 -0
- data/ext/libmongocrypt/libmongocrypt/CODEOWNERS +13 -0
- data/ext/libmongocrypt/libmongocrypt/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/README.md +250 -0
- data/ext/libmongocrypt/libmongocrypt/VERSION_CURRENT +1 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/CMakeLists.txt +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs +4 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Binary.cs +131 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/BinarySafeHandle.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CheckableSafeHandle.cs +46 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CipherCallbacks.cs +168 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/ContextSafeHandle.cs +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +238 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClientFactory.cs +134 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptContext.cs +214 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptException.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptOptions.cs +67 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HashCallback.cs +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HmacShaCallbacks.cs +96 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/IStatus.cs +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsCredentials.cs +53 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsKeyId.cs +91 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequest.cs +125 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequestCollection.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +652 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoader.cs +252 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoadingException.cs +34 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/License.txt +14 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LogLevel.cs +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoCryptSafeHandle.cs +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj +106 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.ruleset +85 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.targets +21 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/OperatingSystemHelper.cs +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Package.include.template.csproj +38 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/PinnedBinary.cs +49 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SecureRandomCallback.cs +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SigningRSAESPKCSCallback.cs +74 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Status.cs +94 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StatusSafeHandle.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StyleCop.ruleset +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/stylecop.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Package.include.template.csproj +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Program.cs +442 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +748 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BsonUtil.cs +82 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CallbackUtils.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CipherCallbacksTests.cs +46 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HashCallbackTests.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HmacShaCallbacksTests.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/MongoDB.Libmongocrypt.Test.csproj +35 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/Package.include.template.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/SigningRSAESPKCSCallbackTests.cs +64 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-document.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/mongocryptd-command.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/xunit.runner.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/BasicTests.cs +54 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj +42 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/Package.include.template.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/README.md +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +219 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.ps1 +275 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.sh +77 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/README.md +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +339 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.properties +5 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew +188 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew.bat +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/BinaryHolder.java +45 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPI.java +1130 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPIHelper.java +96 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CipherCallback.java +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/DisposableMemory.java +31 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/JULLogger.java +130 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Logger.java +144 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Loggers.java +50 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MacCallback.java +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MessageDigestCallback.java +55 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoAwsKmsProviderOptions.java +104 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypt.java +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContext.java +137 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContextImpl.java +164 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptException.java +67 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptImpl.java +408 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptOptions.java +284 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypts.java +38 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoDataKeyOptions.java +125 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoExplicitEncryptOptions.java +225 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptor.java +76 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptorImpl.java +105 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoLocalKmsProviderOptions.java +83 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoRewrapManyDataKeyOptions.java +104 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SLF4JLogger.java +110 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SecureRandomCallback.java +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SigningRSAESPKCSCallback.java +76 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/package-info.java +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +345 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- 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/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/json-schema.json +15 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-document.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter-keyAltName.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/kms-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-command.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/CHANGELOG.md +81 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/README.md +773 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/binding.gyp +79 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/README.hbs +44 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/build-static.sh +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/index.d.ts +515 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/autoEncrypter.js +420 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/buffer_pool.js +123 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/clientEncryption.js +699 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/common.js +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/credentialsProvider.js +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/cryptoCallbacks.js +87 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/index.js +42 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/mongocryptdManager.js +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/stateMachine.js +487 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package-lock.json +16051 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package.json +81 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.cc +929 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.h +114 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/autoEncrypter.test.js +953 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/buffer_pool.test.js +91 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/clientEncryption.test.js +701 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/credentialsProvider.test.js +163 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/cryptoCallbacks.test.js +284 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/README.md +5 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encrypted-document-nested.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encrypted-document.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encryptedFields.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/key-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/key1-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/kms-decrypt-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/mongocryptdManager.test.js +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/release.test.js +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/requirements.helper.js +29 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/stateMachine.test.js +331 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/tools/mongodb_reporter.js +325 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +121 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +187 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/RELEASE.rst +107 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/build-manylinux-wheel.sh +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/__init__.py +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/auto_encrypter.py +61 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binary.py +94 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +1561 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/compat.py +61 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/credentials.py +136 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/crypto.py +162 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/errors.py +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/explicit_encrypter.py +248 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +808 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/state_machine.py +156 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +17 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +92 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/setup.py +84 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/strip_header.py +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/__init__.py +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/collection-info.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/command.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/cmd.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-command.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-field-config-map.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document-azure.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document-gcp.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/12345678123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/12345678123498761234123456789013-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply-azure.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply-gcp.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/mongocryptd-command.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/mongocryptd-reply.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/schema-map.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_binding.py +71 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_crypto.py +49 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +825 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test-requirements.txt +12 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/FetchMongoC.cmake +20 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +209 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportDFP.cmake +70 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/IntelDFP.cmake +409 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/LTO.cmake +57 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/MongoC-Warnings.cmake +74 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-hidden-symbols.map +8 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-hidden-symbols.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-static.pc.in +9 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt.pc.in +10 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ltocheck-lib.c +6 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ltocheck-main.c +9 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/mongocrypt-config.cmake +42 -0
- data/ext/libmongocrypt/libmongocrypt/debian/build_snapshot.sh +79 -0
- data/ext/libmongocrypt/libmongocrypt/debian/changelog +105 -0
- data/ext/libmongocrypt/libmongocrypt/debian/compat +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/control +41 -0
- data/ext/libmongocrypt/libmongocrypt/debian/copyright +129 -0
- data/ext/libmongocrypt/libmongocrypt/debian/gbp.conf +23 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt-dev.dirs +2 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt-dev.install +5 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt0.dirs +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt0.install +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/rules +46 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/format +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/lintian-overrides +3 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/options +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/watch +3 -0
- data/ext/libmongocrypt/libmongocrypt/doc/Doxygen +2474 -0
- data/ext/libmongocrypt/libmongocrypt/etc/calc_release_version.py +265 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/control +33 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/rules +41 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/source/format +1 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_aead_generate_tests.py +41 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto.py +105 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto_selftest.py +52 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_generate_tests.py +34 -0
- data/ext/libmongocrypt/libmongocrypt/etc/generate-kek-tests.py +69 -0
- data/ext/libmongocrypt/libmongocrypt/etc/generate-test-data.py +141 -0
- data/ext/libmongocrypt/libmongocrypt/etc/list-compile-files.py +20 -0
- data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-MONGOCRYPT-571.patch +25 -0
- data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-s390x.patch +134 -0
- data/ext/libmongocrypt/libmongocrypt/etc/packager.py +854 -0
- data/ext/libmongocrypt/libmongocrypt/etc/print-marking.py +36 -0
- data/ext/libmongocrypt/libmongocrypt/etc/repo_config.yaml +257 -0
- data/ext/libmongocrypt/libmongocrypt/etc/requirements.txt +2 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rewrite.py +16 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rpm/libmongocrypt.spec +67 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rpm/tweak.awk +19 -0
- data/ext/libmongocrypt/libmongocrypt/integrating.md +251 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/CMakeLists.txt +305 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/COPYING +177 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/README.md +41 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/THIRD_PARTY_NOTICES +42 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/LICENSE +202 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/NOTICE +2 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq +10 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/normalize-path.txt +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/readme.txt +15 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/cmake/kms_message-config.cmake +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/cmake/libkms_message.pc.in +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.c +67 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.h +24 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_azure_request.c +219 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_b64.c +654 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_caller_identity_request.c +52 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_apple.c +159 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_libcrypto.c +142 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_none.c +65 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_windows.c +268 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_decrypt_request.c +72 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_encrypt_request.c +73 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_endian_private.h +165 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_gcp_request.c +286 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_item_type_private.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_reader_writer.c +502 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_reader_writer_private.h +150 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_request.c +256 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response.c +323 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response_parser.c +148 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response_parser_private.h +55 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_result_reason_private.h +77 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_result_status_private.h +54 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_tag_type_private.h +343 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kv_list.c +149 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kv_list.h +56 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_azure_request.h +110 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_b64.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_caller_identity_request.h +36 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_decrypt_request.h +37 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_encrypt_request.h +39 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_gcp_request.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_request.h +58 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_response.h +40 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_response_parser.h +26 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_message.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_message_defines.h +72 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_request.h +103 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_request_opt.h +80 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_response.h +43 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_response_parser.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message.c +47 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message_private.h +142 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_port.c +33 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_port.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request.c +925 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_opt.c +88 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_opt_private.h +32 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.c +520 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.h +89 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response.c +54 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response_parser.c +408 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.c +74 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/connection_close/connection_close.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/content_length/content_length.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/decrypt/decrypt.creq +11 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/decrypt/decrypt.sreq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/encrypt/encrypt.creq +11 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/encrypt/encrypt.sreq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-chunked-response.bin +20 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-multi-chunked-response.bin +22 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-response.bin +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/host/host.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/multibyte/multibyte.creq +10 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/multibyte/multibyte.sreq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kmip_reader_writer.c +485 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_assert.h +147 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_azure_online.c +260 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_gcp_online.c +250 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_request.c +223 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response.c +214 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response_parser.c +197 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.c +120 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.h +35 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_request.c +1302 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_util.c +92 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_util.h +45 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/windows/dirent.h +1224 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/cng.c +640 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/commoncrypto.c +326 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +97 -0
- data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +237 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-array-private.h +54 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-array.c +102 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-check-conversions-private.h +36 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +743 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +86 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +48 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +127 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +40 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +152 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +487 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private.h +47 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +156 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private.h +95 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +158 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +316 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private.h +179 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +385 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-private.h +93 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev.c +269 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-range-operator-private.h +29 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +91 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +658 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +161 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +242 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +128 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +620 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +308 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +112 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +99 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +382 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +130 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +235 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +118 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +151 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/check.hpp +89 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/endian.h +42 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +685 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.c +3 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +407 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/macros.h +53 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +381 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +93 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +1028 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +137 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +88 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +4 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/windows-lean.h +19 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongo_crypt-v1.h +320 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary-private.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary.c +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +236 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +691 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +24 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +82 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key-private.h +55 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +190 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth-private.h +46 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth.c +126 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +96 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +212 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-compat.h +44 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-config.h.in +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +303 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +1850 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +534 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +773 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +3005 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +269 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +415 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +1283 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +97 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endian-private.h +168 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint-private.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint.c +212 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek-private.h +109 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek.c +325 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker-private.h +209 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +1189 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +473 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +154 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +1785 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log-private.h +111 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +123 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +74 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +1624 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-mutex-private.h +46 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +231 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +493 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +197 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status-private.h +39 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status.c +169 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util-private.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +234 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util-private.h +84 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +203 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +1605 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +1610 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +132 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +57 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +92 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +155 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/NIST-CAVP.cstructs +1350 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/aes-ctr.cstructs +359 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/cache-tests.json +197 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-no-schema.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-no-validator.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-view.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collinfo-siblings.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/missing-key-id/collinfo.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-fields/collinfo.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-fields/encrypted-payload.json +4 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/cmd.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/mongocryptd-reply.json +72 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/cmd-to-mongocryptd.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/encrypted-payload.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/mongocryptd-reply.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/cmd-to-mongocryptd.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/mongocryptd-reply.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/cmd-to-mongocryptd.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/collinfo.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/encrypted-payload.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/mongocryptd-reply.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/cmd-to-mongocryptd.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/collinfo.json +25 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/encrypted-payload.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/mongocryptd-reply.json +15 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-extraField.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-missingKeyId.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-oneField.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-twoFields.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/encrypted-cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/encrypted-field-config-map.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decryption-input.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/find-with-encryptionInformation.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/cmd-to-mongocryptd.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/collinfo.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/mongocryptd-reply.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/cmd-to-mongocryptd.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/cmd.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/encrypted-payload.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/cmd-to-mongocryptd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/schema-map.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/cmd-to-mongocryptd.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/collinfo.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/cmd-to-mongocryptd.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/collinfo.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/mongocryptd-reply.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-aead.cstructs +109 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/cmd-to-mongocryptd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/encrypted-field-config-map.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-decrypt-ieev/first-filter.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-decrypt-ieev/second-filter.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload.json +91 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/mongocryptd-reply.json +66 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload.json +98 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/mongocryptd-reply.json +72 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/cmd-to-mongocryptd.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/mongocryptd-reply.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/mongocryptd-reply.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongocryptd.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongod.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/reply-from-mongocryptd.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/README.md +2 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/cmd.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-payload.json +51 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/mongocryptd-reply.json +59 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/rangeopts.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/value-to-encrypt.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/README.md +2 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/RNG_DATA.h +67 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/cmd.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/RNG_DATA.h +134 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/RNG_DATA.h +73 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-payload.json +54 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/mongocryptd-reply.json +62 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/RNG_DATA.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-payload.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/mongocryptd-reply.json +56 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/RNG_DATA.h +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/RNG_DATA.h +67 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/RNG_DATA.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/rangeopts.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/RNG_DATA.h +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/RNG_DATA.h +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/encrypted-payload.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/mongocryptd-reply.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2.cstructs +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/decrypt-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/encrypt-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/oauth-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kek-tests.json +169 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-azure.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-full.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-gcp.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-kmip.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-local.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-no-region.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name-duplicate-id.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name2.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789014-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789014-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/README.md +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kms-tests.json +297 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-cmd.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-existing-ciphertext.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-invalid.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-key-alt-name.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-key-alt-name2.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-no-encryption-needed.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-no-markings.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-random.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_decimal128.cstruct +14527 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_double.cstruct +7959 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_int32.cstruct +6906 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_int64.cstruct +9429 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_decimal128.cstruct +4565 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_decimal128_precision.cstruct +312 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_double.cstruct +3277 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_double_precision.cstruct +369 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_int32.cstruct +4612 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_int64.cstruct +3398 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-a.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-b.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-local.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-decrypt-reply-a.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-decrypt-reply-b.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-encrypt-reply-a.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-encrypt-reply-b.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-map.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/README.md +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/collection-info.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/encrypted-command.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/key-document-custom-endpoint.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/key-document.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/kms-decrypt-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/example-no-bson.c +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +368 -0
- data/ext/libmongocrypt/libmongocrypt/test/fuzz_kms.c +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +22 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +312 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +104 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +443 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +184 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +200 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +518 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +468 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +886 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +609 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +174 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +251 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +245 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +1079 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +218 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +266 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache-oauth.c +57 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +264 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +259 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +478 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +917 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +177 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.h +110 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +892 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +208 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +1134 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +5096 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +1061 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +1301 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +489 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +138 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +104 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-broker.c +1174 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +475 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key.c +282 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +561 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +206 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +89 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +137 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +738 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +88 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-traverse-util.c +548 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.c +105 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.h +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +1060 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +290 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/HELP.autogen +102 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/README.md +103 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +612 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/helpgen.py +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/make_includes.py +845 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/util.c +969 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/util.h +96 -0
- data/ext/libmongocrypt/libmongocrypt/third-party/IntelRDFPMathLib20U2.tar.xz +0 -0
- data/lib/libmongocrypt_helper/version.rb +2 -2
- data/lib/libmongocrypt_helper.rb +13 -1
- data.tar.gz.sig +0 -0
- metadata +988 -6
- metadata.gz.sig +0 -0
- data/so/libmongocrypt.so +0 -0
@@ -0,0 +1,1610 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2019-present MongoDB, Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
#ifndef MONGOCRYPT_H
|
17
|
+
#define MONGOCRYPT_H
|
18
|
+
|
19
|
+
/** @file mongocrypt.h The top-level handle to libmongocrypt. */
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @mainpage libmongocrypt
|
23
|
+
* See all public API documentation in: @ref mongocrypt.h
|
24
|
+
*/
|
25
|
+
|
26
|
+
#include "mongocrypt-export.h"
|
27
|
+
#include "mongocrypt-compat.h"
|
28
|
+
|
29
|
+
/* clang-format off */
|
30
|
+
#ifndef __has_include
|
31
|
+
#include "mongocrypt-config.h"
|
32
|
+
#else
|
33
|
+
#if __has_include("mongocrypt-config.h")
|
34
|
+
#include "mongocrypt-config.h"
|
35
|
+
#else
|
36
|
+
#error No "mongocrypt-config.h" header is available. That file must \
|
37
|
+
be generated in order to use libmongocrypt.
|
38
|
+
#endif
|
39
|
+
#endif
|
40
|
+
/* clang-format on */
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Returns the version string for libmongocrypt.
|
44
|
+
*
|
45
|
+
* @param[out] len An optional length of the returned string. May be NULL.
|
46
|
+
* @returns a NULL terminated version string for libmongocrypt.
|
47
|
+
*/
|
48
|
+
MONGOCRYPT_EXPORT
|
49
|
+
const char *
|
50
|
+
mongocrypt_version (uint32_t *len);
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* A non-owning view of a byte buffer.
|
55
|
+
*
|
56
|
+
* When constructing a mongocrypt_binary_t it is the responsibility of the
|
57
|
+
* caller to maintain the lifetime of the viewed data. However, all public
|
58
|
+
* functions that take a mongocrypt_binary_t as an argument will make a copy of
|
59
|
+
* the viewed data. For example, the following is valid:
|
60
|
+
*
|
61
|
+
* @code{.c}
|
62
|
+
* mongocrypt_binary_t bin = mongocrypt_binary_new_from_data(mydata, mylen);
|
63
|
+
* assert (mongocrypt_setopt_kms_provider_local (crypt), bin);
|
64
|
+
* // The viewed data of bin has been copied. Ok to free the view and the data.
|
65
|
+
* mongocrypt_binary_destroy (bin);
|
66
|
+
* my_free_fn (mydata);
|
67
|
+
* @endcode
|
68
|
+
*
|
69
|
+
* Functions with a mongocrypt_binary_t* out guarantee the lifetime of the
|
70
|
+
* viewed data to live as long as the parent object. For example, @ref
|
71
|
+
* mongocrypt_ctx_mongo_op guarantees that the viewed data of
|
72
|
+
* mongocrypt_binary_t is valid until the parent ctx is destroyed with @ref
|
73
|
+
* mongocrypt_ctx_destroy.
|
74
|
+
*/
|
75
|
+
typedef struct _mongocrypt_binary_t mongocrypt_binary_t;
|
76
|
+
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Create a new non-owning view of a buffer (data + length).
|
80
|
+
*
|
81
|
+
* Use this to create a mongocrypt_binary_t used for output parameters.
|
82
|
+
*
|
83
|
+
* @returns A new mongocrypt_binary_t.
|
84
|
+
*/
|
85
|
+
MONGOCRYPT_EXPORT
|
86
|
+
mongocrypt_binary_t *
|
87
|
+
mongocrypt_binary_new (void);
|
88
|
+
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Create a new non-owning view of a buffer (data + length).
|
92
|
+
*
|
93
|
+
* @param[in] data A pointer to an array of bytes. This data is not copied. @p
|
94
|
+
* data must outlive the binary object.
|
95
|
+
* @param[in] len The length of the @p data byte array.
|
96
|
+
*
|
97
|
+
* @returns A new @ref mongocrypt_binary_t.
|
98
|
+
*/
|
99
|
+
MONGOCRYPT_EXPORT
|
100
|
+
mongocrypt_binary_t *
|
101
|
+
mongocrypt_binary_new_from_data (uint8_t *data, uint32_t len);
|
102
|
+
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Get a pointer to the viewed data.
|
106
|
+
*
|
107
|
+
* @param[in] binary The @ref mongocrypt_binary_t.
|
108
|
+
*
|
109
|
+
* @returns A pointer to the viewed data.
|
110
|
+
*/
|
111
|
+
MONGOCRYPT_EXPORT
|
112
|
+
uint8_t *
|
113
|
+
mongocrypt_binary_data (const mongocrypt_binary_t *binary);
|
114
|
+
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Get the length of the viewed data.
|
118
|
+
*
|
119
|
+
* @param[in] binary The @ref mongocrypt_binary_t.
|
120
|
+
*
|
121
|
+
* @returns The length of the viewed data.
|
122
|
+
*/
|
123
|
+
MONGOCRYPT_EXPORT
|
124
|
+
uint32_t
|
125
|
+
mongocrypt_binary_len (const mongocrypt_binary_t *binary);
|
126
|
+
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Free the @ref mongocrypt_binary_t.
|
130
|
+
*
|
131
|
+
* This does not free the viewed data.
|
132
|
+
*
|
133
|
+
* @param[in] binary The mongocrypt_binary_t destroy.
|
134
|
+
*/
|
135
|
+
MONGOCRYPT_EXPORT
|
136
|
+
void
|
137
|
+
mongocrypt_binary_destroy (mongocrypt_binary_t *binary);
|
138
|
+
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Indicates success or contains error information.
|
142
|
+
*
|
143
|
+
* Functions like @ref mongocrypt_ctx_encrypt_init follow a pattern to expose a
|
144
|
+
* status. A boolean is returned. True indicates success, and false indicates
|
145
|
+
* failure. On failure a status on the handle is set, and is accessible with a
|
146
|
+
* corresponding (handle)_status function. E.g. @ref mongocrypt_ctx_status.
|
147
|
+
*/
|
148
|
+
typedef struct _mongocrypt_status_t mongocrypt_status_t;
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Indicates the type of error.
|
152
|
+
*/
|
153
|
+
typedef enum {
|
154
|
+
MONGOCRYPT_STATUS_OK = 0,
|
155
|
+
MONGOCRYPT_STATUS_ERROR_CLIENT = 1,
|
156
|
+
MONGOCRYPT_STATUS_ERROR_KMS = 2,
|
157
|
+
MONGOCRYPT_STATUS_ERROR_CRYPT_SHARED = 3,
|
158
|
+
} mongocrypt_status_type_t;
|
159
|
+
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Create a new status object.
|
163
|
+
*
|
164
|
+
* Use a new status object to retrieve the status from a handle by passing
|
165
|
+
* this as an out-parameter to functions like @ref mongocrypt_ctx_status.
|
166
|
+
* When done, destroy it with @ref mongocrypt_status_destroy.
|
167
|
+
*
|
168
|
+
* @returns A new status object.
|
169
|
+
*/
|
170
|
+
MONGOCRYPT_EXPORT
|
171
|
+
mongocrypt_status_t *
|
172
|
+
mongocrypt_status_new (void);
|
173
|
+
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Set a status object with message, type, and code.
|
177
|
+
*
|
178
|
+
* Use this to set the @ref mongocrypt_status_t given in the crypto hooks.
|
179
|
+
*
|
180
|
+
* @param[in] type The status type.
|
181
|
+
* @param[in] code The status code.
|
182
|
+
* @param[in] message The message.
|
183
|
+
* @param[in] message_len Due to historical behavior, pass 1 + the string length
|
184
|
+
* of @p message (which differs from other functions accepting string
|
185
|
+
* arguments).
|
186
|
+
* Alternatively, if message is NULL terminated this may be -1 to tell
|
187
|
+
* mongocrypt
|
188
|
+
* to determine the string's length with strlen.
|
189
|
+
*
|
190
|
+
*/
|
191
|
+
MONGOCRYPT_EXPORT
|
192
|
+
void
|
193
|
+
mongocrypt_status_set (mongocrypt_status_t *status,
|
194
|
+
mongocrypt_status_type_t type,
|
195
|
+
uint32_t code,
|
196
|
+
const char *message,
|
197
|
+
int32_t message_len);
|
198
|
+
|
199
|
+
|
200
|
+
/**
|
201
|
+
* Indicates success or the type of error.
|
202
|
+
*
|
203
|
+
* @param[in] status The status object.
|
204
|
+
*
|
205
|
+
* @returns A @ref mongocrypt_status_type_t.
|
206
|
+
*/
|
207
|
+
MONGOCRYPT_EXPORT
|
208
|
+
mongocrypt_status_type_t
|
209
|
+
mongocrypt_status_type (mongocrypt_status_t *status);
|
210
|
+
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Get an error code or 0.
|
214
|
+
*
|
215
|
+
* @param[in] status The status object.
|
216
|
+
*
|
217
|
+
* @returns An error code.
|
218
|
+
*/
|
219
|
+
MONGOCRYPT_EXPORT
|
220
|
+
uint32_t
|
221
|
+
mongocrypt_status_code (mongocrypt_status_t *status);
|
222
|
+
|
223
|
+
|
224
|
+
/**
|
225
|
+
* Get the error message associated with a status or NULL.
|
226
|
+
*
|
227
|
+
* @param[in] status The status object.
|
228
|
+
* @param[out] len An optional length of the returned string (excluding the
|
229
|
+
* trailing NULL byte). May be NULL.
|
230
|
+
*
|
231
|
+
* @returns A NULL terminated error message or NULL.
|
232
|
+
*/
|
233
|
+
MONGOCRYPT_EXPORT
|
234
|
+
const char *
|
235
|
+
mongocrypt_status_message (mongocrypt_status_t *status, uint32_t *len);
|
236
|
+
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Returns true if the status indicates success.
|
240
|
+
*
|
241
|
+
* @param[in] status The status to check.
|
242
|
+
*
|
243
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
244
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
245
|
+
*/
|
246
|
+
MONGOCRYPT_EXPORT
|
247
|
+
bool
|
248
|
+
mongocrypt_status_ok (mongocrypt_status_t *status);
|
249
|
+
|
250
|
+
|
251
|
+
/**
|
252
|
+
* Free the memory for a status object.
|
253
|
+
*
|
254
|
+
* @param[in] status The status to destroy.
|
255
|
+
*/
|
256
|
+
MONGOCRYPT_EXPORT
|
257
|
+
void
|
258
|
+
mongocrypt_status_destroy (mongocrypt_status_t *status);
|
259
|
+
|
260
|
+
/**
|
261
|
+
* Indicates the type of log message.
|
262
|
+
*/
|
263
|
+
typedef enum {
|
264
|
+
MONGOCRYPT_LOG_LEVEL_FATAL = 0,
|
265
|
+
MONGOCRYPT_LOG_LEVEL_ERROR = 1,
|
266
|
+
MONGOCRYPT_LOG_LEVEL_WARNING = 2,
|
267
|
+
MONGOCRYPT_LOG_LEVEL_INFO = 3,
|
268
|
+
MONGOCRYPT_LOG_LEVEL_TRACE = 4
|
269
|
+
} mongocrypt_log_level_t;
|
270
|
+
|
271
|
+
|
272
|
+
/**
|
273
|
+
* A log callback function. Set a custom log callback with @ref
|
274
|
+
* mongocrypt_setopt_log_handler.
|
275
|
+
*
|
276
|
+
* @param[in] message A NULL terminated message.
|
277
|
+
* @param[in] message_len The length of message.
|
278
|
+
* @param[in] ctx A context provided by the caller of @ref
|
279
|
+
* mongocrypt_setopt_log_handler.
|
280
|
+
*/
|
281
|
+
typedef void (*mongocrypt_log_fn_t) (mongocrypt_log_level_t level,
|
282
|
+
const char *message,
|
283
|
+
uint32_t message_len,
|
284
|
+
void *ctx);
|
285
|
+
|
286
|
+
|
287
|
+
/**
|
288
|
+
* The top-level handle to libmongocrypt.
|
289
|
+
*
|
290
|
+
* Create a mongocrypt_t handle to perform operations within libmongocrypt:
|
291
|
+
* encryption, decryption, registering log callbacks, etc.
|
292
|
+
*
|
293
|
+
* Functions on a mongocrypt_t are thread safe, though functions on derived
|
294
|
+
* handles (e.g. mongocrypt_ctx_t) are not and must be owned by a single
|
295
|
+
* thread. See each handle's documentation for thread-safety considerations.
|
296
|
+
*
|
297
|
+
* Multiple mongocrypt_t handles may be created.
|
298
|
+
*/
|
299
|
+
typedef struct _mongocrypt_t mongocrypt_t;
|
300
|
+
|
301
|
+
|
302
|
+
/**
|
303
|
+
* Allocate a new @ref mongocrypt_t object.
|
304
|
+
*
|
305
|
+
* Set options using mongocrypt_setopt_* functions, then initialize with @ref
|
306
|
+
* mongocrypt_init. When done with the @ref mongocrypt_t, free with @ref
|
307
|
+
* mongocrypt_destroy.
|
308
|
+
*
|
309
|
+
* @returns A new @ref mongocrypt_t object.
|
310
|
+
*/
|
311
|
+
MONGOCRYPT_EXPORT
|
312
|
+
mongocrypt_t *
|
313
|
+
mongocrypt_new (void);
|
314
|
+
|
315
|
+
|
316
|
+
/**
|
317
|
+
* Set a handler on the @ref mongocrypt_t object to get called on every log
|
318
|
+
* message.
|
319
|
+
*
|
320
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
321
|
+
* @param[in] log_fn The log callback.
|
322
|
+
* @param[in] log_ctx A context passed as an argument to the log callback every
|
323
|
+
* invocation.
|
324
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
325
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
326
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
327
|
+
*/
|
328
|
+
MONGOCRYPT_EXPORT
|
329
|
+
bool
|
330
|
+
mongocrypt_setopt_log_handler (mongocrypt_t *crypt,
|
331
|
+
mongocrypt_log_fn_t log_fn,
|
332
|
+
void *log_ctx);
|
333
|
+
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Configure an AWS KMS provider on the @ref mongocrypt_t object.
|
337
|
+
*
|
338
|
+
* This has been superseded by the more flexible:
|
339
|
+
* @ref mongocrypt_setopt_kms_providers
|
340
|
+
*
|
341
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
342
|
+
* @param[in] aws_access_key_id The AWS access key ID used to generate KMS
|
343
|
+
* messages.
|
344
|
+
* @param[in] aws_access_key_id_len The string length (in bytes) of @p
|
345
|
+
* aws_access_key_id. Pass -1 to determine the string length with strlen (must
|
346
|
+
* be NULL terminated).
|
347
|
+
* @param[in] aws_secret_access_key The AWS secret access key used to generate
|
348
|
+
* KMS messages.
|
349
|
+
* @param[in] aws_secret_access_key_len The string length (in bytes) of @p
|
350
|
+
* aws_secret_access_key. Pass -1 to determine the string length with strlen
|
351
|
+
* (must be NULL terminated).
|
352
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
353
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
354
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
355
|
+
*/
|
356
|
+
MONGOCRYPT_EXPORT
|
357
|
+
bool
|
358
|
+
mongocrypt_setopt_kms_provider_aws (mongocrypt_t *crypt,
|
359
|
+
const char *aws_access_key_id,
|
360
|
+
int32_t aws_access_key_id_len,
|
361
|
+
const char *aws_secret_access_key,
|
362
|
+
int32_t aws_secret_access_key_len);
|
363
|
+
|
364
|
+
|
365
|
+
/**
|
366
|
+
* Configure a local KMS provider on the @ref mongocrypt_t object.
|
367
|
+
*
|
368
|
+
* This has been superseded by the more flexible:
|
369
|
+
* @ref mongocrypt_setopt_kms_providers
|
370
|
+
*
|
371
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
372
|
+
* @param[in] key A 96 byte master key used to encrypt and decrypt key vault
|
373
|
+
* keys. The viewed data is copied. It is valid to destroy @p key with @ref
|
374
|
+
* mongocrypt_binary_destroy immediately after.
|
375
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
376
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
377
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
378
|
+
*/
|
379
|
+
MONGOCRYPT_EXPORT
|
380
|
+
bool
|
381
|
+
mongocrypt_setopt_kms_provider_local (mongocrypt_t *crypt,
|
382
|
+
mongocrypt_binary_t *key);
|
383
|
+
|
384
|
+
/**
|
385
|
+
* Configure KMS providers with a BSON document.
|
386
|
+
*
|
387
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
388
|
+
* @param[in] kms_providers A BSON document mapping the KMS provider names
|
389
|
+
* to credentials. Set a KMS provider value to an empty document to supply
|
390
|
+
* credentials on-demand with @ref mongocrypt_ctx_provide_kms_providers.
|
391
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
392
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
393
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
394
|
+
*/
|
395
|
+
MONGOCRYPT_EXPORT
|
396
|
+
bool
|
397
|
+
mongocrypt_setopt_kms_providers (mongocrypt_t *crypt,
|
398
|
+
mongocrypt_binary_t *kms_providers);
|
399
|
+
|
400
|
+
/**
|
401
|
+
* Set a local schema map for encryption.
|
402
|
+
*
|
403
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
404
|
+
* @param[in] schema_map A BSON document representing the schema map supplied by
|
405
|
+
* the user. The keys are collection namespaces and values are JSON schemas. The
|
406
|
+
* viewed data copied. It is valid to destroy @p schema_map with @ref
|
407
|
+
* mongocrypt_binary_destroy immediately after.
|
408
|
+
* @pre @p crypt has not been initialized.
|
409
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
410
|
+
* Retrieve it with @ref mongocrypt_status
|
411
|
+
*/
|
412
|
+
MONGOCRYPT_EXPORT
|
413
|
+
bool
|
414
|
+
mongocrypt_setopt_schema_map (mongocrypt_t *crypt,
|
415
|
+
mongocrypt_binary_t *schema_map);
|
416
|
+
|
417
|
+
/**
|
418
|
+
* Set a local EncryptedFieldConfigMap for encryption.
|
419
|
+
*
|
420
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
421
|
+
* @param[in] efc_map A BSON document representing the EncryptedFieldConfigMap
|
422
|
+
* supplied by the user. The keys are collection namespaces and values are
|
423
|
+
* EncryptedFieldConfigMap documents. The viewed data copied. It is valid to
|
424
|
+
* destroy @p efc_map with @ref mongocrypt_binary_destroy immediately after.
|
425
|
+
* @pre @p crypt has not been initialized.
|
426
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
427
|
+
* Retrieve it with @ref mongocrypt_status
|
428
|
+
*/
|
429
|
+
MONGOCRYPT_EXPORT
|
430
|
+
bool
|
431
|
+
mongocrypt_setopt_encrypted_field_config_map (mongocrypt_t *crypt,
|
432
|
+
mongocrypt_binary_t *efc_map);
|
433
|
+
|
434
|
+
|
435
|
+
/**
|
436
|
+
* @brief Append an additional search directory to the search path for loading
|
437
|
+
* the crypt_shared dynamic library.
|
438
|
+
*
|
439
|
+
* @param[in] crypt The @ref mongocrypt_t object to update
|
440
|
+
* @param[in] path A null-terminated sequence of bytes for the search path. On
|
441
|
+
* some filesystems, this may be arbitrary bytes. On other filesystems, this may
|
442
|
+
* be required to be a valid UTF-8 code unit sequence. If the leading element of
|
443
|
+
* the path is the literal string "$ORIGIN", that substring will be replaced
|
444
|
+
* with the directory path containing the executable libmongocrypt module. If
|
445
|
+
* the path string is literal "$SYSTEM", then libmongocrypt will defer to the
|
446
|
+
* system's library resolution mechanism to find the crypt_shared library.
|
447
|
+
*
|
448
|
+
* @note If no crypt_shared dynamic library is found in any of the directories
|
449
|
+
* specified by the search paths loaded here, @ref mongocrypt_init() will still
|
450
|
+
* succeed and continue to operate without crypt_shared.
|
451
|
+
*
|
452
|
+
* @note The search paths are searched in the order that they are appended. This
|
453
|
+
* allows one to provide a precedence in how the library will be discovered. For
|
454
|
+
* example, appending known directories before appending "$SYSTEM" will allow
|
455
|
+
* one to supersede the system's installed library, but still fall-back to it if
|
456
|
+
* the library wasn't found otherwise. If one does not ever append "$SYSTEM",
|
457
|
+
* then the system's library-search mechanism will never be consulted.
|
458
|
+
*
|
459
|
+
* @note If an absolute path to the library is specified using
|
460
|
+
* @ref mongocrypt_setopt_set_crypt_shared_lib_path_override, then paths
|
461
|
+
* appended here will have no effect.
|
462
|
+
*/
|
463
|
+
MONGOCRYPT_EXPORT
|
464
|
+
void
|
465
|
+
mongocrypt_setopt_append_crypt_shared_lib_search_path (mongocrypt_t *crypt,
|
466
|
+
const char *path);
|
467
|
+
|
468
|
+
|
469
|
+
/**
|
470
|
+
* @brief Set a single override path for loading the crypt_shared dynamic
|
471
|
+
* library.
|
472
|
+
*
|
473
|
+
* @param[in] crypt The @ref mongocrypt_t object to update
|
474
|
+
* @param[in] path A null-terminated sequence of bytes for a path to the
|
475
|
+
* crypt_shared dynamic library. On some filesystems, this may be arbitrary
|
476
|
+
* bytes. On other filesystems, this may be required to be a valid UTF-8 code
|
477
|
+
* unit sequence. If the leading element of the path is the literal string
|
478
|
+
* `$ORIGIN`, that substring will be replaced with the directory path containing
|
479
|
+
* the executable libmongocrypt module.
|
480
|
+
*
|
481
|
+
* @note This function will do no IO nor path validation. All validation will
|
482
|
+
* occur during the call to @ref mongocrypt_init.
|
483
|
+
*
|
484
|
+
* @note If a crypt_shared library path override is specified here, then no
|
485
|
+
* paths given to @ref mongocrypt_setopt_append_crypt_shared_lib_search_path
|
486
|
+
* will be consulted when opening the crypt_shared library.
|
487
|
+
*
|
488
|
+
* @note If a path is provided via this API and @ref mongocrypt_init fails to
|
489
|
+
* initialize a valid crypt_shared library instance for the path specified, then
|
490
|
+
* the initialization of mongocrypt_t will fail with an error.
|
491
|
+
*/
|
492
|
+
MONGOCRYPT_EXPORT
|
493
|
+
void
|
494
|
+
mongocrypt_setopt_set_crypt_shared_lib_path_override (mongocrypt_t *crypt,
|
495
|
+
const char *path);
|
496
|
+
|
497
|
+
|
498
|
+
/**
|
499
|
+
* @brief Opt-into handling the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state.
|
500
|
+
*
|
501
|
+
* If set, before entering the MONGOCRYPT_CTX_NEED_KMS state,
|
502
|
+
* contexts may enter the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state
|
503
|
+
* and then wait for credentials to be supplied through
|
504
|
+
* @ref mongocrypt_ctx_provide_kms_providers.
|
505
|
+
*
|
506
|
+
* A context will only enter MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS
|
507
|
+
* if an empty document was set for a KMS provider in @ref
|
508
|
+
* mongocrypt_setopt_kms_providers.
|
509
|
+
*
|
510
|
+
* @param[in] crypt The @ref mongocrypt_t object to update
|
511
|
+
*/
|
512
|
+
MONGOCRYPT_EXPORT
|
513
|
+
void
|
514
|
+
mongocrypt_setopt_use_need_kms_credentials_state (mongocrypt_t *crypt);
|
515
|
+
|
516
|
+
|
517
|
+
/**
|
518
|
+
* Initialize new @ref mongocrypt_t object.
|
519
|
+
*
|
520
|
+
* Set options before using @ref mongocrypt_setopt_kms_provider_local, @ref
|
521
|
+
* mongocrypt_setopt_kms_provider_aws, or @ref mongocrypt_setopt_log_handler.
|
522
|
+
*
|
523
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
524
|
+
*
|
525
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
526
|
+
* Retrieve it with @ref mongocrypt_ctx_status Failure may occur if previously
|
527
|
+
* set
|
528
|
+
* options are invalid.
|
529
|
+
*/
|
530
|
+
MONGOCRYPT_EXPORT
|
531
|
+
bool
|
532
|
+
mongocrypt_init (mongocrypt_t *crypt);
|
533
|
+
|
534
|
+
|
535
|
+
/**
|
536
|
+
* Get the status associated with a @ref mongocrypt_t object.
|
537
|
+
*
|
538
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
539
|
+
* @param[out] status Receives the status.
|
540
|
+
*
|
541
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
542
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
543
|
+
*/
|
544
|
+
MONGOCRYPT_EXPORT
|
545
|
+
bool
|
546
|
+
mongocrypt_status (mongocrypt_t *crypt, mongocrypt_status_t *status);
|
547
|
+
|
548
|
+
|
549
|
+
/**
|
550
|
+
* Destroy the @ref mongocrypt_t object.
|
551
|
+
*
|
552
|
+
* @param[in] crypt The @ref mongocrypt_t object to destroy.
|
553
|
+
*/
|
554
|
+
MONGOCRYPT_EXPORT
|
555
|
+
void
|
556
|
+
mongocrypt_destroy (mongocrypt_t *crypt);
|
557
|
+
|
558
|
+
/**
|
559
|
+
* Obtain a nul-terminated version string of the loaded crypt_shared dynamic
|
560
|
+
* library, if available.
|
561
|
+
*
|
562
|
+
* If no crypt_shared was successfully loaded, this function returns NULL.
|
563
|
+
*
|
564
|
+
* @param[in] crypt The mongocrypt_t object after a successful call to
|
565
|
+
* mongocrypt_init.
|
566
|
+
* @param[out] len An optional output parameter to which the length of the
|
567
|
+
* returned string is written. If provided and no crypt_shared library was
|
568
|
+
* loaded, zero is written to *len.
|
569
|
+
*
|
570
|
+
* @return A nul-terminated string of the dynamically loaded crypt_shared
|
571
|
+
* library.
|
572
|
+
*
|
573
|
+
* @note For a numeric value that can be compared against, use
|
574
|
+
* @ref mongocrypt_crypt_shared_lib_version.
|
575
|
+
*/
|
576
|
+
MONGOCRYPT_EXPORT
|
577
|
+
const char *
|
578
|
+
mongocrypt_crypt_shared_lib_version_string (const mongocrypt_t *crypt,
|
579
|
+
uint32_t *len);
|
580
|
+
|
581
|
+
|
582
|
+
/**
|
583
|
+
* @brief Obtain a 64-bit constant encoding the version of the loaded
|
584
|
+
* crypt_shared library, if available.
|
585
|
+
*
|
586
|
+
* @param[in] crypt The mongocrypt_t object after a successul call to
|
587
|
+
* mongocrypt_init.
|
588
|
+
*
|
589
|
+
* @return A 64-bit encoded version number, with the version encoded as four
|
590
|
+
* sixteen-bit integers, or zero if no crypt_shared library was loaded.
|
591
|
+
*
|
592
|
+
* The version is encoded as four 16-bit numbers, from high to low:
|
593
|
+
*
|
594
|
+
* - Major version
|
595
|
+
* - Minor version
|
596
|
+
* - Revision
|
597
|
+
* - Reserved
|
598
|
+
*
|
599
|
+
* For example, version 6.2.1 would be encoded as: 0x0006'0002'0001'0000
|
600
|
+
*/
|
601
|
+
MONGOCRYPT_EXPORT
|
602
|
+
uint64_t
|
603
|
+
mongocrypt_crypt_shared_lib_version (const mongocrypt_t *crypt);
|
604
|
+
|
605
|
+
|
606
|
+
/**
|
607
|
+
* Manages the state machine for encryption or decryption.
|
608
|
+
*/
|
609
|
+
typedef struct _mongocrypt_ctx_t mongocrypt_ctx_t;
|
610
|
+
|
611
|
+
|
612
|
+
/**
|
613
|
+
* Create a new uninitialized @ref mongocrypt_ctx_t.
|
614
|
+
*
|
615
|
+
* Initialize the context with functions like @ref mongocrypt_ctx_encrypt_init.
|
616
|
+
* When done, destroy it with @ref mongocrypt_ctx_destroy.
|
617
|
+
*
|
618
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
619
|
+
* @returns A new context.
|
620
|
+
*/
|
621
|
+
MONGOCRYPT_EXPORT
|
622
|
+
mongocrypt_ctx_t *
|
623
|
+
mongocrypt_ctx_new (mongocrypt_t *crypt);
|
624
|
+
|
625
|
+
|
626
|
+
/**
|
627
|
+
* Get the status associated with a @ref mongocrypt_ctx_t object.
|
628
|
+
*
|
629
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
630
|
+
* @param[out] status Receives the status.
|
631
|
+
*
|
632
|
+
* @returns True if the output is an ok status, false if it is an error
|
633
|
+
* status.
|
634
|
+
*
|
635
|
+
* @see mongocrypt_status_ok
|
636
|
+
*/
|
637
|
+
MONGOCRYPT_EXPORT
|
638
|
+
bool
|
639
|
+
mongocrypt_ctx_status (mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
|
640
|
+
|
641
|
+
|
642
|
+
/**
|
643
|
+
* Set the key id to use for explicit encryption.
|
644
|
+
*
|
645
|
+
* It is an error to set both this and the key alt name.
|
646
|
+
*
|
647
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
648
|
+
* @param[in] key_id The binary corresponding to the _id (a UUID) of the data
|
649
|
+
* key to use from the key vault collection. Note, the UUID must be encoded with
|
650
|
+
* RFC-4122 byte order. The viewed data is copied. It is valid to destroy
|
651
|
+
* @p key_id with @ref mongocrypt_binary_destroy immediately after.
|
652
|
+
* @pre @p ctx has not been initialized.
|
653
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
654
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
655
|
+
*/
|
656
|
+
MONGOCRYPT_EXPORT
|
657
|
+
bool
|
658
|
+
mongocrypt_ctx_setopt_key_id (mongocrypt_ctx_t *ctx,
|
659
|
+
mongocrypt_binary_t *key_id);
|
660
|
+
|
661
|
+
/**
|
662
|
+
* Set the keyAltName to use for explicit encryption or
|
663
|
+
* data key creation.
|
664
|
+
*
|
665
|
+
* Pass the binary encoding a BSON document like the following:
|
666
|
+
*
|
667
|
+
* { "keyAltName" : (BSON UTF8 value) }
|
668
|
+
*
|
669
|
+
* For explicit encryption, it is an error to set both the keyAltName
|
670
|
+
* and the key id.
|
671
|
+
*
|
672
|
+
* For creating data keys, call this function repeatedly to set
|
673
|
+
* multiple keyAltNames.
|
674
|
+
*
|
675
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
676
|
+
* @param[in] key_alt_name The name to use. The viewed data is copied. It is
|
677
|
+
* valid to destroy @p key_alt_name with @ref mongocrypt_binary_destroy
|
678
|
+
* immediately after.
|
679
|
+
* @pre @p ctx has not been initialized.
|
680
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
681
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
682
|
+
*/
|
683
|
+
MONGOCRYPT_EXPORT
|
684
|
+
bool
|
685
|
+
mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
|
686
|
+
mongocrypt_binary_t *key_alt_name);
|
687
|
+
|
688
|
+
/**
|
689
|
+
* Set the keyMaterial to use for encrypting data.
|
690
|
+
*
|
691
|
+
* Pass the binary encoding of a BSON document like the following:
|
692
|
+
*
|
693
|
+
* { "keyMaterial" : (BSON BINARY value) }
|
694
|
+
*
|
695
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
696
|
+
* @param[in] key_material The data encryption key to use. The viewed data is
|
697
|
+
* copied. It is valid to destroy @p key_material with @ref
|
698
|
+
* mongocrypt_binary_destroy immediately after.
|
699
|
+
* @pre @p ctx has not been initialized.
|
700
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
701
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
702
|
+
*/
|
703
|
+
MONGOCRYPT_EXPORT
|
704
|
+
bool
|
705
|
+
mongocrypt_ctx_setopt_key_material (mongocrypt_ctx_t *ctx,
|
706
|
+
mongocrypt_binary_t *key_material);
|
707
|
+
|
708
|
+
/**
|
709
|
+
* Set the algorithm used for encryption to either
|
710
|
+
* deterministic or random encryption. This value
|
711
|
+
* should only be set when using explicit encryption.
|
712
|
+
*
|
713
|
+
* If -1 is passed in for "len", then "algorithm" is
|
714
|
+
* assumed to be a null-terminated string.
|
715
|
+
*
|
716
|
+
* Valid values for algorithm are:
|
717
|
+
* "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
|
718
|
+
* "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
|
719
|
+
*
|
720
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
721
|
+
* @param[in] algorithm A string specifying the algorithm to
|
722
|
+
* use for encryption.
|
723
|
+
* @param[in] len The length of the algorithm string.
|
724
|
+
* @pre @p ctx has not been initialized.
|
725
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
726
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
727
|
+
*/
|
728
|
+
MONGOCRYPT_EXPORT
|
729
|
+
bool
|
730
|
+
mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
|
731
|
+
const char *algorithm,
|
732
|
+
int len);
|
733
|
+
|
734
|
+
/// String constant for setopt_algorithm "Deterministic" encryption
|
735
|
+
#define MONGOCRYPT_ALGORITHM_DETERMINISTIC_STR \
|
736
|
+
"AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
|
737
|
+
/// String constant for setopt_algorithm "Random" encryption
|
738
|
+
#define MONGOCRYPT_ALGORITHM_RANDOM_STR "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
|
739
|
+
/// String constant for setopt_algorithm "Indexed" explicit encryption
|
740
|
+
#define MONGOCRYPT_ALGORITHM_INDEXED_STR "Indexed"
|
741
|
+
/// String constant for setopt_algorithm "Unindexed" explicit encryption
|
742
|
+
#define MONGOCRYPT_ALGORITHM_UNINDEXED_STR "Unindexed"
|
743
|
+
/// String constant for setopt_algorithm "rangePreview" explicit encryption
|
744
|
+
/// NOTE: The RangePreview algorithm is experimental only. It is not intended
|
745
|
+
/// for public use.
|
746
|
+
#define MONGOCRYPT_ALGORITHM_RANGEPREVIEW_STR "RangePreview"
|
747
|
+
|
748
|
+
|
749
|
+
/**
|
750
|
+
* Identify the AWS KMS master key to use for creating a data key.
|
751
|
+
*
|
752
|
+
* This has been superseded by the more flexible:
|
753
|
+
* @ref mongocrypt_ctx_setopt_key_encryption_key
|
754
|
+
*
|
755
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
756
|
+
* @param[in] region The AWS region.
|
757
|
+
* @param[in] region_len The string length of @p region. Pass -1 to determine
|
758
|
+
* the string length with strlen (must be NULL terminated).
|
759
|
+
* @param[in] cmk The Amazon Resource Name (ARN) of the customer master key
|
760
|
+
* (CMK).
|
761
|
+
* @param[in] cmk_len The string length of @p cmk_len. Pass -1 to determine the
|
762
|
+
* string length with strlen (must be NULL terminated).
|
763
|
+
* @pre @p ctx has not been initialized.
|
764
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
765
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
766
|
+
*/
|
767
|
+
MONGOCRYPT_EXPORT
|
768
|
+
bool
|
769
|
+
mongocrypt_ctx_setopt_masterkey_aws (mongocrypt_ctx_t *ctx,
|
770
|
+
const char *region,
|
771
|
+
int32_t region_len,
|
772
|
+
const char *cmk,
|
773
|
+
int32_t cmk_len);
|
774
|
+
|
775
|
+
|
776
|
+
/**
|
777
|
+
* Identify a custom AWS endpoint when creating a data key.
|
778
|
+
* This is used internally to construct the correct HTTP request
|
779
|
+
* (with the Host header set to this endpoint). This endpoint
|
780
|
+
* is persisted in the new data key, and will be returned via
|
781
|
+
* @ref mongocrypt_kms_ctx_endpoint.
|
782
|
+
*
|
783
|
+
* This has been superseded by the more flexible:
|
784
|
+
* @ref mongocrypt_ctx_setopt_key_encryption_key
|
785
|
+
*
|
786
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
787
|
+
* @param[in] endpoint The endpoint.
|
788
|
+
* @param[in] endpoint_len The string length of @p endpoint. Pass -1 to
|
789
|
+
* determine the string length with strlen (must be NULL terminated).
|
790
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
791
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
792
|
+
*/
|
793
|
+
MONGOCRYPT_EXPORT
|
794
|
+
bool
|
795
|
+
mongocrypt_ctx_setopt_masterkey_aws_endpoint (mongocrypt_ctx_t *ctx,
|
796
|
+
const char *endpoint,
|
797
|
+
int32_t endpoint_len);
|
798
|
+
|
799
|
+
/**
|
800
|
+
* Set the master key to "local" for creating a data key.
|
801
|
+
* This has been superseded by the more flexible:
|
802
|
+
* @ref mongocrypt_ctx_setopt_key_encryption_key
|
803
|
+
*
|
804
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
805
|
+
* @pre @p ctx has not been initialized.
|
806
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
807
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
808
|
+
*/
|
809
|
+
MONGOCRYPT_EXPORT
|
810
|
+
bool
|
811
|
+
mongocrypt_ctx_setopt_masterkey_local (mongocrypt_ctx_t *ctx);
|
812
|
+
|
813
|
+
/**
|
814
|
+
* Set key encryption key document for creating a data key or for rewrapping
|
815
|
+
* datakeys.
|
816
|
+
*
|
817
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
818
|
+
* @param[in] bin BSON representing the key encryption key document with
|
819
|
+
* an additional "provider" field. The following forms are accepted:
|
820
|
+
*
|
821
|
+
* AWS
|
822
|
+
* {
|
823
|
+
* provider: "aws",
|
824
|
+
* region: <string>,
|
825
|
+
* key: <string>,
|
826
|
+
* endpoint: <optional string>
|
827
|
+
* }
|
828
|
+
*
|
829
|
+
* Azure
|
830
|
+
* {
|
831
|
+
* provider: "azure",
|
832
|
+
* keyVaultEndpoint: <string>,
|
833
|
+
* keyName: <string>,
|
834
|
+
* keyVersion: <optional string>
|
835
|
+
* }
|
836
|
+
*
|
837
|
+
* GCP
|
838
|
+
* {
|
839
|
+
* provider: "gcp",
|
840
|
+
* projectId: <string>,
|
841
|
+
* location: <string>,
|
842
|
+
* keyRing: <string>,
|
843
|
+
* keyName: <string>,
|
844
|
+
* keyVersion: <optional string>,
|
845
|
+
* endpoint: <optional string>
|
846
|
+
* }
|
847
|
+
*
|
848
|
+
* Local
|
849
|
+
* {
|
850
|
+
* provider: "local"
|
851
|
+
* }
|
852
|
+
*
|
853
|
+
* KMIP
|
854
|
+
* {
|
855
|
+
* provider: "kmip",
|
856
|
+
* keyId: <optional string>
|
857
|
+
* endpoint: <string>
|
858
|
+
* }
|
859
|
+
*
|
860
|
+
* @pre @p ctx has not been initialized.
|
861
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
862
|
+
* Retrieve it with @ref mongocrypt_ctx_status.
|
863
|
+
*/
|
864
|
+
MONGOCRYPT_EXPORT
|
865
|
+
bool
|
866
|
+
mongocrypt_ctx_setopt_key_encryption_key (mongocrypt_ctx_t *ctx,
|
867
|
+
mongocrypt_binary_t *bin);
|
868
|
+
|
869
|
+
|
870
|
+
/**
|
871
|
+
* Initialize a context to create a data key.
|
872
|
+
*
|
873
|
+
* Associated options:
|
874
|
+
* - @ref mongocrypt_ctx_setopt_masterkey_aws
|
875
|
+
* - @ref mongocrypt_ctx_setopt_masterkey_aws_endpoint
|
876
|
+
* - @ref mongocrypt_ctx_setopt_masterkey_local
|
877
|
+
*
|
878
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
879
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
880
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
881
|
+
* @pre A master key option has been set, and an associated KMS provider
|
882
|
+
* has been set on the parent @ref mongocrypt_t.
|
883
|
+
*/
|
884
|
+
MONGOCRYPT_EXPORT
|
885
|
+
bool
|
886
|
+
mongocrypt_ctx_datakey_init (mongocrypt_ctx_t *ctx);
|
887
|
+
|
888
|
+
/**
|
889
|
+
* Initialize a context for encryption.
|
890
|
+
*
|
891
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
892
|
+
* @param[in] db The database name.
|
893
|
+
* @param[in] db_len The byte length of @p db. Pass -1 to determine the string
|
894
|
+
* length with strlen (must
|
895
|
+
* be NULL terminated).
|
896
|
+
* @param[in] cmd The BSON command to be encrypted. The viewed data is copied.
|
897
|
+
* It is valid to destroy @p cmd with @ref mongocrypt_binary_destroy immediately
|
898
|
+
* after.
|
899
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
900
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
901
|
+
*/
|
902
|
+
MONGOCRYPT_EXPORT
|
903
|
+
bool
|
904
|
+
mongocrypt_ctx_encrypt_init (mongocrypt_ctx_t *ctx,
|
905
|
+
const char *db,
|
906
|
+
int32_t db_len,
|
907
|
+
mongocrypt_binary_t *cmd);
|
908
|
+
|
909
|
+
/**
|
910
|
+
* Explicit helper method to encrypt a single BSON object. Contexts
|
911
|
+
* created for explicit encryption will not go through mongocryptd.
|
912
|
+
*
|
913
|
+
* To specify a key_id, algorithm, or iv to use, please use the
|
914
|
+
* corresponding mongocrypt_setopt methods before calling this.
|
915
|
+
*
|
916
|
+
* This method expects the passed-in BSON to be of the form:
|
917
|
+
* { "v" : BSON value to encrypt }
|
918
|
+
*
|
919
|
+
* The value of "v" is expected to be the BSON value passed to a driver
|
920
|
+
* ClientEncryption.encrypt helper.
|
921
|
+
*
|
922
|
+
* Associated options for FLE 1:
|
923
|
+
* - @ref mongocrypt_ctx_setopt_key_id
|
924
|
+
* - @ref mongocrypt_ctx_setopt_key_alt_name
|
925
|
+
* - @ref mongocrypt_ctx_setopt_algorithm
|
926
|
+
*
|
927
|
+
* Associated options for Queryable Encryption:
|
928
|
+
* - @ref mongocrypt_ctx_setopt_key_id
|
929
|
+
* - @ref mongocrypt_ctx_setopt_index_key_id
|
930
|
+
* - @ref mongocrypt_ctx_setopt_contention_factor
|
931
|
+
* - @ref mongocrypt_ctx_setopt_query_type
|
932
|
+
* - @ref mongocrypt_ctx_setopt_algorithm_range
|
933
|
+
*
|
934
|
+
* An error is returned if FLE 1 and Queryable Encryption incompatible options
|
935
|
+
* are set.
|
936
|
+
*
|
937
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
938
|
+
* @param[in] msg A @ref mongocrypt_binary_t the plaintext BSON value. The
|
939
|
+
* viewed data is copied. It is valid to destroy @p msg with @ref
|
940
|
+
* mongocrypt_binary_destroy immediately after.
|
941
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
942
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
943
|
+
*/
|
944
|
+
MONGOCRYPT_EXPORT
|
945
|
+
bool
|
946
|
+
mongocrypt_ctx_explicit_encrypt_init (mongocrypt_ctx_t *ctx,
|
947
|
+
mongocrypt_binary_t *msg);
|
948
|
+
|
949
|
+
/**
|
950
|
+
* Explicit helper method to encrypt a Match Expression or Aggregate Expression.
|
951
|
+
* Contexts created for explicit encryption will not go through mongocryptd.
|
952
|
+
* Requires query_type to be "rangePreview".
|
953
|
+
* NOTE: The RangePreview algorithm is experimental only. It is not intended for
|
954
|
+
* public use.
|
955
|
+
*
|
956
|
+
* This method expects the passed-in BSON to be of the form:
|
957
|
+
* { "v" : FLE2RangeFindDriverSpec }
|
958
|
+
*
|
959
|
+
* FLE2RangeFindDriverSpec is a BSON document with one of these forms:
|
960
|
+
*
|
961
|
+
* 1. A Match Expression of this form:
|
962
|
+
* {$and: [{<field>: {<op>: <value1>, {<field>: {<op>: <value2> }}]}
|
963
|
+
* 2. An Aggregate Expression of this form:
|
964
|
+
* {$and: [{<op>: [<fieldpath>, <value1>]}, {<op>: [<fieldpath>, <value2>]}]
|
965
|
+
*
|
966
|
+
* <op> may be $lt, $lte, $gt, or $gte.
|
967
|
+
*
|
968
|
+
* The value of "v" is expected to be the BSON value passed to a driver
|
969
|
+
* ClientEncryption.encryptExpression helper.
|
970
|
+
*
|
971
|
+
* Associated options for FLE 1:
|
972
|
+
* - @ref mongocrypt_ctx_setopt_key_id
|
973
|
+
* - @ref mongocrypt_ctx_setopt_key_alt_name
|
974
|
+
* - @ref mongocrypt_ctx_setopt_algorithm
|
975
|
+
*
|
976
|
+
* Associated options for Queryable Encryption:
|
977
|
+
* - @ref mongocrypt_ctx_setopt_key_id
|
978
|
+
* - @ref mongocrypt_ctx_setopt_index_key_id
|
979
|
+
* - @ref mongocrypt_ctx_setopt_contention_factor
|
980
|
+
* - @ref mongocrypt_ctx_setopt_query_type
|
981
|
+
* - @ref mongocrypt_ctx_setopt_algorithm_range
|
982
|
+
*
|
983
|
+
* An error is returned if FLE 1 and Queryable Encryption incompatible options
|
984
|
+
* are set.
|
985
|
+
*
|
986
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
987
|
+
* @param[in] msg A @ref mongocrypt_binary_t the plaintext BSON value. The
|
988
|
+
* viewed data is copied. It is valid to destroy @p msg with @ref
|
989
|
+
* mongocrypt_binary_destroy immediately after.
|
990
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
991
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
992
|
+
*/
|
993
|
+
MONGOCRYPT_EXPORT
|
994
|
+
bool
|
995
|
+
mongocrypt_ctx_explicit_encrypt_expression_init (mongocrypt_ctx_t *ctx,
|
996
|
+
mongocrypt_binary_t *msg);
|
997
|
+
|
998
|
+
|
999
|
+
/**
|
1000
|
+
* Initialize a context for decryption.
|
1001
|
+
*
|
1002
|
+
* This method expects the passed-in BSON to be of the form:
|
1003
|
+
* { "v" : BSON value to encrypt }
|
1004
|
+
*
|
1005
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1006
|
+
* @param[in] doc The document to be decrypted. The viewed data is copied. It is
|
1007
|
+
* valid to destroy @p doc with @ref mongocrypt_binary_destroy immediately
|
1008
|
+
* after.
|
1009
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1010
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1011
|
+
*/
|
1012
|
+
MONGOCRYPT_EXPORT
|
1013
|
+
bool
|
1014
|
+
mongocrypt_ctx_decrypt_init (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
|
1015
|
+
|
1016
|
+
|
1017
|
+
/**
|
1018
|
+
* Explicit helper method to decrypt a single BSON object.
|
1019
|
+
*
|
1020
|
+
* Pass the binary encoding of a BSON document containing the BSON value to
|
1021
|
+
* encrypt like the following:
|
1022
|
+
*
|
1023
|
+
* { "v" : (BSON BINARY value of subtype 6) }
|
1024
|
+
*
|
1025
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1026
|
+
* @param[in] msg A @ref mongocrypt_binary_t the encrypted BSON. The viewed data
|
1027
|
+
* is copied. It is valid to destroy @p msg with @ref mongocrypt_binary_destroy
|
1028
|
+
* immediately after.
|
1029
|
+
*/
|
1030
|
+
MONGOCRYPT_EXPORT
|
1031
|
+
bool
|
1032
|
+
mongocrypt_ctx_explicit_decrypt_init (mongocrypt_ctx_t *ctx,
|
1033
|
+
mongocrypt_binary_t *msg);
|
1034
|
+
|
1035
|
+
|
1036
|
+
/**
|
1037
|
+
* @brief Initialize a context to rewrap datakeys.
|
1038
|
+
*
|
1039
|
+
* Associated options:
|
1040
|
+
* - @ref mongocrypt_ctx_setopt_key_encryption_key
|
1041
|
+
*
|
1042
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1043
|
+
* @param[in] filter The filter to use for the find command on the key vault
|
1044
|
+
* collection to retrieve datakeys to rewrap.
|
1045
|
+
* @return A boolean indicating success. If false, an error status is set.
|
1046
|
+
* Retrieve it with @ref mongocrypt_ctx_status.
|
1047
|
+
*/
|
1048
|
+
MONGOCRYPT_EXPORT
|
1049
|
+
bool
|
1050
|
+
mongocrypt_ctx_rewrap_many_datakey_init (mongocrypt_ctx_t *ctx,
|
1051
|
+
mongocrypt_binary_t *filter);
|
1052
|
+
|
1053
|
+
|
1054
|
+
/**
|
1055
|
+
* Indicates the state of the @ref mongocrypt_ctx_t. Each state requires
|
1056
|
+
* different handling. See [the integration
|
1057
|
+
* guide](https://github.com/mongodb/libmongocrypt/blob/master/integrating.md#state-machine)
|
1058
|
+
* for information on what to do for each state.
|
1059
|
+
*/
|
1060
|
+
typedef enum {
|
1061
|
+
MONGOCRYPT_CTX_ERROR = 0,
|
1062
|
+
MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1, /* run on main MongoClient */
|
1063
|
+
MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2, /* run on mongocryptd. */
|
1064
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3, /* run on key vault */
|
1065
|
+
MONGOCRYPT_CTX_NEED_KMS = 4,
|
1066
|
+
MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7, /* fetch/renew KMS credentials */
|
1067
|
+
MONGOCRYPT_CTX_READY = 5, /* ready for encryption/decryption */
|
1068
|
+
MONGOCRYPT_CTX_DONE = 6,
|
1069
|
+
} mongocrypt_ctx_state_t;
|
1070
|
+
|
1071
|
+
|
1072
|
+
/**
|
1073
|
+
* Get the current state of a context.
|
1074
|
+
*
|
1075
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1076
|
+
* @returns A @ref mongocrypt_ctx_state_t.
|
1077
|
+
*/
|
1078
|
+
MONGOCRYPT_EXPORT
|
1079
|
+
mongocrypt_ctx_state_t
|
1080
|
+
mongocrypt_ctx_state (mongocrypt_ctx_t *ctx);
|
1081
|
+
|
1082
|
+
|
1083
|
+
/**
|
1084
|
+
* Get BSON necessary to run the mongo operation when mongocrypt_ctx_t
|
1085
|
+
* is in MONGOCRYPT_CTX_NEED_MONGO_* states.
|
1086
|
+
*
|
1087
|
+
* @p op_bson is a BSON document to be used for the operation.
|
1088
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_COLLINFO it is a listCollections filter.
|
1089
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_KEYS it is a find filter.
|
1090
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_MARKINGS it is a command to send to
|
1091
|
+
* mongocryptd.
|
1092
|
+
*
|
1093
|
+
* The lifetime of @p op_bson is tied to the lifetime of @p ctx. It is valid
|
1094
|
+
* until @ref mongocrypt_ctx_destroy is called.
|
1095
|
+
*
|
1096
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1097
|
+
* @param[out] op_bson A BSON document for the MongoDB operation. The data
|
1098
|
+
* viewed by @p op_bson is guaranteed to be valid until @p ctx is destroyed with
|
1099
|
+
* @ref mongocrypt_ctx_destroy.
|
1100
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1101
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1102
|
+
*/
|
1103
|
+
MONGOCRYPT_EXPORT
|
1104
|
+
bool
|
1105
|
+
mongocrypt_ctx_mongo_op (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
|
1106
|
+
|
1107
|
+
|
1108
|
+
/**
|
1109
|
+
* Feed a BSON reply or result when mongocrypt_ctx_t is in
|
1110
|
+
* MONGOCRYPT_CTX_NEED_MONGO_* states. This may be called multiple times
|
1111
|
+
* depending on the operation.
|
1112
|
+
*
|
1113
|
+
* reply is a BSON document result being fed back for this operation.
|
1114
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_COLLINFO it is a doc from a listCollections
|
1115
|
+
* cursor. (Note, if listCollections returned no result, do not call this
|
1116
|
+
* function.)
|
1117
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_KEYS it is a doc from a find cursor.
|
1118
|
+
* (Note, if find returned no results, do not call this function. reply must
|
1119
|
+
* not
|
1120
|
+
* be NULL.)
|
1121
|
+
* - For MONGOCRYPT_CTX_NEED_MONGO_MARKINGS it is a reply from mongocryptd.
|
1122
|
+
*
|
1123
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1124
|
+
* @param[in] reply A BSON document for the MongoDB operation. The viewed data
|
1125
|
+
* is copied. It is valid to destroy @p reply with @ref
|
1126
|
+
* mongocrypt_binary_destroy immediately after.
|
1127
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1128
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1129
|
+
*/
|
1130
|
+
MONGOCRYPT_EXPORT
|
1131
|
+
bool
|
1132
|
+
mongocrypt_ctx_mongo_feed (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
|
1133
|
+
|
1134
|
+
|
1135
|
+
/**
|
1136
|
+
* Call when done feeding the reply (or replies) back to the context.
|
1137
|
+
*
|
1138
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1139
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1140
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1141
|
+
*/
|
1142
|
+
MONGOCRYPT_EXPORT
|
1143
|
+
bool
|
1144
|
+
mongocrypt_ctx_mongo_done (mongocrypt_ctx_t *ctx);
|
1145
|
+
|
1146
|
+
|
1147
|
+
/**
|
1148
|
+
* Manages a single KMS HTTP request/response.
|
1149
|
+
*/
|
1150
|
+
typedef struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t;
|
1151
|
+
|
1152
|
+
|
1153
|
+
/**
|
1154
|
+
* Get the next KMS handle.
|
1155
|
+
*
|
1156
|
+
* Multiple KMS handles may be retrieved at once. Drivers may do this to fan
|
1157
|
+
* out multiple concurrent KMS HTTP requests. Feeding multiple KMS requests
|
1158
|
+
* is thread-safe.
|
1159
|
+
*
|
1160
|
+
* If KMS handles are being handled synchronously, the driver can reuse the same
|
1161
|
+
* TLS socket to send HTTP requests and receive responses.
|
1162
|
+
*
|
1163
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1164
|
+
* @returns a new @ref mongocrypt_kms_ctx_t or NULL.
|
1165
|
+
*/
|
1166
|
+
MONGOCRYPT_EXPORT
|
1167
|
+
mongocrypt_kms_ctx_t *
|
1168
|
+
mongocrypt_ctx_next_kms_ctx (mongocrypt_ctx_t *ctx);
|
1169
|
+
|
1170
|
+
|
1171
|
+
/**
|
1172
|
+
* Get the HTTP request message for a KMS handle.
|
1173
|
+
*
|
1174
|
+
* The lifetime of @p msg is tied to the lifetime of @p kms. It is valid
|
1175
|
+
* until @ref mongocrypt_ctx_kms_done is called.
|
1176
|
+
*
|
1177
|
+
* @param[in] kms A @ref mongocrypt_kms_ctx_t.
|
1178
|
+
* @param[out] msg The HTTP request to send to KMS. The data viewed by @p msg is
|
1179
|
+
* guaranteed to be valid until the call of @ref mongocrypt_ctx_kms_done of the
|
1180
|
+
* parent @ref mongocrypt_ctx_t.
|
1181
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1182
|
+
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1183
|
+
*/
|
1184
|
+
MONGOCRYPT_EXPORT
|
1185
|
+
bool
|
1186
|
+
mongocrypt_kms_ctx_message (mongocrypt_kms_ctx_t *kms,
|
1187
|
+
mongocrypt_binary_t *msg);
|
1188
|
+
|
1189
|
+
|
1190
|
+
/**
|
1191
|
+
* Get the hostname from which to connect over TLS.
|
1192
|
+
*
|
1193
|
+
* The storage for @p endpoint is not owned by the caller, but
|
1194
|
+
* is valid until calling @ref mongocrypt_ctx_kms_done.
|
1195
|
+
*
|
1196
|
+
* @param[in] kms A @ref mongocrypt_kms_ctx_t.
|
1197
|
+
* @param[out] endpoint The output endpoint as a NULL terminated string.
|
1198
|
+
* The endpoint consists of a hostname and port separated by a colon.
|
1199
|
+
* E.g. "example.com:123". A port is always present.
|
1200
|
+
*
|
1201
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1202
|
+
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1203
|
+
*/
|
1204
|
+
MONGOCRYPT_EXPORT
|
1205
|
+
bool
|
1206
|
+
mongocrypt_kms_ctx_endpoint (mongocrypt_kms_ctx_t *kms, const char **endpoint);
|
1207
|
+
|
1208
|
+
|
1209
|
+
/**
|
1210
|
+
* Indicates how many bytes to feed into @ref mongocrypt_kms_ctx_feed.
|
1211
|
+
*
|
1212
|
+
* @param[in] kms The @ref mongocrypt_kms_ctx_t.
|
1213
|
+
* @returns The number of requested bytes.
|
1214
|
+
*/
|
1215
|
+
MONGOCRYPT_EXPORT
|
1216
|
+
uint32_t
|
1217
|
+
mongocrypt_kms_ctx_bytes_needed (mongocrypt_kms_ctx_t *kms);
|
1218
|
+
|
1219
|
+
|
1220
|
+
/**
|
1221
|
+
* Feed bytes from the HTTP response.
|
1222
|
+
*
|
1223
|
+
* Feeding more bytes than what has been returned in @ref
|
1224
|
+
* mongocrypt_kms_ctx_bytes_needed is an error.
|
1225
|
+
*
|
1226
|
+
* @param[in] kms The @ref mongocrypt_kms_ctx_t.
|
1227
|
+
* @param[in] bytes The bytes to feed. The viewed data is copied. It is valid to
|
1228
|
+
* destroy @p bytes with @ref mongocrypt_binary_destroy immediately after.
|
1229
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1230
|
+
* Retrieve it with @ref mongocrypt_kms_ctx_status
|
1231
|
+
*/
|
1232
|
+
MONGOCRYPT_EXPORT
|
1233
|
+
bool
|
1234
|
+
mongocrypt_kms_ctx_feed (mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
|
1235
|
+
|
1236
|
+
|
1237
|
+
/**
|
1238
|
+
* Get the status associated with a @ref mongocrypt_kms_ctx_t object.
|
1239
|
+
*
|
1240
|
+
* @param[in] kms The @ref mongocrypt_kms_ctx_t object.
|
1241
|
+
* @param[out] status Receives the status.
|
1242
|
+
*
|
1243
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1244
|
+
*/
|
1245
|
+
MONGOCRYPT_EXPORT
|
1246
|
+
bool
|
1247
|
+
mongocrypt_kms_ctx_status (mongocrypt_kms_ctx_t *kms,
|
1248
|
+
mongocrypt_status_t *status);
|
1249
|
+
|
1250
|
+
/**
|
1251
|
+
* Get the KMS provider identifier associated with this KMS request.
|
1252
|
+
*
|
1253
|
+
* This is used to conditionally configure TLS connections based on the KMS
|
1254
|
+
* request. It is useful for KMIP, which authenticates with a client
|
1255
|
+
* certificate.
|
1256
|
+
*
|
1257
|
+
* @param[in] kms The @ref mongocrypt_kms_ctx_t object.
|
1258
|
+
* @param[out] len Receives the length of the returned string. It may be NULL.
|
1259
|
+
* If it is not NULL, it is set to the length of the returned string without
|
1260
|
+
* the NULL terminator.
|
1261
|
+
*
|
1262
|
+
* @returns One of the NULL terminated static strings: "aws", "azure", "gcp", or
|
1263
|
+
* "kmip".
|
1264
|
+
*/
|
1265
|
+
MONGOCRYPT_EXPORT
|
1266
|
+
const char *
|
1267
|
+
mongocrypt_kms_ctx_get_kms_provider (mongocrypt_kms_ctx_t *kms, uint32_t *len);
|
1268
|
+
|
1269
|
+
|
1270
|
+
/**
|
1271
|
+
* Call when done handling all KMS contexts.
|
1272
|
+
*
|
1273
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1274
|
+
*
|
1275
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1276
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1277
|
+
*/
|
1278
|
+
MONGOCRYPT_EXPORT
|
1279
|
+
bool
|
1280
|
+
mongocrypt_ctx_kms_done (mongocrypt_ctx_t *ctx);
|
1281
|
+
|
1282
|
+
|
1283
|
+
/**
|
1284
|
+
* Call in response to the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state
|
1285
|
+
* to set per-context KMS provider settings. These follow the same format
|
1286
|
+
* as @ref mongocrypt_setopt_kms_providers. If no keys are present in the
|
1287
|
+
* BSON input, the KMS provider settings configured for the @ref mongocrypt_t
|
1288
|
+
* at initialization are used.
|
1289
|
+
*
|
1290
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1291
|
+
* @param[in] kms_providers_definition A BSON document mapping the KMS provider
|
1292
|
+
* names to credentials.
|
1293
|
+
*
|
1294
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1295
|
+
* Retrieve it with @ref mongocrypt_ctx_status.
|
1296
|
+
*/
|
1297
|
+
MONGOCRYPT_EXPORT
|
1298
|
+
bool
|
1299
|
+
mongocrypt_ctx_provide_kms_providers (
|
1300
|
+
mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition);
|
1301
|
+
|
1302
|
+
/**
|
1303
|
+
* Perform the final encryption or decryption.
|
1304
|
+
*
|
1305
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1306
|
+
* @param[out] out The final BSON. The data viewed by @p out is guaranteed
|
1307
|
+
* to be valid until @p ctx is destroyed with @ref mongocrypt_ctx_destroy.
|
1308
|
+
* The meaning of this BSON depends on the type of @p ctx.
|
1309
|
+
*
|
1310
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_encrypt_init, then
|
1311
|
+
* this BSON is the (possibly) encrypted command to send to the server.
|
1312
|
+
*
|
1313
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_decrypt_init, then
|
1314
|
+
* this BSON is the decrypted result to return to the user.
|
1315
|
+
*
|
1316
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_explicit_encrypt_init,
|
1317
|
+
* then this BSON has the form { "v": (BSON binary) } where the BSON binary
|
1318
|
+
* is the resulting encrypted value.
|
1319
|
+
*
|
1320
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_explicit_decrypt_init,
|
1321
|
+
* then this BSON has the form { "v": (BSON value) } where the BSON value
|
1322
|
+
* is the resulting decrypted value.
|
1323
|
+
*
|
1324
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_datakey_init, then
|
1325
|
+
* this BSON is the document containing the new data key to be inserted into
|
1326
|
+
* the key vault collection.
|
1327
|
+
*
|
1328
|
+
* If @p ctx was initialized with @ref mongocrypt_ctx_rewrap_many_datakey_init,
|
1329
|
+
* then this BSON has the form:
|
1330
|
+
* { "v": [{ "_id": ..., "keyMaterial": ..., "masterKey": ... }, ...] }
|
1331
|
+
* where each BSON document in the array contains the updated fields of a
|
1332
|
+
* rewrapped datakey to be bulk-updated into the key vault collection.
|
1333
|
+
* Note: the updateDate field should be updated using the $currentDate operator.
|
1334
|
+
*
|
1335
|
+
* @returns a bool indicating success. If false, an error status is set.
|
1336
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1337
|
+
*/
|
1338
|
+
MONGOCRYPT_EXPORT
|
1339
|
+
bool
|
1340
|
+
mongocrypt_ctx_finalize (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
|
1341
|
+
|
1342
|
+
|
1343
|
+
/**
|
1344
|
+
* Destroy and free all memory associated with a @ref mongocrypt_ctx_t.
|
1345
|
+
*
|
1346
|
+
* @param[in] ctx A @ref mongocrypt_ctx_t.
|
1347
|
+
*/
|
1348
|
+
MONGOCRYPT_EXPORT
|
1349
|
+
void
|
1350
|
+
mongocrypt_ctx_destroy (mongocrypt_ctx_t *ctx);
|
1351
|
+
|
1352
|
+
/**
|
1353
|
+
* An crypto AES-256-CBC encrypt or decrypt function.
|
1354
|
+
*
|
1355
|
+
* Note, @p in is already padded. Encrypt with padding disabled.
|
1356
|
+
* @param[in] ctx An optional context object that may have been set when hooks
|
1357
|
+
* were enabled.
|
1358
|
+
* @param[in] key An encryption key (32 bytes for AES_256).
|
1359
|
+
* @param[in] iv An initialization vector (16 bytes for AES_256);
|
1360
|
+
* @param[in] in The input.
|
1361
|
+
* @param[out] out A preallocated byte array for the output. See @ref
|
1362
|
+
* mongocrypt_binary_data.
|
1363
|
+
* @param[out] bytes_written Set this to the number of bytes written to @p out.
|
1364
|
+
* @param[out] status An optional status to pass error messages. See @ref
|
1365
|
+
* mongocrypt_status_set.
|
1366
|
+
* @returns A boolean indicating success. If returning false, set @p status
|
1367
|
+
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1368
|
+
*/
|
1369
|
+
typedef bool (*mongocrypt_crypto_fn) (void *ctx,
|
1370
|
+
mongocrypt_binary_t *key,
|
1371
|
+
mongocrypt_binary_t *iv,
|
1372
|
+
mongocrypt_binary_t *in,
|
1373
|
+
mongocrypt_binary_t *out,
|
1374
|
+
uint32_t *bytes_written,
|
1375
|
+
mongocrypt_status_t *status);
|
1376
|
+
|
1377
|
+
/**
|
1378
|
+
* A crypto signature or HMAC function.
|
1379
|
+
*
|
1380
|
+
* Currently used in callbacks for HMAC SHA-512, HMAC SHA-256, and RSA SHA-256
|
1381
|
+
* signature.
|
1382
|
+
*
|
1383
|
+
* @param[in] ctx An optional context object that may have been set when hooks
|
1384
|
+
* were enabled.
|
1385
|
+
* @param[in] key An encryption key (32 bytes for HMAC_SHA512).
|
1386
|
+
* @param[in] in The input.
|
1387
|
+
* @param[out] out A preallocated byte array for the output. See @ref
|
1388
|
+
* mongocrypt_binary_data.
|
1389
|
+
* @param[out] status An optional status to pass error messages. See @ref
|
1390
|
+
* mongocrypt_status_set.
|
1391
|
+
* @returns A boolean indicating success. If returning false, set @p status
|
1392
|
+
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1393
|
+
*/
|
1394
|
+
typedef bool (*mongocrypt_hmac_fn) (void *ctx,
|
1395
|
+
mongocrypt_binary_t *key,
|
1396
|
+
mongocrypt_binary_t *in,
|
1397
|
+
mongocrypt_binary_t *out,
|
1398
|
+
mongocrypt_status_t *status);
|
1399
|
+
|
1400
|
+
|
1401
|
+
/**
|
1402
|
+
* A crypto hash (SHA-256) function.
|
1403
|
+
*
|
1404
|
+
* @param[in] ctx An optional context object that may have been set when hooks
|
1405
|
+
* were enabled.
|
1406
|
+
* @param[in] in The input.
|
1407
|
+
* @param[out] out A preallocated byte array for the output. See @ref
|
1408
|
+
* mongocrypt_binary_data.
|
1409
|
+
* @param[out] status An optional status to pass error messages. See @ref
|
1410
|
+
* mongocrypt_status_set.
|
1411
|
+
* @returns A boolean indicating success. If returning false, set @p status
|
1412
|
+
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1413
|
+
*/
|
1414
|
+
typedef bool (*mongocrypt_hash_fn) (void *ctx,
|
1415
|
+
mongocrypt_binary_t *in,
|
1416
|
+
mongocrypt_binary_t *out,
|
1417
|
+
mongocrypt_status_t *status);
|
1418
|
+
|
1419
|
+
/**
|
1420
|
+
* A crypto secure random function.
|
1421
|
+
*
|
1422
|
+
* @param[in] ctx An optional context object that may have been set when hooks
|
1423
|
+
* were enabled.
|
1424
|
+
* @param[out] out A preallocated byte array for the output. See @ref
|
1425
|
+
* mongocrypt_binary_data.
|
1426
|
+
* @param[in] count The number of random bytes requested.
|
1427
|
+
* @param[out] status An optional status to pass error messages. See @ref
|
1428
|
+
* mongocrypt_status_set.
|
1429
|
+
* @returns A boolean indicating success. If returning false, set @p status
|
1430
|
+
* with a message indiciating the error using @ref mongocrypt_status_set.
|
1431
|
+
*/
|
1432
|
+
typedef bool (*mongocrypt_random_fn) (void *ctx,
|
1433
|
+
mongocrypt_binary_t *out,
|
1434
|
+
uint32_t count,
|
1435
|
+
mongocrypt_status_t *status);
|
1436
|
+
|
1437
|
+
MONGOCRYPT_EXPORT
|
1438
|
+
bool
|
1439
|
+
mongocrypt_setopt_crypto_hooks (mongocrypt_t *crypt,
|
1440
|
+
mongocrypt_crypto_fn aes_256_cbc_encrypt,
|
1441
|
+
mongocrypt_crypto_fn aes_256_cbc_decrypt,
|
1442
|
+
mongocrypt_random_fn random,
|
1443
|
+
mongocrypt_hmac_fn hmac_sha_512,
|
1444
|
+
mongocrypt_hmac_fn hmac_sha_256,
|
1445
|
+
mongocrypt_hash_fn sha_256,
|
1446
|
+
void *ctx);
|
1447
|
+
|
1448
|
+
/**
|
1449
|
+
* Set a crypto hook for the AES256-CTR operations.
|
1450
|
+
*
|
1451
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
1452
|
+
* @param[in] aes_256_ctr_encrypt The crypto callback function for encrypt
|
1453
|
+
* operation.
|
1454
|
+
* @param[in] aes_256_ctr_decrypt The crypto callback function for decrypt
|
1455
|
+
* operation.
|
1456
|
+
* @param[in] ctx A context passed as an argument to the crypto callback
|
1457
|
+
* every invocation.
|
1458
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
1459
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1460
|
+
* Retrieve it with @ref mongocrypt_status
|
1461
|
+
*
|
1462
|
+
*/
|
1463
|
+
MONGOCRYPT_EXPORT
|
1464
|
+
bool
|
1465
|
+
mongocrypt_setopt_aes_256_ctr (mongocrypt_t *crypt,
|
1466
|
+
mongocrypt_crypto_fn aes_256_ctr_encrypt,
|
1467
|
+
mongocrypt_crypto_fn aes_256_ctr_decrypt,
|
1468
|
+
void *ctx);
|
1469
|
+
|
1470
|
+
/**
|
1471
|
+
* Set an AES256-ECB crypto hook for the AES256-CTR operations. If CTR hook was
|
1472
|
+
* configured using @ref mongocrypt_setopt_aes_256_ctr, ECB hook will be
|
1473
|
+
* ignored.
|
1474
|
+
*
|
1475
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
1476
|
+
* @param[in] aes_256_ecb_encrypt The crypto callback function for encrypt
|
1477
|
+
* operation.
|
1478
|
+
* @param[in] ctx A context passed as an argument to the crypto callback
|
1479
|
+
* every invocation.
|
1480
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
1481
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1482
|
+
* Retrieve it with @ref mongocrypt_status
|
1483
|
+
*
|
1484
|
+
*/
|
1485
|
+
MONGOCRYPT_EXPORT
|
1486
|
+
bool
|
1487
|
+
mongocrypt_setopt_aes_256_ecb (mongocrypt_t *crypt,
|
1488
|
+
mongocrypt_crypto_fn aes_256_ecb_encrypt,
|
1489
|
+
void *ctx);
|
1490
|
+
|
1491
|
+
/**
|
1492
|
+
* Set a crypto hook for the RSASSA-PKCS1-v1_5 algorithm with a SHA-256 hash.
|
1493
|
+
*
|
1494
|
+
* See: https://tools.ietf.org/html/rfc3447#section-8.2
|
1495
|
+
*
|
1496
|
+
* Note: this function has the wrong name. It should be:
|
1497
|
+
* mongocrypt_setopt_crypto_hook_sign_rsassa_pkcs1_v1_5
|
1498
|
+
*
|
1499
|
+
* @param[in] crypt The @ref mongocrypt_t object.
|
1500
|
+
* @param[in] sign_rsaes_pkcs1_v1_5 The crypto callback function.
|
1501
|
+
* @param[in] sign_ctx A context passed as an argument to the crypto callback
|
1502
|
+
* every invocation.
|
1503
|
+
* @pre @ref mongocrypt_init has not been called on @p crypt.
|
1504
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1505
|
+
* Retrieve it with @ref mongocrypt_status
|
1506
|
+
*
|
1507
|
+
*/
|
1508
|
+
MONGOCRYPT_EXPORT
|
1509
|
+
bool
|
1510
|
+
mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5 (
|
1511
|
+
mongocrypt_t *crypt,
|
1512
|
+
mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
|
1513
|
+
void *sign_ctx);
|
1514
|
+
|
1515
|
+
/**
|
1516
|
+
* @brief Opt-into skipping query analysis.
|
1517
|
+
*
|
1518
|
+
* If opted in:
|
1519
|
+
* - The crypt_shared library will not attempt to be loaded.
|
1520
|
+
* - A mongocrypt_ctx_t will never enter the MONGOCRYPT_CTX_NEED_MARKINGS state.
|
1521
|
+
*
|
1522
|
+
* @param[in] crypt The @ref mongocrypt_t object to update
|
1523
|
+
*/
|
1524
|
+
MONGOCRYPT_EXPORT
|
1525
|
+
void
|
1526
|
+
mongocrypt_setopt_bypass_query_analysis (mongocrypt_t *crypt);
|
1527
|
+
|
1528
|
+
/**
|
1529
|
+
* Set the contention factor used for explicit encryption.
|
1530
|
+
* The contention factor is only used for indexed Queryable Encryption.
|
1531
|
+
*
|
1532
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1533
|
+
* @param[in] contention_factor
|
1534
|
+
* @pre @p ctx has not been initialized.
|
1535
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1536
|
+
* Retrieve it with @ref mongocrypt_ctx_status.
|
1537
|
+
*/
|
1538
|
+
MONGOCRYPT_EXPORT
|
1539
|
+
bool
|
1540
|
+
mongocrypt_ctx_setopt_contention_factor (mongocrypt_ctx_t *ctx,
|
1541
|
+
int64_t contention_factor);
|
1542
|
+
|
1543
|
+
/**
|
1544
|
+
* Set the index key id to use for explicit Queryable Encryption.
|
1545
|
+
*
|
1546
|
+
* If the index key id not set, the key id from @ref
|
1547
|
+
* mongocrypt_ctx_setopt_key_id is used.
|
1548
|
+
*
|
1549
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1550
|
+
* @param[in] key_id The binary corresponding to the _id (a UUID) of the data
|
1551
|
+
* key to use from the key vault collection. Note, the UUID must be encoded with
|
1552
|
+
* RFC-4122 byte order. The viewed data is copied. It is valid to destroy
|
1553
|
+
* @p key_id with @ref mongocrypt_binary_destroy immediately after.
|
1554
|
+
* @pre @p ctx has not been initialized.
|
1555
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1556
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1557
|
+
*/
|
1558
|
+
MONGOCRYPT_EXPORT
|
1559
|
+
bool
|
1560
|
+
mongocrypt_ctx_setopt_index_key_id (mongocrypt_ctx_t *ctx,
|
1561
|
+
mongocrypt_binary_t *key_id);
|
1562
|
+
|
1563
|
+
|
1564
|
+
/**
|
1565
|
+
* Set the query type to use for explicit Queryable Encryption.
|
1566
|
+
*
|
1567
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1568
|
+
* @param[in] query_type The query type string
|
1569
|
+
* @param[in] len The length of query_type, or -1 for automatic
|
1570
|
+
* @pre @p ctx has not been initialized.
|
1571
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1572
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1573
|
+
*/
|
1574
|
+
MONGOCRYPT_EXPORT
|
1575
|
+
bool
|
1576
|
+
mongocrypt_ctx_setopt_query_type (mongocrypt_ctx_t *ctx,
|
1577
|
+
const char *query_type,
|
1578
|
+
int len);
|
1579
|
+
|
1580
|
+
/**
|
1581
|
+
* Set options for explicit encryption with the "rangePreview" algorithm.
|
1582
|
+
* NOTE: The RangePreview algorithm is experimental only. It is not intended for
|
1583
|
+
* public use.
|
1584
|
+
*
|
1585
|
+
* @p opts is a BSON document of the form:
|
1586
|
+
* {
|
1587
|
+
* "min": Optional<BSON value>,
|
1588
|
+
* "max": Optional<BSON value>,
|
1589
|
+
* "sparsity": Int64,
|
1590
|
+
* "precision": Optional<Int32>
|
1591
|
+
* }
|
1592
|
+
*
|
1593
|
+
* @param[in] ctx The @ref mongocrypt_ctx_t object.
|
1594
|
+
* @param[in] opts BSON.
|
1595
|
+
* @pre @p ctx has not been initialized.
|
1596
|
+
* @returns A boolean indicating success. If false, an error status is set.
|
1597
|
+
* Retrieve it with @ref mongocrypt_ctx_status
|
1598
|
+
*/
|
1599
|
+
MONGOCRYPT_EXPORT
|
1600
|
+
bool
|
1601
|
+
mongocrypt_ctx_setopt_algorithm_range (mongocrypt_ctx_t *ctx,
|
1602
|
+
mongocrypt_binary_t *opts);
|
1603
|
+
|
1604
|
+
/// String constants for setopt_query_type
|
1605
|
+
#define MONGOCRYPT_QUERY_TYPE_EQUALITY_STR "equality"
|
1606
|
+
// NOTE: The RangePreview algorithm is experimental only. It is not intended for
|
1607
|
+
// public use.
|
1608
|
+
#define MONGOCRYPT_QUERY_TYPE_RANGEPREVIEW_STR "rangePreview"
|
1609
|
+
|
1610
|
+
#endif /* MONGOCRYPT_H */
|