libmongocrypt-helper 1.6.1.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 +15 -1
- data.tar.gz.sig +0 -0
- metadata +1019 -32
- metadata.gz.sig +0 -0
- data/so/libmongocrypt.so +0 -0
@@ -0,0 +1,1061 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2022-present MongoDB, Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include "test-mongocrypt.h"
|
18
|
+
|
19
|
+
|
20
|
+
#define TEST_REWRAP_MASTER_KEY_ID_OLD \
|
21
|
+
"arn:aws:kms:us-east-1:579766882180:key/" \
|
22
|
+
"89fcc2c4-08b0-4bd9-9f25-e30687b580d0"
|
23
|
+
|
24
|
+
#define TEST_REWRAP_MASTER_KEY_ID_NEW \
|
25
|
+
"arn:aws:kms:us-east-1:579766882180:key/" \
|
26
|
+
"061334ae-07a8-4ceb-a813-8135540e837d"
|
27
|
+
|
28
|
+
|
29
|
+
typedef struct {
|
30
|
+
_mongocrypt_buffer_t id;
|
31
|
+
const char *kek_id;
|
32
|
+
_mongocrypt_buffer_t key_material;
|
33
|
+
int64_t creation_date;
|
34
|
+
int64_t update_date;
|
35
|
+
_mongocrypt_key_alt_name_t *key_alt_names;
|
36
|
+
} _test_datakey_fields_t;
|
37
|
+
|
38
|
+
static _test_datakey_fields_t *
|
39
|
+
_test_datakey_fields_new (void)
|
40
|
+
{
|
41
|
+
return bson_malloc0 (sizeof (_test_datakey_fields_t));
|
42
|
+
}
|
43
|
+
|
44
|
+
static void
|
45
|
+
_test_datakey_fields_destroy (_test_datakey_fields_t *fields)
|
46
|
+
{
|
47
|
+
if (!fields) {
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
|
51
|
+
_mongocrypt_key_alt_name_destroy_all (fields->key_alt_names);
|
52
|
+
|
53
|
+
bson_free (fields);
|
54
|
+
}
|
55
|
+
|
56
|
+
static _mongocrypt_buffer_t
|
57
|
+
_find_key_id (mongocrypt_binary_t *key)
|
58
|
+
{
|
59
|
+
bson_t bson;
|
60
|
+
bson_iter_t iter;
|
61
|
+
_mongocrypt_buffer_t buf;
|
62
|
+
|
63
|
+
BSON_ASSERT_PARAM (key);
|
64
|
+
|
65
|
+
ASSERT (_mongocrypt_binary_to_bson (key, &bson));
|
66
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
67
|
+
ASSERT (bson_iter_find_descendant (&iter, "_id", &iter));
|
68
|
+
ASSERT (BSON_ITER_HOLDS_BINARY (&iter));
|
69
|
+
ASSERT (_mongocrypt_buffer_from_binary_iter (&buf, &iter));
|
70
|
+
ASSERT (buf.subtype == BSON_SUBTYPE_UUID);
|
71
|
+
ASSERT (buf.len > 0u);
|
72
|
+
|
73
|
+
return buf;
|
74
|
+
}
|
75
|
+
|
76
|
+
static _mongocrypt_buffer_t
|
77
|
+
_find_key_id_from_iter (bson_iter_t *iter)
|
78
|
+
{
|
79
|
+
_mongocrypt_buffer_t buf;
|
80
|
+
|
81
|
+
ASSERT (BSON_ITER_HOLDS_BINARY (iter));
|
82
|
+
ASSERT (_mongocrypt_buffer_from_binary_iter (&buf, iter));
|
83
|
+
ASSERT (buf.subtype == BSON_SUBTYPE_UUID);
|
84
|
+
ASSERT (buf.len > 0u);
|
85
|
+
|
86
|
+
return buf;
|
87
|
+
}
|
88
|
+
|
89
|
+
static const char *
|
90
|
+
_find_masterkey_id (mongocrypt_binary_t *key)
|
91
|
+
{
|
92
|
+
bson_t bson;
|
93
|
+
bson_iter_t iter;
|
94
|
+
const char *res;
|
95
|
+
|
96
|
+
BSON_ASSERT_PARAM (key);
|
97
|
+
|
98
|
+
ASSERT (_mongocrypt_binary_to_bson (key, &bson));
|
99
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
100
|
+
ASSERT (bson_iter_find_descendant (&iter, "masterKey.key", &iter));
|
101
|
+
ASSERT ((res = bson_iter_utf8 (&iter, NULL)));
|
102
|
+
|
103
|
+
return res;
|
104
|
+
}
|
105
|
+
|
106
|
+
static _mongocrypt_buffer_t
|
107
|
+
_find_key_material (mongocrypt_binary_t *key)
|
108
|
+
{
|
109
|
+
bson_t bson;
|
110
|
+
bson_iter_t iter;
|
111
|
+
_mongocrypt_buffer_t buf;
|
112
|
+
|
113
|
+
BSON_ASSERT_PARAM (key);
|
114
|
+
|
115
|
+
ASSERT (_mongocrypt_binary_to_bson (key, &bson));
|
116
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
117
|
+
ASSERT (bson_iter_find_descendant (&iter, "keyMaterial", &iter));
|
118
|
+
ASSERT (BSON_ITER_HOLDS_BINARY (&iter));
|
119
|
+
ASSERT (_mongocrypt_buffer_from_binary_iter (&buf, &iter));
|
120
|
+
ASSERT (buf.subtype == BSON_SUBTYPE_BINARY);
|
121
|
+
ASSERT (buf.len > 0u);
|
122
|
+
|
123
|
+
return buf;
|
124
|
+
}
|
125
|
+
|
126
|
+
static _mongocrypt_buffer_t
|
127
|
+
_key_material_from_iter (bson_iter_t *iter)
|
128
|
+
{
|
129
|
+
_mongocrypt_buffer_t buf;
|
130
|
+
|
131
|
+
ASSERT (BSON_ITER_HOLDS_BINARY (iter));
|
132
|
+
ASSERT (_mongocrypt_buffer_from_binary_iter (&buf, iter));
|
133
|
+
ASSERT (buf.subtype == BSON_SUBTYPE_BINARY);
|
134
|
+
ASSERT (buf.len > 0u);
|
135
|
+
|
136
|
+
return buf;
|
137
|
+
}
|
138
|
+
|
139
|
+
static bool
|
140
|
+
_buffer_cmp_equal (const _mongocrypt_buffer_t *lhs,
|
141
|
+
const _mongocrypt_buffer_t *rhs)
|
142
|
+
{
|
143
|
+
BSON_ASSERT_PARAM (lhs);
|
144
|
+
BSON_ASSERT_PARAM (rhs);
|
145
|
+
|
146
|
+
return lhs->len == rhs->len && memcmp (lhs->data, rhs->data, lhs->len) == 0;
|
147
|
+
}
|
148
|
+
|
149
|
+
static int64_t
|
150
|
+
_find_date_field (mongocrypt_binary_t *key, const char *dotkey)
|
151
|
+
{
|
152
|
+
bson_t bson;
|
153
|
+
bson_iter_t iter;
|
154
|
+
int64_t res;
|
155
|
+
|
156
|
+
BSON_ASSERT_PARAM (key);
|
157
|
+
|
158
|
+
ASSERT (_mongocrypt_binary_to_bson (key, &bson));
|
159
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
160
|
+
ASSERT (bson_iter_find_descendant (&iter, dotkey, &iter));
|
161
|
+
ASSERT (BSON_ITER_HOLDS_DATE_TIME (&iter));
|
162
|
+
ASSERT ((res = bson_iter_date_time (&iter)) != 0)
|
163
|
+
|
164
|
+
return res;
|
165
|
+
}
|
166
|
+
|
167
|
+
static int64_t
|
168
|
+
_find_creation_date (mongocrypt_binary_t *key)
|
169
|
+
{
|
170
|
+
return _find_date_field (key, "creationDate");
|
171
|
+
}
|
172
|
+
|
173
|
+
static int64_t
|
174
|
+
_find_update_date (mongocrypt_binary_t *key)
|
175
|
+
{
|
176
|
+
return _find_date_field (key, "updateDate");
|
177
|
+
}
|
178
|
+
|
179
|
+
static _mongocrypt_key_alt_name_t *
|
180
|
+
_find_key_alt_names (mongocrypt_binary_t *key)
|
181
|
+
{
|
182
|
+
bson_t bson;
|
183
|
+
bson_iter_t iter;
|
184
|
+
_mongocrypt_key_alt_name_t *res;
|
185
|
+
|
186
|
+
BSON_ASSERT_PARAM (key);
|
187
|
+
|
188
|
+
ASSERT (_mongocrypt_binary_to_bson (key, &bson));
|
189
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
190
|
+
ASSERT (bson_iter_find_descendant (&iter, "keyAltNames", &iter));
|
191
|
+
ASSERT (_mongocrypt_key_alt_name_from_iter (&iter, &res, NULL));
|
192
|
+
ASSERT (res);
|
193
|
+
|
194
|
+
return res;
|
195
|
+
}
|
196
|
+
|
197
|
+
static _test_datakey_fields_t *
|
198
|
+
_find_datakey_fields (mongocrypt_binary_t *key)
|
199
|
+
{
|
200
|
+
_test_datakey_fields_t *res = _test_datakey_fields_new ();
|
201
|
+
|
202
|
+
BSON_ASSERT_PARAM (key);
|
203
|
+
|
204
|
+
res->id = _find_key_id (key);
|
205
|
+
res->kek_id = _find_masterkey_id (key);
|
206
|
+
res->creation_date = _find_creation_date (key);
|
207
|
+
res->update_date = _find_update_date (key);
|
208
|
+
res->key_material = _find_key_material (key);
|
209
|
+
res->key_alt_names = _find_key_alt_names (key);
|
210
|
+
|
211
|
+
return res;
|
212
|
+
}
|
213
|
+
|
214
|
+
static void
|
215
|
+
_assert_aws_kms_request (mongocrypt_kms_ctx_t *kms)
|
216
|
+
{
|
217
|
+
BSON_ASSERT_PARAM (kms);
|
218
|
+
|
219
|
+
ASSERT_STREQUAL (mongocrypt_kms_ctx_get_kms_provider (kms, NULL), "aws");
|
220
|
+
|
221
|
+
{
|
222
|
+
mongocrypt_binary_t bin;
|
223
|
+
ASSERT (mongocrypt_kms_ctx_message (kms, &bin));
|
224
|
+
ASSERT (bin.len > 0);
|
225
|
+
}
|
226
|
+
|
227
|
+
{
|
228
|
+
const char *endpoint;
|
229
|
+
ASSERT (mongocrypt_kms_ctx_endpoint (kms, &endpoint));
|
230
|
+
ASSERT (endpoint);
|
231
|
+
}
|
232
|
+
|
233
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) > 0);
|
234
|
+
}
|
235
|
+
|
236
|
+
static void
|
237
|
+
_assert_aws_kms_endpoint (mongocrypt_kms_ctx_t *kms, const char *expected)
|
238
|
+
{
|
239
|
+
const char *endpoint = NULL;
|
240
|
+
ASSERT ((mongocrypt_kms_ctx_endpoint (kms, &endpoint)));
|
241
|
+
ASSERT_STREQUAL (expected, endpoint);
|
242
|
+
}
|
243
|
+
|
244
|
+
|
245
|
+
static void
|
246
|
+
_test_rewrap_many_datakey_init (_mongocrypt_tester_t *tester)
|
247
|
+
{
|
248
|
+
mongocrypt_t *const crypt =
|
249
|
+
_mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
250
|
+
mongocrypt_ctx_t *ctx = NULL;
|
251
|
+
|
252
|
+
/* No context, nothing to init. */
|
253
|
+
ASSERT (!mongocrypt_ctx_rewrap_many_datakey_init (NULL, NULL));
|
254
|
+
|
255
|
+
/* Filter argument required. */
|
256
|
+
ctx = mongocrypt_ctx_new (crypt);
|
257
|
+
ASSERT_FAILS (mongocrypt_ctx_rewrap_many_datakey_init (ctx, NULL),
|
258
|
+
ctx,
|
259
|
+
"filter must not be null");
|
260
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_ERROR);
|
261
|
+
mongocrypt_ctx_destroy (ctx);
|
262
|
+
|
263
|
+
/* Irrelevant options should trigger initialization error. */
|
264
|
+
ctx = mongocrypt_ctx_new (crypt);
|
265
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_alt_name (
|
266
|
+
ctx, TEST_BSON ("{'keyAltName': 'test'}")),
|
267
|
+
ctx);
|
268
|
+
ASSERT_FAILS (
|
269
|
+
mongocrypt_ctx_rewrap_many_datakey_init (ctx, TEST_BSON ("{}")),
|
270
|
+
ctx,
|
271
|
+
"key id and alt name prohibited");
|
272
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_ERROR);
|
273
|
+
mongocrypt_ctx_destroy (ctx);
|
274
|
+
|
275
|
+
/* rewrapManyDataKeyOpts.newProvider and rewrapManyDataKeyOpts.newMasterKey
|
276
|
+
* should be provided via mongocrypt_ctx_setopt_key_encryption_key. */
|
277
|
+
ctx = mongocrypt_ctx_new (crypt);
|
278
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_encryption_key (
|
279
|
+
ctx,
|
280
|
+
TEST_BSON ("{'provider': 'aws',"
|
281
|
+
" 'region': 'us-east-1',"
|
282
|
+
" 'key': '" TEST_REWRAP_MASTER_KEY_ID_NEW "'}")),
|
283
|
+
ctx);
|
284
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, TEST_BSON ("{}")),
|
285
|
+
ctx);
|
286
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
287
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
288
|
+
mongocrypt_ctx_destroy (ctx);
|
289
|
+
|
290
|
+
/* Not providing rewrapManyDataKeyOpts is OK. */
|
291
|
+
ctx = mongocrypt_ctx_new (crypt);
|
292
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, TEST_BSON ("{}")),
|
293
|
+
ctx);
|
294
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
295
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
296
|
+
mongocrypt_ctx_destroy (ctx);
|
297
|
+
|
298
|
+
mongocrypt_destroy (crypt);
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
static void
|
303
|
+
_test_rewrap_many_datakey_need_mongo_keys (_mongocrypt_tester_t *tester)
|
304
|
+
{
|
305
|
+
mongocrypt_binary_t *const filter =
|
306
|
+
TEST_BSON ("{'keyAltName': {'$in': ['keyDocumentA', 'keyDocumentB']}}");
|
307
|
+
|
308
|
+
mongocrypt_t *const crypt =
|
309
|
+
_mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
310
|
+
mongocrypt_ctx_t *ctx = NULL;
|
311
|
+
|
312
|
+
/* Filter should be the same as what was provided in call to init. */
|
313
|
+
ctx = mongocrypt_ctx_new (crypt);
|
314
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
315
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
316
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
317
|
+
{
|
318
|
+
mongocrypt_binary_t *const op = mongocrypt_binary_new ();
|
319
|
+
ASSERT_OK (mongocrypt_ctx_mongo_op (ctx, op), ctx);
|
320
|
+
ASSERT_MONGOCRYPT_BINARY_EQUAL_BSON (filter, op);
|
321
|
+
mongocrypt_binary_destroy (op);
|
322
|
+
}
|
323
|
+
mongocrypt_ctx_destroy (ctx);
|
324
|
+
|
325
|
+
/* No key documents is OK, no work to be done. */
|
326
|
+
ctx = mongocrypt_ctx_new (crypt);
|
327
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
328
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
329
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
330
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
331
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_DONE);
|
332
|
+
mongocrypt_ctx_destroy (ctx);
|
333
|
+
|
334
|
+
/* Any number of key documents can be given. */
|
335
|
+
ctx = mongocrypt_ctx_new (crypt);
|
336
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
337
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
338
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
339
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
340
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
341
|
+
ctx);
|
342
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
343
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
344
|
+
ctx);
|
345
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
346
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
347
|
+
mongocrypt_ctx_destroy (ctx);
|
348
|
+
|
349
|
+
/* Key documents must not have duplicate key ID or alt names. */
|
350
|
+
ctx = mongocrypt_ctx_new (crypt);
|
351
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
352
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
353
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
354
|
+
ASSERT_OK (
|
355
|
+
mongocrypt_ctx_mongo_feed (
|
356
|
+
ctx, TEST_FILE ("./test/data/key-document-with-alt-name.json")),
|
357
|
+
ctx);
|
358
|
+
ASSERT_FAILS (
|
359
|
+
mongocrypt_ctx_mongo_feed (
|
360
|
+
ctx,
|
361
|
+
TEST_FILE (
|
362
|
+
"./test/data/key-document-with-alt-name-duplicate-id.json")),
|
363
|
+
ctx,
|
364
|
+
"keys returned have duplicate keyAltNames or _id");
|
365
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_ERROR);
|
366
|
+
mongocrypt_ctx_destroy (ctx);
|
367
|
+
|
368
|
+
mongocrypt_destroy (crypt);
|
369
|
+
}
|
370
|
+
|
371
|
+
|
372
|
+
static void
|
373
|
+
_test_rewrap_many_datakey_need_kms_decrypt (_mongocrypt_tester_t *tester)
|
374
|
+
{
|
375
|
+
mongocrypt_binary_t *const filter =
|
376
|
+
TEST_BSON ("{'keyAltName': {'$in': ['keyDocumentA', 'keyDocumentB']}}");
|
377
|
+
|
378
|
+
mongocrypt_t *crypt =
|
379
|
+
_mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
380
|
+
mongocrypt_ctx_t *ctx = NULL;
|
381
|
+
mongocrypt_kms_ctx_t *kms = NULL;
|
382
|
+
|
383
|
+
/* AWS */
|
384
|
+
ctx = mongocrypt_ctx_new (crypt);
|
385
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
386
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
387
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
388
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
389
|
+
ctx, TEST_FILE ("./test/data/key-document-full.json")),
|
390
|
+
ctx);
|
391
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
392
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
393
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
394
|
+
ASSERT_STREQUAL ("aws", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
395
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
396
|
+
mongocrypt_ctx_destroy (ctx);
|
397
|
+
|
398
|
+
/* Clear key cache. */
|
399
|
+
mongocrypt_destroy (crypt);
|
400
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
401
|
+
|
402
|
+
/* Azure */
|
403
|
+
ctx = mongocrypt_ctx_new (crypt);
|
404
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
405
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
406
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
407
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
408
|
+
ctx, TEST_FILE ("./test/data/key-document-azure.json")),
|
409
|
+
ctx);
|
410
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
411
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
412
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
413
|
+
ASSERT_STREQUAL ("azure", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
414
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
415
|
+
mongocrypt_ctx_destroy (ctx);
|
416
|
+
|
417
|
+
/* Clear key cache. */
|
418
|
+
mongocrypt_destroy (crypt);
|
419
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
420
|
+
|
421
|
+
/* GCP */
|
422
|
+
ctx = mongocrypt_ctx_new (crypt);
|
423
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
424
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
425
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
426
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
427
|
+
ctx, TEST_FILE ("./test/data/key-document-gcp.json")),
|
428
|
+
ctx);
|
429
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
430
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
431
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
432
|
+
ASSERT_STREQUAL ("gcp", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
433
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
434
|
+
mongocrypt_ctx_destroy (ctx);
|
435
|
+
|
436
|
+
/* Clear key cache. */
|
437
|
+
mongocrypt_destroy (crypt);
|
438
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
439
|
+
|
440
|
+
/* KMIP */
|
441
|
+
ctx = mongocrypt_ctx_new (crypt);
|
442
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
443
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
444
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
445
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
446
|
+
ctx, TEST_FILE ("./test/data/key-document-kmip.json")),
|
447
|
+
ctx);
|
448
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
449
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
450
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
451
|
+
ASSERT_STREQUAL ("kmip", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
452
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
453
|
+
mongocrypt_ctx_destroy (ctx);
|
454
|
+
|
455
|
+
/* Clear key cache. */
|
456
|
+
mongocrypt_destroy (crypt);
|
457
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
458
|
+
|
459
|
+
/* Local: no KMS required. */
|
460
|
+
ctx = mongocrypt_ctx_new (crypt);
|
461
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
462
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
463
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
464
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
465
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-local.json")),
|
466
|
+
ctx);
|
467
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
468
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_READY);
|
469
|
+
mongocrypt_ctx_destroy (ctx);
|
470
|
+
|
471
|
+
/* Clear key cache. */
|
472
|
+
mongocrypt_destroy (crypt);
|
473
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
474
|
+
|
475
|
+
/* Number of KMS requests should match number of keys that require it. */
|
476
|
+
ctx = mongocrypt_ctx_new (crypt);
|
477
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
478
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
479
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
480
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
481
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
482
|
+
ctx);
|
483
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
484
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
485
|
+
ctx);
|
486
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
487
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
488
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
489
|
+
ASSERT_STREQUAL ("aws", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
490
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
491
|
+
ASSERT_STREQUAL ("aws", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
492
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
493
|
+
mongocrypt_ctx_destroy (ctx);
|
494
|
+
|
495
|
+
/* Ensure keys that don't require KMS do not request it. */
|
496
|
+
ctx = mongocrypt_ctx_new (crypt);
|
497
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
498
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
499
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
500
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
501
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
502
|
+
ctx);
|
503
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
504
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
505
|
+
ctx);
|
506
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
507
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-local.json")),
|
508
|
+
ctx);
|
509
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
510
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
511
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
512
|
+
ASSERT_STREQUAL ("aws", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
513
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
514
|
+
ASSERT_STREQUAL ("aws", mongocrypt_kms_ctx_get_kms_provider (kms, NULL));
|
515
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
516
|
+
mongocrypt_ctx_destroy (ctx);
|
517
|
+
|
518
|
+
/* Clear key cache. */
|
519
|
+
mongocrypt_destroy (crypt);
|
520
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
521
|
+
|
522
|
+
/* Ensure number of KMS requests matches number of keys that require it. */
|
523
|
+
ctx = mongocrypt_ctx_new (crypt);
|
524
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
525
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
526
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
527
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
528
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
529
|
+
ctx);
|
530
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
531
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
532
|
+
ctx);
|
533
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
534
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
535
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
536
|
+
/* Implementation detail: decryption KMS requests are issued in reverse order
|
537
|
+
* of provided key documents. */
|
538
|
+
_assert_aws_kms_endpoint (kms, "example.com:443");
|
539
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
540
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-b.txt")),
|
541
|
+
kms);
|
542
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
543
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
544
|
+
_assert_aws_kms_endpoint (kms, "kms.us-east-1.amazonaws.com:443");
|
545
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
546
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-a.txt")),
|
547
|
+
kms);
|
548
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
549
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
550
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
551
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
552
|
+
mongocrypt_ctx_destroy (ctx);
|
553
|
+
|
554
|
+
/* Clear key cache. */
|
555
|
+
mongocrypt_destroy (crypt);
|
556
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
557
|
+
|
558
|
+
/* Ensure all KMS requests have a corresponding KMS response. */
|
559
|
+
ctx = mongocrypt_ctx_new (crypt);
|
560
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
561
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
562
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
563
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
564
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
565
|
+
ctx);
|
566
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
567
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
568
|
+
ctx);
|
569
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
570
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
571
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
572
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
573
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-b.txt")),
|
574
|
+
kms);
|
575
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
576
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
577
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) > 0); /* "Oops." */
|
578
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
579
|
+
ASSERT_FAILS (mongocrypt_ctx_kms_done (ctx), ctx, "KMS response unfinished");
|
580
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_ERROR);
|
581
|
+
mongocrypt_ctx_destroy (ctx);
|
582
|
+
|
583
|
+
/* Clear key cache. */
|
584
|
+
mongocrypt_destroy (crypt);
|
585
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
586
|
+
|
587
|
+
/* Skip KMS for keys with cached decrypted key material. */
|
588
|
+
ctx = mongocrypt_ctx_new (crypt);
|
589
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
590
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
591
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
592
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
593
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
594
|
+
ctx);
|
595
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
596
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
597
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
598
|
+
/* Cache decrypted key material for datakey B. */
|
599
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
600
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-b.txt")),
|
601
|
+
kms);
|
602
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
603
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
604
|
+
mongocrypt_ctx_destroy (ctx);
|
605
|
+
ctx = mongocrypt_ctx_new (crypt);
|
606
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
607
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
608
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
609
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
610
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
611
|
+
ctx);
|
612
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
613
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
614
|
+
ctx);
|
615
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
616
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
617
|
+
/* Only datakey A should make a KMS request. */
|
618
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
619
|
+
_assert_aws_kms_endpoint (kms, "kms.us-east-1.amazonaws.com:443");
|
620
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
621
|
+
mongocrypt_ctx_destroy (ctx);
|
622
|
+
|
623
|
+
mongocrypt_destroy (crypt);
|
624
|
+
}
|
625
|
+
|
626
|
+
|
627
|
+
static void
|
628
|
+
_test_rewrap_many_datakey_need_kms_encrypt (_mongocrypt_tester_t *tester)
|
629
|
+
{
|
630
|
+
mongocrypt_binary_t *const filter =
|
631
|
+
TEST_BSON ("{'keyAltName': {'$in': ['keyDocumentA', 'keyDocumentB']}}");
|
632
|
+
|
633
|
+
mongocrypt_t *const crypt =
|
634
|
+
_mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
635
|
+
mongocrypt_ctx_t *ctx = NULL;
|
636
|
+
mongocrypt_kms_ctx_t *kms = NULL;
|
637
|
+
|
638
|
+
/* If no new provider is given, encryption should reuse current KMS provider
|
639
|
+
* for each key. */
|
640
|
+
ctx = mongocrypt_ctx_new (crypt);
|
641
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
642
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
643
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
644
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
645
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
646
|
+
ctx);
|
647
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
648
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
649
|
+
ctx);
|
650
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
651
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
652
|
+
/* These decrypt replies should cache key material used by later blocks. */
|
653
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
654
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
655
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-b.txt")),
|
656
|
+
kms);
|
657
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
658
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
659
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
660
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-a.txt")),
|
661
|
+
kms);
|
662
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
663
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
664
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
665
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
666
|
+
/* Implementation detail: encryption KMS requests are issued in same order as
|
667
|
+
* provided key documents. */
|
668
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
669
|
+
_assert_aws_kms_endpoint (kms, "kms.us-east-1.amazonaws.com:443");
|
670
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
671
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-a.txt")),
|
672
|
+
kms);
|
673
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
674
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
675
|
+
_assert_aws_kms_endpoint (kms, "example.com:443");
|
676
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
677
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-b.txt")),
|
678
|
+
kms);
|
679
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
680
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
681
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
682
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_READY);
|
683
|
+
mongocrypt_ctx_destroy (ctx);
|
684
|
+
|
685
|
+
/* If new provider is given, encryption should use new KMS provider for all
|
686
|
+
* keys. */
|
687
|
+
ctx = mongocrypt_ctx_new (crypt);
|
688
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_encryption_key (
|
689
|
+
ctx,
|
690
|
+
TEST_BSON ("{'provider': 'aws',"
|
691
|
+
" 'region': 'us-east-2',"
|
692
|
+
" 'key': '" TEST_REWRAP_MASTER_KEY_ID_NEW "'}")),
|
693
|
+
ctx);
|
694
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
695
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
696
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
697
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
698
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
699
|
+
ctx);
|
700
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
701
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
702
|
+
ctx);
|
703
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
704
|
+
/* Skip decryption, key material should have been cached. */
|
705
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
706
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
707
|
+
_assert_aws_kms_endpoint (kms, "kms.us-east-2.amazonaws.com:443");
|
708
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
709
|
+
_assert_aws_kms_endpoint (kms, "kms.us-east-2.amazonaws.com:443");
|
710
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
711
|
+
mongocrypt_ctx_destroy (ctx);
|
712
|
+
|
713
|
+
/* If no encryption KMS required, should skip straight to READY state. */
|
714
|
+
ctx = mongocrypt_ctx_new (crypt);
|
715
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_encryption_key (
|
716
|
+
ctx, TEST_BSON ("{'provider': 'local'}")),
|
717
|
+
ctx);
|
718
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
719
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
720
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
721
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
722
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
723
|
+
ctx);
|
724
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
725
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
726
|
+
ctx);
|
727
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
728
|
+
/* Skip decryption, key material should have been cached. */
|
729
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_READY);
|
730
|
+
mongocrypt_ctx_destroy (ctx);
|
731
|
+
|
732
|
+
/* Ensure all KMS requests have a corresponding KMS response. */
|
733
|
+
ctx = mongocrypt_ctx_new (crypt);
|
734
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_encryption_key (
|
735
|
+
ctx,
|
736
|
+
TEST_BSON ("{'provider': 'aws',"
|
737
|
+
" 'region': 'us-east-1',"
|
738
|
+
" 'key': '" TEST_REWRAP_MASTER_KEY_ID_NEW "'}")),
|
739
|
+
ctx);
|
740
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
741
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
742
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
743
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
744
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
745
|
+
ctx);
|
746
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
747
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
748
|
+
ctx);
|
749
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
750
|
+
/* Skip decryption, key material should have been cached. */
|
751
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
752
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
753
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
754
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-a.txt")),
|
755
|
+
kms);
|
756
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
757
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) > 0); /* "Oops." */
|
758
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
759
|
+
ASSERT_FAILS (mongocrypt_ctx_kms_done (ctx), ctx, "KMS response unfinished");
|
760
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_ERROR);
|
761
|
+
mongocrypt_ctx_destroy (ctx);
|
762
|
+
|
763
|
+
mongocrypt_destroy (crypt);
|
764
|
+
}
|
765
|
+
|
766
|
+
|
767
|
+
static void
|
768
|
+
_test_rewrap_many_datakey_finalize (_mongocrypt_tester_t *tester)
|
769
|
+
{
|
770
|
+
mongocrypt_t *const crypt =
|
771
|
+
_mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
772
|
+
mongocrypt_ctx_t *const ctx = mongocrypt_ctx_new (crypt);
|
773
|
+
|
774
|
+
mongocrypt_binary_t *const filter =
|
775
|
+
TEST_BSON ("{'keyAltName': {'$in': ['keyDocumentA', 'keyDocumentB']}}");
|
776
|
+
|
777
|
+
mongocrypt_binary_t *const key_doc_a =
|
778
|
+
TEST_FILE ("./test/data/rmd/key-document-a.json");
|
779
|
+
mongocrypt_binary_t *const key_doc_b =
|
780
|
+
TEST_FILE ("./test/data/rmd/key-document-b.json");
|
781
|
+
|
782
|
+
/* Save current key fields for comparison with rewrapped keys. */
|
783
|
+
_test_datakey_fields_t *const fields_a = _find_datakey_fields (key_doc_a);
|
784
|
+
_test_datakey_fields_t *const fields_b = _find_datakey_fields (key_doc_b);
|
785
|
+
|
786
|
+
mongocrypt_kms_ctx_t *kms = NULL;
|
787
|
+
|
788
|
+
ASSERT_OK (ctx, crypt);
|
789
|
+
ASSERT_OK (mongocrypt_ctx_setopt_key_encryption_key (
|
790
|
+
ctx,
|
791
|
+
TEST_BSON ("{'provider': 'aws',"
|
792
|
+
" 'region': 'us-east-1',"
|
793
|
+
" 'key': '" TEST_REWRAP_MASTER_KEY_ID_NEW "'}")),
|
794
|
+
ctx);
|
795
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, filter), ctx);
|
796
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
797
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
798
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
799
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
800
|
+
ctx);
|
801
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
802
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-b.json")),
|
803
|
+
ctx);
|
804
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
805
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
806
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
807
|
+
_assert_aws_kms_request (kms);
|
808
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
809
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-b.txt")),
|
810
|
+
kms);
|
811
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
812
|
+
|
813
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
814
|
+
_assert_aws_kms_request (kms);
|
815
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
816
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-a.txt")),
|
817
|
+
kms);
|
818
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
819
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
820
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
821
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
822
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
823
|
+
_assert_aws_kms_request (kms);
|
824
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
825
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-a.txt")),
|
826
|
+
kms);
|
827
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
828
|
+
|
829
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
830
|
+
_assert_aws_kms_request (kms);
|
831
|
+
ASSERT_OK (mongocrypt_kms_ctx_feed (
|
832
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-b.txt")),
|
833
|
+
kms);
|
834
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
835
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
836
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
837
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_READY);
|
838
|
+
|
839
|
+
{
|
840
|
+
mongocrypt_binary_t res;
|
841
|
+
bson_t bson;
|
842
|
+
bson_iter_t iter;
|
843
|
+
bson_iter_t a_iter;
|
844
|
+
bson_iter_t b_iter;
|
845
|
+
|
846
|
+
ASSERT_OK (mongocrypt_ctx_finalize (ctx, &res), ctx);
|
847
|
+
ASSERT (_mongocrypt_binary_to_bson (&res, &bson));
|
848
|
+
|
849
|
+
/* There should be exactly 2 documents. */
|
850
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
851
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.1", &iter));
|
852
|
+
ASSERT (!bson_iter_find_descendant (&iter, "v.2", &iter));
|
853
|
+
|
854
|
+
/* Both keys should have the same ID as prior to rewrap, but may be
|
855
|
+
* returned in a different order from order they were fed. */
|
856
|
+
{
|
857
|
+
_mongocrypt_buffer_t id;
|
858
|
+
|
859
|
+
ASSERT (bson_iter_init (&a_iter, &bson));
|
860
|
+
ASSERT (bson_iter_init (&b_iter, &bson));
|
861
|
+
|
862
|
+
/* Find first keyDocument. */
|
863
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
864
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.0._id", &iter));
|
865
|
+
id = _find_key_id_from_iter (&iter);
|
866
|
+
if (_buffer_cmp_equal (&fields_a->id, &id)) {
|
867
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
868
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.0", &iter));
|
869
|
+
ASSERT (bson_iter_recurse (&iter, &a_iter));
|
870
|
+
} else if (_buffer_cmp_equal (&fields_b->id, &id)) {
|
871
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
872
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.0", &iter));
|
873
|
+
ASSERT (bson_iter_recurse (&iter, &b_iter));
|
874
|
+
}
|
875
|
+
|
876
|
+
/* Find second keyDocument. */
|
877
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
878
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.1._id", &iter));
|
879
|
+
id = _find_key_id_from_iter (&iter);
|
880
|
+
if (_buffer_cmp_equal (&fields_a->id, &id)) {
|
881
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
882
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.1", &iter));
|
883
|
+
ASSERT (bson_iter_recurse (&iter, &a_iter));
|
884
|
+
} else if (_buffer_cmp_equal (&fields_b->id, &id)) {
|
885
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
886
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.1", &iter));
|
887
|
+
ASSERT (bson_iter_recurse (&iter, &b_iter));
|
888
|
+
}
|
889
|
+
|
890
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
891
|
+
ASSERT (iter.raw != a_iter.raw || iter.off != a_iter.off);
|
892
|
+
ASSERT (iter.raw != b_iter.raw || iter.off != b_iter.off);
|
893
|
+
}
|
894
|
+
|
895
|
+
/* Both keys should be rewrapped with new masterKey. */
|
896
|
+
iter = a_iter;
|
897
|
+
ASSERT (bson_iter_find_descendant (&iter, "masterKey.key", &iter));
|
898
|
+
ASSERT_STREQUAL (TEST_REWRAP_MASTER_KEY_ID_NEW,
|
899
|
+
bson_iter_utf8 (&iter, NULL));
|
900
|
+
iter = b_iter;
|
901
|
+
ASSERT (bson_iter_find_descendant (&iter, "masterKey.key", &iter));
|
902
|
+
ASSERT_STREQUAL (TEST_REWRAP_MASTER_KEY_ID_NEW,
|
903
|
+
bson_iter_utf8 (&iter, NULL));
|
904
|
+
|
905
|
+
/* Both keys should have new key material. */
|
906
|
+
{
|
907
|
+
_mongocrypt_buffer_t key_material_a;
|
908
|
+
_mongocrypt_buffer_t key_material_b;
|
909
|
+
|
910
|
+
iter = a_iter;
|
911
|
+
ASSERT (bson_iter_find_descendant (&iter, "keyMaterial", &iter));
|
912
|
+
key_material_a = _key_material_from_iter (&iter);
|
913
|
+
ASSERT (!_buffer_cmp_equal (&fields_a->key_material, &key_material_a));
|
914
|
+
|
915
|
+
iter = b_iter;
|
916
|
+
ASSERT (bson_iter_find_descendant (&iter, "keyMaterial", &iter));
|
917
|
+
key_material_b = _key_material_from_iter (&iter);
|
918
|
+
ASSERT (!_buffer_cmp_equal (&fields_b->key_material, &key_material_b));
|
919
|
+
|
920
|
+
/* Key materials should differ. */
|
921
|
+
ASSERT (!_buffer_cmp_equal (&key_material_a, &key_material_b));
|
922
|
+
}
|
923
|
+
|
924
|
+
bson_destroy (&bson);
|
925
|
+
}
|
926
|
+
|
927
|
+
/* No more work to be done for RewrapManyDatakey. */
|
928
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_DONE);
|
929
|
+
|
930
|
+
_test_datakey_fields_destroy (fields_b);
|
931
|
+
_test_datakey_fields_destroy (fields_a);
|
932
|
+
mongocrypt_ctx_destroy (ctx);
|
933
|
+
mongocrypt_destroy (crypt);
|
934
|
+
}
|
935
|
+
|
936
|
+
|
937
|
+
static void
|
938
|
+
_test_rewrap_many_datakey_kms_credentials (_mongocrypt_tester_t *tester)
|
939
|
+
{
|
940
|
+
mongocrypt_t *crypt = NULL;
|
941
|
+
mongocrypt_ctx_t *ctx = NULL;
|
942
|
+
|
943
|
+
/* Ensure rewrapManyDataKey correctly handles need KMS credentials option. */
|
944
|
+
{
|
945
|
+
crypt = mongocrypt_new ();
|
946
|
+
mongocrypt_setopt_use_need_kms_credentials_state (crypt);
|
947
|
+
ASSERT_OK (
|
948
|
+
mongocrypt_setopt_kms_providers (crypt, TEST_BSON ("{'aws': {}}")),
|
949
|
+
crypt);
|
950
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
951
|
+
ctx = mongocrypt_ctx_new (crypt);
|
952
|
+
|
953
|
+
ASSERT_OK (ctx, crypt);
|
954
|
+
|
955
|
+
ASSERT_OK (
|
956
|
+
mongocrypt_ctx_rewrap_many_datakey_init (ctx, TEST_BSON ("{}")), ctx);
|
957
|
+
|
958
|
+
/* NEED_KMS_CREDENTIALS comes before NEED_MONGO_KEYS. */
|
959
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
960
|
+
MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS);
|
961
|
+
ASSERT_OK (mongocrypt_ctx_provide_kms_providers (
|
962
|
+
ctx,
|
963
|
+
TEST_BSON ("{'aws': {"
|
964
|
+
" 'accessKeyId': 'example',"
|
965
|
+
" 'secretAccessKey': 'example'}}")),
|
966
|
+
ctx);
|
967
|
+
|
968
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
969
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
970
|
+
ASSERT_OK (mongocrypt_ctx_mongo_feed (
|
971
|
+
ctx, TEST_FILE ("./test/data/rmd/key-document-a.json")),
|
972
|
+
ctx);
|
973
|
+
ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
|
974
|
+
|
975
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
976
|
+
{
|
977
|
+
mongocrypt_kms_ctx_t *kms = NULL;
|
978
|
+
|
979
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
980
|
+
_assert_aws_kms_request (kms);
|
981
|
+
ASSERT_OK (
|
982
|
+
mongocrypt_kms_ctx_feed (
|
983
|
+
kms, TEST_FILE ("./test/data/rmd/kms-decrypt-reply-a.txt")),
|
984
|
+
kms);
|
985
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
986
|
+
|
987
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
988
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
989
|
+
}
|
990
|
+
|
991
|
+
/* KMS credentials provided before decryption should be reused here. */
|
992
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
|
993
|
+
{
|
994
|
+
mongocrypt_kms_ctx_t *kms = NULL;
|
995
|
+
|
996
|
+
ASSERT ((kms = mongocrypt_ctx_next_kms_ctx (ctx)));
|
997
|
+
_assert_aws_kms_request (kms);
|
998
|
+
ASSERT_OK (
|
999
|
+
mongocrypt_kms_ctx_feed (
|
1000
|
+
kms, TEST_FILE ("./test/data/rmd/kms-encrypt-reply-a.txt")),
|
1001
|
+
kms);
|
1002
|
+
ASSERT (mongocrypt_kms_ctx_bytes_needed (kms) == 0);
|
1003
|
+
|
1004
|
+
ASSERT_OK (!mongocrypt_ctx_next_kms_ctx (ctx), ctx);
|
1005
|
+
ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_READY);
|
1009
|
+
|
1010
|
+
{
|
1011
|
+
mongocrypt_binary_t res;
|
1012
|
+
bson_t bson;
|
1013
|
+
bson_iter_t iter;
|
1014
|
+
|
1015
|
+
ASSERT_OK (mongocrypt_ctx_finalize (ctx, &res), ctx);
|
1016
|
+
ASSERT (_mongocrypt_binary_to_bson (&res, &bson));
|
1017
|
+
ASSERT (bson_iter_init (&iter, &bson));
|
1018
|
+
ASSERT (bson_iter_find_descendant (&iter, "v.0.masterKey.key", &iter));
|
1019
|
+
ASSERT_STREQUAL (TEST_REWRAP_MASTER_KEY_ID_OLD,
|
1020
|
+
bson_iter_utf8 (&iter, NULL));
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_DONE);
|
1024
|
+
|
1025
|
+
mongocrypt_ctx_destroy (ctx);
|
1026
|
+
mongocrypt_destroy (crypt);
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
/* Should not enter NEED_KMS_CREDENTIALS state if credentials already
|
1030
|
+
* provided. */
|
1031
|
+
crypt = mongocrypt_new ();
|
1032
|
+
mongocrypt_setopt_use_need_kms_credentials_state (crypt);
|
1033
|
+
ASSERT_OK (mongocrypt_setopt_kms_providers (
|
1034
|
+
crypt,
|
1035
|
+
TEST_BSON ("{'aws': {"
|
1036
|
+
" 'accessKeyId': 'example',"
|
1037
|
+
" 'secretAccessKey': 'example'}}")),
|
1038
|
+
crypt);
|
1039
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
1040
|
+
ctx = mongocrypt_ctx_new (crypt);
|
1041
|
+
ASSERT_OK (ctx, crypt);
|
1042
|
+
ASSERT_OK (mongocrypt_ctx_rewrap_many_datakey_init (ctx, TEST_BSON ("{}")),
|
1043
|
+
ctx);
|
1044
|
+
ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx),
|
1045
|
+
MONGOCRYPT_CTX_NEED_MONGO_KEYS);
|
1046
|
+
mongocrypt_ctx_destroy (ctx);
|
1047
|
+
mongocrypt_destroy (crypt);
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
|
1051
|
+
void
|
1052
|
+
_mongocrypt_tester_install_ctx_rewrap_many_datakey (
|
1053
|
+
_mongocrypt_tester_t *tester)
|
1054
|
+
{
|
1055
|
+
INSTALL_TEST (_test_rewrap_many_datakey_init);
|
1056
|
+
INSTALL_TEST (_test_rewrap_many_datakey_need_mongo_keys);
|
1057
|
+
INSTALL_TEST (_test_rewrap_many_datakey_need_kms_decrypt);
|
1058
|
+
INSTALL_TEST (_test_rewrap_many_datakey_need_kms_encrypt);
|
1059
|
+
INSTALL_TEST (_test_rewrap_many_datakey_finalize);
|
1060
|
+
INSTALL_TEST (_test_rewrap_many_datakey_kms_credentials);
|
1061
|
+
}
|