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,1060 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2019-present MongoDB, Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include <stdio.h>
|
18
|
+
#include <stdlib.h>
|
19
|
+
|
20
|
+
#include <bson/bson.h>
|
21
|
+
|
22
|
+
#include "mongocrypt.h"
|
23
|
+
#include "mongocrypt-config.h"
|
24
|
+
#include "mongocrypt-crypto-private.h"
|
25
|
+
#include "mongocrypt-marking-private.h"
|
26
|
+
#include "test-mongocrypt.h"
|
27
|
+
|
28
|
+
#ifdef MONGOCRYPT_ENABLE_CRYPTO_COMMON_CRYPTO
|
29
|
+
#include <sys/sysctl.h>
|
30
|
+
#endif
|
31
|
+
|
32
|
+
/* Return a repeated character with no null terminator. */
|
33
|
+
char *
|
34
|
+
_mongocrypt_repeat_char (char c, uint32_t times)
|
35
|
+
{
|
36
|
+
char *result;
|
37
|
+
uint32_t i;
|
38
|
+
|
39
|
+
result = bson_malloc (times);
|
40
|
+
BSON_ASSERT (result);
|
41
|
+
|
42
|
+
for (i = 0; i < times; i++) {
|
43
|
+
result[i] = c;
|
44
|
+
}
|
45
|
+
|
46
|
+
return result;
|
47
|
+
}
|
48
|
+
|
49
|
+
void
|
50
|
+
_load_json_as_bson (const char *path, bson_t *out)
|
51
|
+
{
|
52
|
+
bson_error_t error;
|
53
|
+
bson_json_reader_t *reader;
|
54
|
+
bool ret;
|
55
|
+
|
56
|
+
reader = bson_json_reader_new_from_file (path, &error);
|
57
|
+
if (!reader) {
|
58
|
+
fprintf (stderr, "error reading: %s\n", path);
|
59
|
+
}
|
60
|
+
ASSERT_OR_PRINT_BSON (reader, error);
|
61
|
+
bson_init (out);
|
62
|
+
ret = bson_json_reader_read (reader, out, &error);
|
63
|
+
ASSERT_OR_PRINT_BSON (ret, error);
|
64
|
+
|
65
|
+
bson_json_reader_destroy (reader);
|
66
|
+
}
|
67
|
+
|
68
|
+
#define TEST_DATA_COUNT_INC(var) \
|
69
|
+
(var)++; \
|
70
|
+
if ((var) >= TEST_DATA_COUNT) { \
|
71
|
+
TEST_ERROR ( \
|
72
|
+
"TEST_DATA_COUNT exceeded for %s. Increment TEST_DATA_COUNT.", #var); \
|
73
|
+
}
|
74
|
+
|
75
|
+
static void
|
76
|
+
_load_json (_mongocrypt_tester_t *tester, const char *path)
|
77
|
+
{
|
78
|
+
bson_t as_bson;
|
79
|
+
_mongocrypt_buffer_t *buf;
|
80
|
+
|
81
|
+
_load_json_as_bson (path, &as_bson);
|
82
|
+
|
83
|
+
buf = &tester->file_bufs[tester->file_count];
|
84
|
+
_mongocrypt_buffer_steal_from_bson (buf, &as_bson);
|
85
|
+
tester->file_paths[tester->file_count] = bson_strdup (path);
|
86
|
+
TEST_DATA_COUNT_INC (tester->file_count);
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
static void
|
91
|
+
_load_http (_mongocrypt_tester_t *tester, const char *path)
|
92
|
+
{
|
93
|
+
int fd;
|
94
|
+
char *contents;
|
95
|
+
int n_read;
|
96
|
+
int filesize;
|
97
|
+
char storage[512];
|
98
|
+
int i;
|
99
|
+
_mongocrypt_buffer_t *buf;
|
100
|
+
|
101
|
+
filesize = 0;
|
102
|
+
contents = NULL;
|
103
|
+
fd = open (path, O_RDONLY);
|
104
|
+
while ((n_read = read (fd, storage, sizeof (storage))) > 0) {
|
105
|
+
filesize += n_read;
|
106
|
+
/* Append storage. Performance does not matter. */
|
107
|
+
contents = bson_realloc (contents, filesize);
|
108
|
+
memcpy (contents + (filesize - n_read), storage, n_read);
|
109
|
+
}
|
110
|
+
|
111
|
+
if (n_read < 0) {
|
112
|
+
fprintf (stderr, "failed to read %s\n", path);
|
113
|
+
abort ();
|
114
|
+
}
|
115
|
+
|
116
|
+
close (fd);
|
117
|
+
|
118
|
+
buf = &tester->file_bufs[tester->file_count];
|
119
|
+
/* copy and fix newlines */
|
120
|
+
_mongocrypt_buffer_init (buf);
|
121
|
+
/* allocate twice the size since \n may become \r\n */
|
122
|
+
buf->data = bson_malloc0 (filesize * 2);
|
123
|
+
BSON_ASSERT (buf->data);
|
124
|
+
|
125
|
+
buf->len = 0;
|
126
|
+
buf->owned = true;
|
127
|
+
for (i = 0; i < filesize; i++) {
|
128
|
+
if (contents[i] == '\n' && contents[i - 1] != '\r') {
|
129
|
+
buf->data[buf->len++] = '\r';
|
130
|
+
}
|
131
|
+
buf->data[buf->len++] = contents[i];
|
132
|
+
}
|
133
|
+
|
134
|
+
bson_free (contents);
|
135
|
+
tester->file_paths[tester->file_count] = bson_strdup (path);
|
136
|
+
TEST_DATA_COUNT_INC (tester->file_count);
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
void
|
141
|
+
_mongocrypt_tester_install (_mongocrypt_tester_t *tester,
|
142
|
+
char *name,
|
143
|
+
_mongocrypt_test_fn fn,
|
144
|
+
_mongocrypt_tester_crypto_spec_t crypto_spec)
|
145
|
+
{
|
146
|
+
bool crypto_enabled;
|
147
|
+
|
148
|
+
#ifdef MONGOCRYPT_ENABLE_CRYPTO
|
149
|
+
crypto_enabled = true;
|
150
|
+
#else
|
151
|
+
crypto_enabled = false;
|
152
|
+
#endif
|
153
|
+
|
154
|
+
if (crypto_spec == CRYPTO_REQUIRED && !crypto_enabled) {
|
155
|
+
printf ("Skipping test: %s – requires crypto to be enabled\n", name);
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
|
159
|
+
if (crypto_spec == CRYPTO_PROHIBITED && crypto_enabled) {
|
160
|
+
printf ("Skipping test: %s – requires crypto to be disabled\n", name);
|
161
|
+
return;
|
162
|
+
}
|
163
|
+
|
164
|
+
tester->test_fns[tester->test_count] = fn;
|
165
|
+
tester->test_names[tester->test_count] = bson_strdup (name);
|
166
|
+
TEST_DATA_COUNT_INC (tester->test_count);
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
mongocrypt_binary_t *
|
171
|
+
_mongocrypt_tester_file (_mongocrypt_tester_t *tester, const char *path)
|
172
|
+
{
|
173
|
+
int i;
|
174
|
+
mongocrypt_binary_t *to_return;
|
175
|
+
|
176
|
+
to_return = mongocrypt_binary_new ();
|
177
|
+
tester->test_bin[tester->bin_count] = to_return;
|
178
|
+
TEST_DATA_COUNT_INC (tester->bin_count);
|
179
|
+
|
180
|
+
for (i = 0; i < tester->file_count; i++) {
|
181
|
+
if (0 == strcmp (tester->file_paths[i], path)) {
|
182
|
+
_mongocrypt_buffer_to_binary (&tester->file_bufs[i], to_return);
|
183
|
+
return to_return;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
/* File not found, load it. */
|
188
|
+
if (strstr (path, ".json")) {
|
189
|
+
_load_json (tester, path);
|
190
|
+
} else if (strstr (path, ".txt")) {
|
191
|
+
_load_http (tester, path);
|
192
|
+
}
|
193
|
+
|
194
|
+
_mongocrypt_buffer_to_binary (&tester->file_bufs[tester->file_count - 1],
|
195
|
+
to_return);
|
196
|
+
return to_return;
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
bson_t *
|
201
|
+
_mongocrypt_tester_bson_from_json (_mongocrypt_tester_t *tester,
|
202
|
+
const char *json,
|
203
|
+
...)
|
204
|
+
{
|
205
|
+
va_list ap;
|
206
|
+
char *full_json;
|
207
|
+
bson_t *bson;
|
208
|
+
bson_error_t error;
|
209
|
+
char *c;
|
210
|
+
|
211
|
+
va_start (ap, json);
|
212
|
+
full_json = bson_strdupv_printf (json, ap);
|
213
|
+
/* Replace ' with " */
|
214
|
+
for (c = full_json; *c; c++) {
|
215
|
+
if (*c == '\'') {
|
216
|
+
*c = '"';
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
va_end (ap);
|
221
|
+
bson = &tester->test_bson[tester->bson_count];
|
222
|
+
TEST_DATA_COUNT_INC (tester->bson_count);
|
223
|
+
if (!bson_init_from_json (bson, full_json, strlen (full_json), &error)) {
|
224
|
+
fprintf (stderr, "%s", error.message);
|
225
|
+
abort ();
|
226
|
+
}
|
227
|
+
bson_free (full_json);
|
228
|
+
return bson;
|
229
|
+
}
|
230
|
+
|
231
|
+
|
232
|
+
mongocrypt_binary_t *
|
233
|
+
_mongocrypt_tester_bin_from_json (_mongocrypt_tester_t *tester,
|
234
|
+
const char *json,
|
235
|
+
...)
|
236
|
+
{
|
237
|
+
va_list ap;
|
238
|
+
char *full_json;
|
239
|
+
bson_t *bson;
|
240
|
+
mongocrypt_binary_t *bin;
|
241
|
+
bson_error_t error;
|
242
|
+
char *c;
|
243
|
+
|
244
|
+
va_start (ap, json);
|
245
|
+
full_json = bson_strdupv_printf (json, ap);
|
246
|
+
/* Replace ' with " */
|
247
|
+
for (c = full_json; *c; c++) {
|
248
|
+
if (*c == '\'') {
|
249
|
+
*c = '"';
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
va_end (ap);
|
254
|
+
bson = &tester->test_bson[tester->bson_count];
|
255
|
+
TEST_DATA_COUNT_INC (tester->bson_count);
|
256
|
+
if (!bson_init_from_json (bson, full_json, strlen (full_json), &error)) {
|
257
|
+
fprintf (stderr, "failed to parse JSON %s: %s", error.message, json);
|
258
|
+
abort ();
|
259
|
+
}
|
260
|
+
bin = mongocrypt_binary_new ();
|
261
|
+
tester->test_bin[tester->bin_count] = bin;
|
262
|
+
TEST_DATA_COUNT_INC (tester->bin_count);
|
263
|
+
bin->data = (uint8_t *) bson_get_data (bson);
|
264
|
+
bin->len = bson->len;
|
265
|
+
bson_free (full_json);
|
266
|
+
return bin;
|
267
|
+
}
|
268
|
+
|
269
|
+
|
270
|
+
mongocrypt_binary_t *
|
271
|
+
_mongocrypt_tester_bin (_mongocrypt_tester_t *tester, int size)
|
272
|
+
{
|
273
|
+
mongocrypt_binary_t *bin;
|
274
|
+
uint8_t *blob;
|
275
|
+
int i;
|
276
|
+
|
277
|
+
if (size == 0) {
|
278
|
+
return NULL;
|
279
|
+
}
|
280
|
+
blob = bson_malloc (size);
|
281
|
+
BSON_ASSERT (blob);
|
282
|
+
|
283
|
+
for (i = 0; i < size; i++) {
|
284
|
+
blob[i] = (i % 3) + 1; /* 1, 2, 3, 1, 2, 3, ... */
|
285
|
+
}
|
286
|
+
|
287
|
+
bin = mongocrypt_binary_new_from_data (blob, size);
|
288
|
+
|
289
|
+
tester->test_blob[tester->blob_count] = blob;
|
290
|
+
TEST_DATA_COUNT_INC (tester->blob_count);
|
291
|
+
tester->test_bin[tester->bin_count] = bin;
|
292
|
+
TEST_DATA_COUNT_INC (tester->bin_count);
|
293
|
+
return bin;
|
294
|
+
}
|
295
|
+
|
296
|
+
void
|
297
|
+
_mongocrypt_tester_satisfy_kms (_mongocrypt_tester_t *tester,
|
298
|
+
mongocrypt_kms_ctx_t *kms)
|
299
|
+
{
|
300
|
+
const char *endpoint;
|
301
|
+
|
302
|
+
BSON_ASSERT (mongocrypt_kms_ctx_endpoint (kms, &endpoint));
|
303
|
+
BSON_ASSERT (endpoint == strstr (endpoint, "kms.") &&
|
304
|
+
strstr (endpoint, ".amazonaws.com"));
|
305
|
+
mongocrypt_kms_ctx_feed (kms,
|
306
|
+
TEST_FILE ("./test/example/kms-decrypt-reply.txt"));
|
307
|
+
BSON_ASSERT (0 == mongocrypt_kms_ctx_bytes_needed (kms));
|
308
|
+
}
|
309
|
+
|
310
|
+
|
311
|
+
/* Run the state machine on example data until hitting stop_state or a
|
312
|
+
* terminal state. */
|
313
|
+
void
|
314
|
+
_mongocrypt_tester_run_ctx_to (_mongocrypt_tester_t *tester,
|
315
|
+
mongocrypt_ctx_t *ctx,
|
316
|
+
mongocrypt_ctx_state_t stop_state)
|
317
|
+
{
|
318
|
+
mongocrypt_ctx_state_t state;
|
319
|
+
mongocrypt_kms_ctx_t *kms;
|
320
|
+
mongocrypt_status_t *status;
|
321
|
+
mongocrypt_binary_t *bin;
|
322
|
+
bool res;
|
323
|
+
|
324
|
+
status = mongocrypt_status_new ();
|
325
|
+
state = mongocrypt_ctx_state (ctx);
|
326
|
+
while (state != stop_state) {
|
327
|
+
switch (state) {
|
328
|
+
case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO:
|
329
|
+
if (tester->paths.collection_info) {
|
330
|
+
bin = TEST_FILE (tester->paths.collection_info);
|
331
|
+
} else {
|
332
|
+
bin = TEST_FILE ("./test/example/collection-info.json");
|
333
|
+
}
|
334
|
+
BSON_ASSERT (ctx->type == _MONGOCRYPT_TYPE_ENCRYPT);
|
335
|
+
BSON_ASSERT (mongocrypt_ctx_mongo_feed (ctx, bin));
|
336
|
+
BSON_ASSERT (mongocrypt_ctx_mongo_done (ctx));
|
337
|
+
break;
|
338
|
+
case MONGOCRYPT_CTX_NEED_MONGO_MARKINGS:
|
339
|
+
if (tester->paths.mongocryptd_reply) {
|
340
|
+
bin = TEST_FILE (tester->paths.mongocryptd_reply);
|
341
|
+
} else {
|
342
|
+
bin = TEST_FILE ("./test/example/mongocryptd-reply.json");
|
343
|
+
}
|
344
|
+
BSON_ASSERT (ctx->type == _MONGOCRYPT_TYPE_ENCRYPT);
|
345
|
+
res = mongocrypt_ctx_mongo_feed (ctx, bin);
|
346
|
+
mongocrypt_ctx_status (ctx, status);
|
347
|
+
ASSERT_OR_PRINT (res, status);
|
348
|
+
BSON_ASSERT (mongocrypt_ctx_mongo_done (ctx));
|
349
|
+
break;
|
350
|
+
case MONGOCRYPT_CTX_NEED_MONGO_KEYS:
|
351
|
+
if (tester->paths.key_file) {
|
352
|
+
bin = TEST_FILE (tester->paths.key_file);
|
353
|
+
} else {
|
354
|
+
bin = TEST_FILE ("./test/example/key-document.json");
|
355
|
+
}
|
356
|
+
res = mongocrypt_ctx_mongo_feed (ctx, bin);
|
357
|
+
mongocrypt_ctx_status (ctx, status);
|
358
|
+
ASSERT_OR_PRINT (res, status);
|
359
|
+
BSON_ASSERT (mongocrypt_ctx_mongo_done (ctx));
|
360
|
+
break;
|
361
|
+
case MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS:
|
362
|
+
bin = TEST_BSON ("{}");
|
363
|
+
mongocrypt_ctx_provide_kms_providers (ctx, bin);
|
364
|
+
break;
|
365
|
+
case MONGOCRYPT_CTX_NEED_KMS:
|
366
|
+
kms = mongocrypt_ctx_next_kms_ctx (ctx);
|
367
|
+
while (kms) {
|
368
|
+
_mongocrypt_tester_satisfy_kms (tester, kms);
|
369
|
+
kms = mongocrypt_ctx_next_kms_ctx (ctx);
|
370
|
+
}
|
371
|
+
res = mongocrypt_ctx_kms_done (ctx);
|
372
|
+
mongocrypt_ctx_status (ctx, status);
|
373
|
+
ASSERT_OR_PRINT (res, status);
|
374
|
+
break;
|
375
|
+
case MONGOCRYPT_CTX_READY:
|
376
|
+
bin = mongocrypt_binary_new ();
|
377
|
+
res = mongocrypt_ctx_finalize (ctx, bin);
|
378
|
+
mongocrypt_ctx_status (ctx, status);
|
379
|
+
ASSERT_OR_PRINT (res, status);
|
380
|
+
mongocrypt_binary_destroy (bin);
|
381
|
+
break;
|
382
|
+
case MONGOCRYPT_CTX_ERROR:
|
383
|
+
mongocrypt_ctx_status (ctx, status);
|
384
|
+
fprintf (stderr,
|
385
|
+
"Got error: %s\n",
|
386
|
+
mongocrypt_status_message (status, NULL));
|
387
|
+
ASSERT_STATE_EQUAL (state, stop_state);
|
388
|
+
mongocrypt_status_destroy (status);
|
389
|
+
return;
|
390
|
+
case MONGOCRYPT_CTX_DONE:
|
391
|
+
ASSERT_STATE_EQUAL (state, stop_state);
|
392
|
+
mongocrypt_status_destroy (status);
|
393
|
+
return;
|
394
|
+
default:
|
395
|
+
BSON_ASSERT (false && "Invalid state");
|
396
|
+
}
|
397
|
+
state = mongocrypt_ctx_state (ctx);
|
398
|
+
}
|
399
|
+
ASSERT_STATE_EQUAL (state, stop_state);
|
400
|
+
mongocrypt_status_destroy (status);
|
401
|
+
}
|
402
|
+
|
403
|
+
|
404
|
+
/* Get the plaintext associated with the encrypted doc for assertions. */
|
405
|
+
const char *
|
406
|
+
_mongocrypt_tester_plaintext (_mongocrypt_tester_t *tester)
|
407
|
+
{
|
408
|
+
bson_t as_bson;
|
409
|
+
bson_iter_t iter;
|
410
|
+
_mongocrypt_marking_t marking;
|
411
|
+
_mongocrypt_buffer_t buf;
|
412
|
+
mongocrypt_status_t *status;
|
413
|
+
|
414
|
+
BSON_ASSERT (_mongocrypt_binary_to_bson (
|
415
|
+
TEST_FILE ("./test/example/mongocryptd-reply.json"), &as_bson));
|
416
|
+
/* Underlying binary data lives on in tester */
|
417
|
+
BSON_ASSERT (bson_iter_init (&iter, &as_bson));
|
418
|
+
BSON_ASSERT (bson_iter_find_descendant (&iter, "result.filter.ssn", &iter));
|
419
|
+
BSON_ASSERT (_mongocrypt_buffer_from_binary_iter (&buf, &iter));
|
420
|
+
status = mongocrypt_status_new ();
|
421
|
+
ASSERT_OR_PRINT (_mongocrypt_marking_parse_unowned (&buf, &marking, status),
|
422
|
+
status);
|
423
|
+
mongocrypt_status_destroy (status);
|
424
|
+
BSON_ASSERT (BSON_ITER_HOLDS_UTF8 (&marking.v_iter));
|
425
|
+
return bson_iter_utf8 (&marking.v_iter, NULL);
|
426
|
+
}
|
427
|
+
|
428
|
+
|
429
|
+
mongocrypt_binary_t *
|
430
|
+
_mongocrypt_tester_encrypted_doc (_mongocrypt_tester_t *tester)
|
431
|
+
{
|
432
|
+
mongocrypt_t *crypt;
|
433
|
+
mongocrypt_ctx_t *ctx;
|
434
|
+
mongocrypt_binary_t *bin;
|
435
|
+
|
436
|
+
bin = mongocrypt_binary_new ();
|
437
|
+
if (!_mongocrypt_buffer_empty (&tester->encrypted_doc)) {
|
438
|
+
_mongocrypt_buffer_to_binary (&tester->encrypted_doc, bin);
|
439
|
+
return bin;
|
440
|
+
}
|
441
|
+
|
442
|
+
crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
|
443
|
+
|
444
|
+
ctx = mongocrypt_ctx_new (crypt);
|
445
|
+
ASSERT_OK (mongocrypt_ctx_encrypt_init (
|
446
|
+
ctx, "test", -1, TEST_FILE ("./test/example/cmd.json")),
|
447
|
+
ctx);
|
448
|
+
|
449
|
+
_mongocrypt_tester_run_ctx_to (tester, ctx, MONGOCRYPT_CTX_READY);
|
450
|
+
mongocrypt_ctx_finalize (ctx, bin);
|
451
|
+
_mongocrypt_buffer_copy_from_binary (&tester->encrypted_doc, bin);
|
452
|
+
mongocrypt_ctx_destroy (ctx);
|
453
|
+
mongocrypt_destroy (crypt);
|
454
|
+
_mongocrypt_buffer_to_binary (&tester->encrypted_doc, bin);
|
455
|
+
return bin;
|
456
|
+
}
|
457
|
+
|
458
|
+
|
459
|
+
void
|
460
|
+
_mongocrypt_tester_fill_buffer (_mongocrypt_buffer_t *buf, int n)
|
461
|
+
{
|
462
|
+
uint8_t i;
|
463
|
+
|
464
|
+
memset (buf, 0, sizeof (*buf));
|
465
|
+
buf->data = bson_malloc (n);
|
466
|
+
BSON_ASSERT (buf->data);
|
467
|
+
|
468
|
+
for (i = 0; i < n; i++) {
|
469
|
+
buf->data[i] = i;
|
470
|
+
}
|
471
|
+
buf->len = n;
|
472
|
+
buf->owned = true;
|
473
|
+
}
|
474
|
+
|
475
|
+
#define PRIVATE_KEY_FOR_TESTING \
|
476
|
+
"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4JOyv5z05cL18ztpknRC7C" \
|
477
|
+
"FY2gYol4DAKerdVUoDJxCTmFMf39dVUEqD0WDiw/qcRtSO1/" \
|
478
|
+
"FRut08PlSPmvbyKetsLoxlpS8lukSzEFpFK7+L+R4miFOl6HvECyg7lbC1H/" \
|
479
|
+
"WGAhIz9yZRlXhRo9qmO/" \
|
480
|
+
"fB6PV9IeYtU+" \
|
481
|
+
"1xYuXicjCDPp36uuxBAnCz7JfvxJ3mdVc0vpSkbSb141nWuKNYR1mgyvvL6KzxO6mYsCo4hRA" \
|
482
|
+
"dhuizD9C4jDHk0V2gDCFBk0h8SLEdzStX8L0jG90/Og4y7J1b/cPo/" \
|
483
|
+
"kbYokkYisxe8cPlsvGBf+rZex7XPxc1yWaP080qeABJb+S88O//" \
|
484
|
+
"LAgMBAAECggEBAKVxP1m3FzHBUe2NZ3fYCc0Qa2zjK7xl1KPFp2u4CU+" \
|
485
|
+
"9sy0oZJUqQHUdm5CMprqWwIHPTftWboFenmCwrSXFOFzujljBO7Z3yc1WD3NJl1ZNepLcsRJ3" \
|
486
|
+
"WWFH5V+NLJ8Bdxlj1DMEZCwr7PC5+vpnCuYWzvT0qOPTl9RNVaW9VVjHouJ9Fg+" \
|
487
|
+
"s2DrShXDegFabl1iZEDdI4xScHoYBob06A5lw0WOCTayzw0Naf37lM8Y4psRAmI46XLiF/" \
|
488
|
+
"Vbuorna4hcChxDePlNLEfMipICcuxTcei1RBSlBa2t1tcnvoTy6cuYDqqImRYjp1KnMKlKQBn" \
|
489
|
+
"Q1NjS2TsRGm+F0FbreVCECgYEA4IDJlm8q/hVyNcPe4OzIcL1rsdYN3bNm2Y2O/" \
|
490
|
+
"YtRPIkQ446ItyxD06d9VuXsQpFp9jNACAPfCMSyHpPApqlxdc8z/" \
|
491
|
+
"xATlgHkcGezEOd1r4E7NdTpGg8y6Rj9b8kVlED6v4grbRhKcU6moyKUQT3+" \
|
492
|
+
"1B6ENZTOKyxuyDEgTwZHtFECgYEA0fqdv9h9s77d6eWmIioP7FSymq93pC4umxf6TVicpjpME" \
|
493
|
+
"rdD2ZfJGulN37dq8FOsOFnSmFYJdICj/PbJm6p1i8O21lsFCltEqVoVabJ7/" \
|
494
|
+
"0alPfdG2U76OeBqI8ZubL4BMnWXAB/" \
|
495
|
+
"VVEYbyWCNpQSDTjHQYs54qa2I0dJB7OgJt1sCgYEArctFQ02/" \
|
496
|
+
"7H5Rscl1yo3DBXO94SeiCFSPdC8f2Kt3MfOxvVdkAtkjkMACSbkoUsgbTVqTYSEOEc2jTgR3i" \
|
497
|
+
"Q13JgpHaFbbsq64V0QP3TAxbLIQUjYGVgQaF1UfLOBv8hrzgj45z/ST/" \
|
498
|
+
"G80lOl595+0nCUbmBcgG1AEWrmdF0/" \
|
499
|
+
"3RmECgYAKvIzKXXB3+19vcT2ga5Qq2l3TiPtOGsppRb2XrNs9qKdxIYvHmXo/" \
|
500
|
+
"9QP1V3SRW0XoD7ez8FpFabp42cmPOxUNk3FK3paQZABLxH5pzCWI9PzIAVfPDrm+" \
|
501
|
+
"sdnbgG7vAnwfL2IMMJSA3aDYGCbF9EgefG+" \
|
502
|
+
"STcpfqq7fQ6f5TBgLFwKBgCd7gn1xYL696SaKVSm7VngpXlczHVEpz3kStWR5gfzriPBxXgMV" \
|
503
|
+
"cWmcbajRser7ARpCEfbxM1UJyv6oAYZWVSNErNzNVb4POqLYcCNySuC6xKhs9FrEQnyKjyk8w" \
|
504
|
+
"I4VnrEMGrQ8e+qYSwYk9Gh6dKGoRMAPYVXQAO0fIsHF/T0a"
|
505
|
+
|
506
|
+
mongocrypt_t *
|
507
|
+
_mongocrypt_tester_mongocrypt (tester_mongocrypt_flags flags)
|
508
|
+
{
|
509
|
+
mongocrypt_t *crypt;
|
510
|
+
char localkey_data[MONGOCRYPT_KEY_LEN] = {0};
|
511
|
+
mongocrypt_binary_t *localkey;
|
512
|
+
bson_t *kms_providers;
|
513
|
+
mongocrypt_binary_t *bin;
|
514
|
+
|
515
|
+
crypt = mongocrypt_new ();
|
516
|
+
mongocrypt_setopt_log_handler (crypt, _mongocrypt_stdout_log_fn, NULL);
|
517
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, "example", -1);
|
518
|
+
localkey = mongocrypt_binary_new_from_data ((uint8_t *) localkey_data,
|
519
|
+
sizeof localkey_data);
|
520
|
+
mongocrypt_setopt_kms_provider_local (crypt, localkey);
|
521
|
+
mongocrypt_binary_destroy (localkey);
|
522
|
+
kms_providers = BCON_NEW ("azure",
|
523
|
+
"{",
|
524
|
+
"tenantId",
|
525
|
+
"",
|
526
|
+
"clientId",
|
527
|
+
"",
|
528
|
+
"clientSecret",
|
529
|
+
"",
|
530
|
+
"}",
|
531
|
+
"gcp",
|
532
|
+
"{",
|
533
|
+
"email",
|
534
|
+
"test@example.com",
|
535
|
+
"privateKey",
|
536
|
+
PRIVATE_KEY_FOR_TESTING,
|
537
|
+
"}",
|
538
|
+
"kmip",
|
539
|
+
"{",
|
540
|
+
"endpoint",
|
541
|
+
"localhost",
|
542
|
+
"}");
|
543
|
+
bin = mongocrypt_binary_new_from_data (
|
544
|
+
(uint8_t *) bson_get_data (kms_providers), kms_providers->len);
|
545
|
+
ASSERT_OK (mongocrypt_setopt_kms_providers (crypt, bin), crypt);
|
546
|
+
bson_destroy (kms_providers);
|
547
|
+
mongocrypt_binary_destroy (bin);
|
548
|
+
if (flags & TESTER_MONGOCRYPT_WITH_CRYPT_SHARED_LIB) {
|
549
|
+
mongocrypt_setopt_append_crypt_shared_lib_search_path (crypt, "$ORIGIN");
|
550
|
+
}
|
551
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
552
|
+
if (flags & TESTER_MONGOCRYPT_WITH_CRYPT_SHARED_LIB) {
|
553
|
+
if (mongocrypt_crypt_shared_lib_version (crypt) == 0) {
|
554
|
+
BSON_ASSERT (false &&
|
555
|
+
"tester mongocrypt requested WITH_CRYPT_SHARED_LIB, but "
|
556
|
+
"no crypt_shared library was loaded by mongocrypt_init");
|
557
|
+
}
|
558
|
+
}
|
559
|
+
return crypt;
|
560
|
+
}
|
561
|
+
|
562
|
+
|
563
|
+
static void
|
564
|
+
_test_mongocrypt_bad_init (_mongocrypt_tester_t *tester)
|
565
|
+
{
|
566
|
+
mongocrypt_t *crypt;
|
567
|
+
mongocrypt_binary_t *local_key;
|
568
|
+
char tmp;
|
569
|
+
|
570
|
+
|
571
|
+
/* Omitting a KMS provider must fail. */
|
572
|
+
crypt = mongocrypt_new ();
|
573
|
+
ASSERT_FAILS (mongocrypt_init (crypt), crypt, "no kms provider set");
|
574
|
+
mongocrypt_destroy (crypt);
|
575
|
+
|
576
|
+
/* Bad KMS provider options must fail. */
|
577
|
+
crypt = mongocrypt_new ();
|
578
|
+
ASSERT_FAILS (
|
579
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, NULL, -1),
|
580
|
+
crypt,
|
581
|
+
"invalid aws secret access key");
|
582
|
+
mongocrypt_destroy (crypt);
|
583
|
+
|
584
|
+
crypt = mongocrypt_new ();
|
585
|
+
ASSERT_FAILS (
|
586
|
+
mongocrypt_setopt_kms_provider_aws (crypt, NULL, -1, "example", -1),
|
587
|
+
crypt,
|
588
|
+
"invalid aws access key id");
|
589
|
+
mongocrypt_destroy (crypt);
|
590
|
+
|
591
|
+
/* Malformed UTF8 */
|
592
|
+
/* An orphaned UTF-8 continuation byte (10xxxxxx) is malformed UTF-8. */
|
593
|
+
tmp = (char) 0x80;
|
594
|
+
crypt = mongocrypt_new ();
|
595
|
+
ASSERT_FAILS (
|
596
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, &tmp, 1),
|
597
|
+
crypt,
|
598
|
+
"invalid aws secret access key");
|
599
|
+
mongocrypt_destroy (crypt);
|
600
|
+
|
601
|
+
crypt = mongocrypt_new ();
|
602
|
+
ASSERT_FAILS (mongocrypt_setopt_kms_provider_local (crypt, NULL),
|
603
|
+
crypt,
|
604
|
+
"passed null key");
|
605
|
+
mongocrypt_destroy (crypt);
|
606
|
+
|
607
|
+
crypt = mongocrypt_new ();
|
608
|
+
local_key = mongocrypt_binary_new ();
|
609
|
+
ASSERT_FAILS (mongocrypt_setopt_kms_provider_local (crypt, local_key),
|
610
|
+
crypt,
|
611
|
+
"local key must be 96 bytes");
|
612
|
+
mongocrypt_binary_destroy (local_key);
|
613
|
+
mongocrypt_destroy (crypt);
|
614
|
+
|
615
|
+
/* Reinitialization must fail. */
|
616
|
+
crypt = mongocrypt_new ();
|
617
|
+
ASSERT_OK (
|
618
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, "example", -1),
|
619
|
+
crypt);
|
620
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
621
|
+
ASSERT_FAILS (mongocrypt_init (crypt), crypt, "already initialized");
|
622
|
+
mongocrypt_destroy (crypt);
|
623
|
+
/* Setting options after initialization must fail. */
|
624
|
+
crypt = mongocrypt_new ();
|
625
|
+
ASSERT_OK (
|
626
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, "example", -1),
|
627
|
+
crypt);
|
628
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
629
|
+
ASSERT_FAILS (
|
630
|
+
mongocrypt_setopt_kms_provider_aws (crypt, "example", -1, "example", -1),
|
631
|
+
crypt,
|
632
|
+
"options cannot be set after initialization");
|
633
|
+
mongocrypt_destroy (crypt);
|
634
|
+
}
|
635
|
+
|
636
|
+
|
637
|
+
static void
|
638
|
+
_test_setopt_schema (_mongocrypt_tester_t *tester)
|
639
|
+
{
|
640
|
+
mongocrypt_t *crypt;
|
641
|
+
|
642
|
+
/* Test double setting. */
|
643
|
+
crypt = mongocrypt_new ();
|
644
|
+
ASSERT_OK (mongocrypt_setopt_schema_map (
|
645
|
+
crypt, TEST_FILE ("./test/data/schema-map.json")),
|
646
|
+
crypt);
|
647
|
+
ASSERT_FAILS (mongocrypt_setopt_schema_map (
|
648
|
+
crypt, TEST_FILE ("./test/data/schema-map.json")),
|
649
|
+
crypt,
|
650
|
+
"already set schema");
|
651
|
+
|
652
|
+
/* Test NULL/empty input */
|
653
|
+
mongocrypt_destroy (crypt);
|
654
|
+
crypt = mongocrypt_new ();
|
655
|
+
ASSERT_FAILS (
|
656
|
+
mongocrypt_setopt_schema_map (crypt, NULL), crypt, "passed null schema");
|
657
|
+
|
658
|
+
mongocrypt_destroy (crypt);
|
659
|
+
crypt = mongocrypt_new ();
|
660
|
+
ASSERT_FAILS (mongocrypt_setopt_schema_map (crypt, TEST_BIN (0)),
|
661
|
+
crypt,
|
662
|
+
"passed null schema");
|
663
|
+
|
664
|
+
/* Test malformed BSON */
|
665
|
+
mongocrypt_destroy (crypt);
|
666
|
+
crypt = mongocrypt_new ();
|
667
|
+
ASSERT_FAILS (mongocrypt_setopt_schema_map (crypt, TEST_BIN (10)),
|
668
|
+
crypt,
|
669
|
+
"invalid bson");
|
670
|
+
mongocrypt_destroy (crypt);
|
671
|
+
}
|
672
|
+
|
673
|
+
static void
|
674
|
+
_test_setopt_encrypted_field_config_map (_mongocrypt_tester_t *tester)
|
675
|
+
{
|
676
|
+
mongocrypt_t *crypt;
|
677
|
+
|
678
|
+
/* Test success. */
|
679
|
+
crypt = mongocrypt_new ();
|
680
|
+
ASSERT_OK (
|
681
|
+
mongocrypt_setopt_kms_providers (
|
682
|
+
crypt,
|
683
|
+
TEST_BSON (
|
684
|
+
"{'aws': {'accessKeyId': 'foo', 'secretAccessKey': 'bar'}}")),
|
685
|
+
crypt);
|
686
|
+
ASSERT_OK (
|
687
|
+
mongocrypt_setopt_encrypted_field_config_map (
|
688
|
+
crypt, TEST_FILE ("./test/data/encrypted-field-config-map.json")),
|
689
|
+
crypt);
|
690
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
691
|
+
mongocrypt_destroy (crypt);
|
692
|
+
|
693
|
+
/* Test double setting. */
|
694
|
+
crypt = mongocrypt_new ();
|
695
|
+
ASSERT_OK (
|
696
|
+
mongocrypt_setopt_encrypted_field_config_map (
|
697
|
+
crypt, TEST_FILE ("./test/data/encrypted-field-config-map.json")),
|
698
|
+
crypt);
|
699
|
+
ASSERT_FAILS (
|
700
|
+
mongocrypt_setopt_encrypted_field_config_map (
|
701
|
+
crypt, TEST_FILE ("./test/data/encrypted-field-config-map.json")),
|
702
|
+
crypt,
|
703
|
+
"already set encrypted_field_config_map");
|
704
|
+
mongocrypt_destroy (crypt);
|
705
|
+
|
706
|
+
/* Test NULL/empty input */
|
707
|
+
crypt = mongocrypt_new ();
|
708
|
+
ASSERT_FAILS (mongocrypt_setopt_encrypted_field_config_map (crypt, NULL),
|
709
|
+
crypt,
|
710
|
+
"passed null encrypted_field_config_map");
|
711
|
+
mongocrypt_destroy (crypt);
|
712
|
+
|
713
|
+
crypt = mongocrypt_new ();
|
714
|
+
ASSERT_FAILS (
|
715
|
+
mongocrypt_setopt_encrypted_field_config_map (crypt, TEST_BIN (0)),
|
716
|
+
crypt,
|
717
|
+
"passed null encrypted_field_config_map");
|
718
|
+
mongocrypt_destroy (crypt);
|
719
|
+
|
720
|
+
/* Test malformed BSON */
|
721
|
+
crypt = mongocrypt_new ();
|
722
|
+
ASSERT_FAILS (
|
723
|
+
mongocrypt_setopt_encrypted_field_config_map (crypt, TEST_BIN (10)),
|
724
|
+
crypt,
|
725
|
+
"invalid bson");
|
726
|
+
mongocrypt_destroy (crypt);
|
727
|
+
|
728
|
+
/* Test that it is OK to set both the encrypted field config map and schema
|
729
|
+
* map if there are no intersecting collections. */
|
730
|
+
crypt = mongocrypt_new ();
|
731
|
+
ASSERT_OK (mongocrypt_setopt_schema_map (
|
732
|
+
crypt, TEST_BSON ("{'db.coll1': {}, 'db.coll2': {}}")),
|
733
|
+
crypt);
|
734
|
+
ASSERT_OK (mongocrypt_setopt_encrypted_field_config_map (
|
735
|
+
crypt, TEST_BSON ("{'db.coll3': {}, 'db.coll3': {}}")),
|
736
|
+
crypt);
|
737
|
+
ASSERT_OK (
|
738
|
+
mongocrypt_setopt_kms_providers (
|
739
|
+
crypt,
|
740
|
+
TEST_BSON (
|
741
|
+
"{'aws': {'accessKeyId': 'foo', 'secretAccessKey': 'bar'}}")),
|
742
|
+
crypt);
|
743
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
744
|
+
mongocrypt_destroy (crypt);
|
745
|
+
|
746
|
+
/* Test that it is an error to set both the encrypted field config map and
|
747
|
+
* schema map referencing the same collection. */
|
748
|
+
crypt = mongocrypt_new ();
|
749
|
+
ASSERT_OK (mongocrypt_setopt_schema_map (
|
750
|
+
crypt, TEST_BSON ("{'db.coll1': {}, 'db.coll2': {}}")),
|
751
|
+
crypt);
|
752
|
+
ASSERT_OK (mongocrypt_setopt_encrypted_field_config_map (
|
753
|
+
crypt, TEST_BSON ("{'db.coll1': {}, 'db.coll3': {}}")),
|
754
|
+
crypt);
|
755
|
+
ASSERT_OK (
|
756
|
+
mongocrypt_setopt_kms_providers (
|
757
|
+
crypt,
|
758
|
+
TEST_BSON (
|
759
|
+
"{'aws': {'accessKeyId': 'foo', 'secretAccessKey': 'bar'}}")),
|
760
|
+
crypt);
|
761
|
+
ASSERT_FAILS (
|
762
|
+
mongocrypt_init (crypt),
|
763
|
+
crypt,
|
764
|
+
"db.coll1 is present in both schema_map and encrypted_field_config_map");
|
765
|
+
mongocrypt_destroy (crypt);
|
766
|
+
}
|
767
|
+
|
768
|
+
static void
|
769
|
+
_test_setopt_invalid_kms_providers (_mongocrypt_tester_t *tester)
|
770
|
+
{
|
771
|
+
mongocrypt_t *crypt;
|
772
|
+
mongocrypt_ctx_t *ctx;
|
773
|
+
mongocrypt_status_t *status;
|
774
|
+
|
775
|
+
crypt = mongocrypt_new ();
|
776
|
+
ASSERT_OK (mongocrypt_setopt_kms_provider_aws (crypt, "", 0, "", 0), crypt);
|
777
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
778
|
+
|
779
|
+
ctx = mongocrypt_ctx_new (crypt);
|
780
|
+
ASSERT_OK (mongocrypt_ctx_setopt_masterkey_aws (ctx, "region", -1, "cmk", 3),
|
781
|
+
ctx);
|
782
|
+
mongocrypt_ctx_datakey_init (ctx);
|
783
|
+
_mongocrypt_tester_run_ctx_to (tester, ctx, MONGOCRYPT_CTX_ERROR);
|
784
|
+
|
785
|
+
status = mongocrypt_status_new ();
|
786
|
+
BSON_ASSERT (!mongocrypt_ctx_status (ctx, status));
|
787
|
+
ASSERT_STATUS_CONTAINS (status, "failed to create KMS message");
|
788
|
+
|
789
|
+
mongocrypt_status_destroy (status);
|
790
|
+
mongocrypt_ctx_destroy (ctx);
|
791
|
+
mongocrypt_destroy (crypt);
|
792
|
+
|
793
|
+
crypt = mongocrypt_new ();
|
794
|
+
mongocrypt_setopt_use_need_kms_credentials_state (crypt);
|
795
|
+
ASSERT_OK (mongocrypt_setopt_kms_providers (crypt, TEST_BSON ("{}")), crypt);
|
796
|
+
ASSERT_FAILS (mongocrypt_init (crypt), crypt, "no kms provider set");
|
797
|
+
mongocrypt_destroy (crypt);
|
798
|
+
}
|
799
|
+
|
800
|
+
typedef struct {
|
801
|
+
char *value;
|
802
|
+
/* errmsg is the expected error message from mongocrypt_setopt_kms_providers
|
803
|
+
*/
|
804
|
+
char *errmsg;
|
805
|
+
/* errmsg_init is the expected error message from mongocrypt_init */
|
806
|
+
char *errmsg_init;
|
807
|
+
bool use_need_kms_credentials_state;
|
808
|
+
} setopt_kms_providers_testcase_t;
|
809
|
+
|
810
|
+
#define EXAMPLE_LOCAL_MATERIAL \
|
811
|
+
"TlPm8M/Uxs0eK13ReFeOUyxVC2rarCf5+LbKuY/dnFxS/" \
|
812
|
+
"LoYc1CZqnfSXujqqWrrt3fOTQ2TdtNhO4bBfamOyJPx4uJSstehc7It4pLp3LHes70z64AYqJ" \
|
813
|
+
"Uemk4G+2He"
|
814
|
+
|
815
|
+
static void
|
816
|
+
_test_setopt_kms_providers (_mongocrypt_tester_t *tester)
|
817
|
+
{
|
818
|
+
setopt_kms_providers_testcase_t *test;
|
819
|
+
size_t i;
|
820
|
+
setopt_kms_providers_testcase_t tests[] = {
|
821
|
+
{"{'azure': {'tenantId': '', 'clientId': '', 'clientSecret': '', "
|
822
|
+
"'identityPlatformEndpoint': 'example.com' }}",
|
823
|
+
NULL},
|
824
|
+
{"{'azure': {'tenantId': '', 'clientId': '', 'clientSecret': '' }}",
|
825
|
+
NULL},
|
826
|
+
{"{'azure': {'tenantId': '', 'clientId': '', 'clientSecret': '', "
|
827
|
+
"'identityPlatformEndpoint': 'example' }}",
|
828
|
+
"Invalid endpoint"},
|
829
|
+
{"{'azure': {'tenantId': '', 'clientSecret': '' }}", "clientId"},
|
830
|
+
{"{'aws': {'accessKeyId': 'abc', 'secretAccessKey': 'def'}}", NULL},
|
831
|
+
{"{'local': {'key': {'$binary': {'base64': '" EXAMPLE_LOCAL_MATERIAL
|
832
|
+
"', 'subType': '00'}} }}",
|
833
|
+
NULL},
|
834
|
+
{"{'local': {'key': '" EXAMPLE_LOCAL_MATERIAL "' }}", NULL},
|
835
|
+
{"{'local': {'key': 'invalid base64' }}", "unable to parse base64"},
|
836
|
+
/* either base64 string or binary is acceptable for privateKey */
|
837
|
+
{"{'gcp': {'endpoint': 'oauth2.googleapis.com', 'email': 'test', "
|
838
|
+
"'privateKey': 'AAAA' }}"},
|
839
|
+
{"{'gcp': {'endpoint': 'oauth2.googleapis.com', 'email': 'test', "
|
840
|
+
"'privateKey': {'$binary': {'base64': 'AAAA', 'subType': '00'}} }}"},
|
841
|
+
/* endpoint is not required. */
|
842
|
+
{"{'gcp': {'email': 'test', 'privateKey': 'AAAA' }}"},
|
843
|
+
{"{'gcp': {'privateKey': 'AAAA'}}", "expected UTF-8 gcp.email"},
|
844
|
+
{"{'gcp': {'email': 'test', 'privateKey': 'invalid base64' }}",
|
845
|
+
"unable to parse base64"},
|
846
|
+
{"{'gcp': {'endpoint': 'example', 'email': 'test', 'privateKey': "
|
847
|
+
"'AAAA'}}",
|
848
|
+
"Invalid endpoint"},
|
849
|
+
{"{'azure': {'tenantId': '', 'clientId': '', 'clientSecret': '', "
|
850
|
+
"'identityPlatformEndpoint': 'example.com', 'extra': 'invalid' }}",
|
851
|
+
"Unexpected field: 'extra'"},
|
852
|
+
{"{'aws': {'accessKeyId': 'abc', 'secretAccessKey': 'def', 'extra': "
|
853
|
+
"'invalid'}}",
|
854
|
+
"Unexpected field: 'extra'"},
|
855
|
+
{"{'gcp': {'endpoint': 'oauth2.googleapis.com', 'email': 'test', "
|
856
|
+
"'privateKey': 'AAAA', 'extra': 'invalid' }}",
|
857
|
+
"Unexpected field: 'extra'"},
|
858
|
+
{"{'local': {'key': '" EXAMPLE_LOCAL_MATERIAL "', 'extra': 'invalid' }}",
|
859
|
+
"Unexpected field: 'extra'"},
|
860
|
+
{"{'local': {'key': 'AAAA'}}", "local key must be 96 bytes"},
|
861
|
+
/* KMIP test cases. */
|
862
|
+
{"{'kmip': {'endpoint': '127.0.0.1:5696' }}", NULL},
|
863
|
+
/* localhost is a valid endpoint for KMIP.
|
864
|
+
* Unlike Azure, GCP, and AWS, applications run their own KMIP servers. */
|
865
|
+
{"{'kmip': {'endpoint': 'localhost' }}", NULL},
|
866
|
+
{"{'kmip': {'endpoint': '127.0.0.1:5696', 'extra': 'invalid' }}",
|
867
|
+
"Unexpected field: 'extra'"},
|
868
|
+
/* Empty documents are OK if on-demand KMS credentials are opted-in with
|
869
|
+
* a call to mongocrypt_setopt_use_need_kms_credentials_state. */
|
870
|
+
{"{'aws': {}}", NULL, NULL, true},
|
871
|
+
{"{'azure': {}}", NULL, NULL, true},
|
872
|
+
{"{'local': {}}", NULL, NULL, true},
|
873
|
+
{"{'gcp': {}}", NULL, NULL, true},
|
874
|
+
{"{'kmip': {}}", NULL, NULL, true},
|
875
|
+
/* Empty documents are not OK if on-demand KMS credentials are not
|
876
|
+
opted-in. */
|
877
|
+
{"{'aws': {}}", NULL, "on-demand credentials not enabled", false},
|
878
|
+
{"{'azure': {}}", NULL, "on-demand credentials not enabled", false},
|
879
|
+
{"{'local': {}}", NULL, "on-demand credentials not enabled", false},
|
880
|
+
{"{'gcp': {}}", NULL, "on-demand credentials not enabled", false},
|
881
|
+
{"{'kmip': {}}", NULL, "on-demand credentials not enabled", false},
|
882
|
+
{"{'gcp': {'accessToken': 'foobar', 'email': 'foo@bar.com' }}",
|
883
|
+
"Unexpected field: 'email'"},
|
884
|
+
{.value = "{ 'azure': { 'accessToken': 'secret' } }"},
|
885
|
+
};
|
886
|
+
|
887
|
+
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
888
|
+
mongocrypt_t *crypt;
|
889
|
+
|
890
|
+
test = tests + i;
|
891
|
+
crypt = mongocrypt_new ();
|
892
|
+
if (test->use_need_kms_credentials_state) {
|
893
|
+
mongocrypt_setopt_use_need_kms_credentials_state (crypt);
|
894
|
+
}
|
895
|
+
if (!test->errmsg) {
|
896
|
+
ASSERT_OK (
|
897
|
+
mongocrypt_setopt_kms_providers (crypt, TEST_BSON (test->value)),
|
898
|
+
crypt);
|
899
|
+
if (!test->errmsg_init) {
|
900
|
+
ASSERT_OK (mongocrypt_init (crypt), crypt);
|
901
|
+
} else {
|
902
|
+
ASSERT_FAILS (mongocrypt_init (crypt), crypt, test->errmsg_init);
|
903
|
+
}
|
904
|
+
} else {
|
905
|
+
ASSERT_FAILS (
|
906
|
+
mongocrypt_setopt_kms_providers (crypt, TEST_BSON (test->value)),
|
907
|
+
crypt,
|
908
|
+
test->errmsg);
|
909
|
+
}
|
910
|
+
mongocrypt_destroy (crypt);
|
911
|
+
}
|
912
|
+
}
|
913
|
+
|
914
|
+
bool _aes_ctr_is_supported_by_os = true;
|
915
|
+
|
916
|
+
int
|
917
|
+
main (int argc, char **argv)
|
918
|
+
{
|
919
|
+
_mongocrypt_tester_t tester = {0};
|
920
|
+
int i;
|
921
|
+
|
922
|
+
printf ("Pass a list of test names to run only specific tests. E.g.:\n");
|
923
|
+
printf ("test-mongocrypt _mongocrypt_test_mcgrew\n\n");
|
924
|
+
|
925
|
+
/* Install all tests. */
|
926
|
+
_mongocrypt_tester_install_crypto (&tester);
|
927
|
+
_mongocrypt_tester_install_log (&tester);
|
928
|
+
_mongocrypt_tester_install_data_key (&tester);
|
929
|
+
_mongocrypt_tester_install_ctx_encrypt (&tester);
|
930
|
+
_mongocrypt_tester_install_ctx_decrypt (&tester);
|
931
|
+
_mongocrypt_tester_install_ctx_rewrap_many_datakey (&tester);
|
932
|
+
_mongocrypt_tester_install_ciphertext (&tester);
|
933
|
+
_mongocrypt_tester_install_key_broker (&tester);
|
934
|
+
_mongocrypt_tester_install (&tester,
|
935
|
+
"_test_mongocrypt_bad_init",
|
936
|
+
_test_mongocrypt_bad_init,
|
937
|
+
CRYPTO_REQUIRED);
|
938
|
+
_mongocrypt_tester_install_local_kms (&tester);
|
939
|
+
_mongocrypt_tester_install_cache (&tester);
|
940
|
+
_mongocrypt_tester_install_buffer (&tester);
|
941
|
+
_mongocrypt_tester_install_ctx_setopt (&tester);
|
942
|
+
_mongocrypt_tester_install_key (&tester);
|
943
|
+
_mongocrypt_tester_install_marking (&tester);
|
944
|
+
_mongocrypt_tester_install_traverse_util (&tester);
|
945
|
+
_mongocrypt_tester_install (
|
946
|
+
&tester, "_test_setopt_schema", _test_setopt_schema, CRYPTO_REQUIRED);
|
947
|
+
_mongocrypt_tester_install (&tester,
|
948
|
+
"_test_setopt_encrypted_field_config_map",
|
949
|
+
_test_setopt_encrypted_field_config_map,
|
950
|
+
CRYPTO_REQUIRED);
|
951
|
+
_mongocrypt_tester_install (&tester,
|
952
|
+
"_test_setopt_invalid_kms_providers",
|
953
|
+
_test_setopt_invalid_kms_providers,
|
954
|
+
CRYPTO_REQUIRED);
|
955
|
+
_mongocrypt_tester_install_crypto_hooks (&tester);
|
956
|
+
_mongocrypt_tester_install_key_cache (&tester);
|
957
|
+
_mongocrypt_tester_install_kms_responses (&tester);
|
958
|
+
_mongocrypt_tester_install_status (&tester);
|
959
|
+
_mongocrypt_tester_install_endpoint (&tester);
|
960
|
+
_mongocrypt_tester_install (&tester,
|
961
|
+
"_test_setopt_kms_providers",
|
962
|
+
_test_setopt_kms_providers,
|
963
|
+
CRYPTO_OPTIONAL);
|
964
|
+
_mongocrypt_tester_install_kek (&tester);
|
965
|
+
_mongocrypt_tester_install_cache_oauth (&tester);
|
966
|
+
_mongocrypt_tester_install_kms_ctx (&tester);
|
967
|
+
_mongocrypt_tester_install_csfle_lib (&tester);
|
968
|
+
_mongocrypt_tester_install_dll (&tester);
|
969
|
+
_mongocrypt_tester_install_mc_tokens (&tester);
|
970
|
+
_mongocrypt_tester_install_fle2_payloads (&tester);
|
971
|
+
_mongocrypt_tester_install_efc (&tester);
|
972
|
+
_mongocrypt_tester_install_compact (&tester);
|
973
|
+
_mongocrypt_tester_install_fle2_payload_uev (&tester);
|
974
|
+
_mongocrypt_tester_install_fle2_payload_iup (&tester);
|
975
|
+
_mongocrypt_tester_install_range_encoding (&tester);
|
976
|
+
_mongocrypt_tester_install_range_edge_generation (&tester);
|
977
|
+
_mongocrypt_tester_install_range_mincover (&tester);
|
978
|
+
_mongocrypt_tester_install_mc_RangeOpts (&tester);
|
979
|
+
_mongocrypt_tester_install_mc_FLE2RangeFindDriverSpec (&tester);
|
980
|
+
_mongocrypt_tester_install_gcp_auth (&tester);
|
981
|
+
_mongocrypt_tester_install_mc_reader (&tester);
|
982
|
+
|
983
|
+
#ifdef MONGOCRYPT_ENABLE_CRYPTO_COMMON_CRYPTO
|
984
|
+
char osversion[32];
|
985
|
+
size_t osversion_len = sizeof (osversion) - 1;
|
986
|
+
int osversion_name[] = {CTL_KERN, KERN_OSRELEASE};
|
987
|
+
|
988
|
+
_aes_ctr_is_supported_by_os = false;
|
989
|
+
|
990
|
+
if (sysctl (osversion_name, 2, osversion, &osversion_len, NULL, 0) == -1) {
|
991
|
+
goto get_os_version_failed;
|
992
|
+
}
|
993
|
+
|
994
|
+
uint32_t major, minor;
|
995
|
+
if (sscanf (osversion, "%u.%u", &major, &minor) != 2) {
|
996
|
+
goto get_os_version_failed;
|
997
|
+
}
|
998
|
+
|
999
|
+
if (major >= 20) {
|
1000
|
+
// macOS 11 and newer
|
1001
|
+
_aes_ctr_is_supported_by_os = true;
|
1002
|
+
} else {
|
1003
|
+
major -= 4;
|
1004
|
+
// macOS 10.1.1 and newer. CTR unsupported in 10.14 and earlier
|
1005
|
+
_aes_ctr_is_supported_by_os = major > 14;
|
1006
|
+
}
|
1007
|
+
get_os_version_failed:
|
1008
|
+
#endif
|
1009
|
+
|
1010
|
+
printf ("Running tests...\n");
|
1011
|
+
for (i = 0; tester.test_names[i]; i++) {
|
1012
|
+
int j;
|
1013
|
+
bool found = false;
|
1014
|
+
|
1015
|
+
if (argc > 1) {
|
1016
|
+
for (j = 1; j < argc; j++) {
|
1017
|
+
found = (0 == strcmp (argv[j], tester.test_names[i]));
|
1018
|
+
if (found)
|
1019
|
+
break;
|
1020
|
+
}
|
1021
|
+
if (!found) {
|
1022
|
+
continue;
|
1023
|
+
}
|
1024
|
+
}
|
1025
|
+
printf (" begin %s\n", tester.test_names[i]);
|
1026
|
+
tester.test_fns[i](&tester);
|
1027
|
+
/* Clear state. */
|
1028
|
+
memset (&tester.paths, 0, sizeof (tester.paths));
|
1029
|
+
printf (" end %s\n", tester.test_names[i]);
|
1030
|
+
}
|
1031
|
+
printf ("... done running tests\n");
|
1032
|
+
|
1033
|
+
if (i == 0) {
|
1034
|
+
printf ("WARNING - no tests run.\n");
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
/* Clean up tester. */
|
1038
|
+
for (i = 0; i < tester.test_count; i++) {
|
1039
|
+
bson_free (tester.test_names[i]);
|
1040
|
+
}
|
1041
|
+
|
1042
|
+
for (i = 0; i < tester.file_count; i++) {
|
1043
|
+
_mongocrypt_buffer_cleanup (&tester.file_bufs[i]);
|
1044
|
+
bson_free (tester.file_paths[i]);
|
1045
|
+
}
|
1046
|
+
|
1047
|
+
for (i = 0; i < tester.bin_count; i++) {
|
1048
|
+
mongocrypt_binary_destroy (tester.test_bin[i]);
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
for (i = 0; i < tester.bson_count; i++) {
|
1052
|
+
bson_destroy (&tester.test_bson[i]);
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
for (i = 0; i < tester.blob_count; i++) {
|
1056
|
+
bson_free (tester.test_blob[i]);
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
_mongocrypt_buffer_cleanup (&tester.encrypted_doc);
|
1060
|
+
}
|