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,1302 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2018-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
|
+
/* Needed for strptime */
|
18
|
+
#define _GNU_SOURCE
|
19
|
+
|
20
|
+
#include "kms_message/kms_message.h"
|
21
|
+
#include "kms_message_private.h"
|
22
|
+
|
23
|
+
#ifndef _WIN32
|
24
|
+
#include <dirent.h>
|
25
|
+
#else
|
26
|
+
#include "windows/dirent.h"
|
27
|
+
#endif
|
28
|
+
#include <errno.h>
|
29
|
+
#include <limits.h>
|
30
|
+
#include <stdio.h>
|
31
|
+
#include <stdlib.h>
|
32
|
+
#include <string.h>
|
33
|
+
#include <sys/stat.h>
|
34
|
+
#include <time.h>
|
35
|
+
#include "kms_message/kms_azure_request.h"
|
36
|
+
#include "kms_message/kms_b64.h"
|
37
|
+
#include "hexlify.h"
|
38
|
+
#include "kms_request_str.h"
|
39
|
+
#include "kms_kv_list.h"
|
40
|
+
#include "kms_port.h"
|
41
|
+
|
42
|
+
#include "test_kms_assert.h"
|
43
|
+
|
44
|
+
const char *aws_test_suite_dir = "aws-sig-v4-test-suite";
|
45
|
+
|
46
|
+
const char *skipped_aws_tests[] = {
|
47
|
+
/* we don't yet support temporary security credentials provided by the AWS
|
48
|
+
* Security Token Service (AWS STS). see post-sts-token/readme.txt */
|
49
|
+
"post-sts-token",
|
50
|
+
};
|
51
|
+
|
52
|
+
bool
|
53
|
+
skip_aws_test (const char *test_name)
|
54
|
+
{
|
55
|
+
size_t i;
|
56
|
+
|
57
|
+
for (i = 0; i < sizeof (skipped_aws_tests) / sizeof (char *); i++) {
|
58
|
+
if (0 == strcmp (test_name, skipped_aws_tests[i])) {
|
59
|
+
return true;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
return false;
|
64
|
+
}
|
65
|
+
|
66
|
+
bool
|
67
|
+
ends_with (const char *str, const char *suffix)
|
68
|
+
{
|
69
|
+
size_t str_len = strlen (str);
|
70
|
+
size_t suf_len = strlen (suffix);
|
71
|
+
if (str_len >= suf_len &&
|
72
|
+
0 == strncmp (&str[str_len - suf_len], suffix, suf_len)) {
|
73
|
+
return true;
|
74
|
+
}
|
75
|
+
|
76
|
+
return false;
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
char *
|
81
|
+
last_segment (const char *str)
|
82
|
+
{
|
83
|
+
const char *p = str + strlen (str);
|
84
|
+
|
85
|
+
while (--p > str) {
|
86
|
+
if (*p == '/') {
|
87
|
+
return strdup (p + 1);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
return strdup (str);
|
92
|
+
}
|
93
|
+
|
94
|
+
char *
|
95
|
+
test_file_path (const char *path, const char *suffix)
|
96
|
+
{
|
97
|
+
char *r;
|
98
|
+
char *test_name = last_segment (path);
|
99
|
+
char file_path[PATH_MAX];
|
100
|
+
snprintf (file_path, PATH_MAX, "%s/%s.%s", path, test_name, suffix);
|
101
|
+
r = strdup (file_path);
|
102
|
+
free (test_name);
|
103
|
+
return r;
|
104
|
+
}
|
105
|
+
|
106
|
+
void
|
107
|
+
realloc_buffer (char **buffer, size_t *n, size_t len)
|
108
|
+
{
|
109
|
+
if (*buffer == NULL) {
|
110
|
+
*buffer = malloc (len);
|
111
|
+
KMS_ASSERT (*buffer);
|
112
|
+
|
113
|
+
} else {
|
114
|
+
*buffer = realloc (*buffer, len);
|
115
|
+
}
|
116
|
+
|
117
|
+
*n = len;
|
118
|
+
}
|
119
|
+
|
120
|
+
ssize_t
|
121
|
+
test_getline (char **lineptr, size_t *n, FILE *stream)
|
122
|
+
{
|
123
|
+
if (*lineptr == NULL && *n == 0) {
|
124
|
+
realloc_buffer (lineptr, n, 128);
|
125
|
+
};
|
126
|
+
|
127
|
+
// Sanity check
|
128
|
+
if ((*lineptr == NULL && *n != 0) || (*lineptr != NULL && *n == 0)) {
|
129
|
+
abort ();
|
130
|
+
}
|
131
|
+
|
132
|
+
ssize_t count = 0;
|
133
|
+
|
134
|
+
while (true) {
|
135
|
+
// Read a character
|
136
|
+
int c = fgetc (stream);
|
137
|
+
|
138
|
+
// If the buffer is full, grow the buffer
|
139
|
+
if ((*n - count) <= 1) {
|
140
|
+
realloc_buffer (lineptr, n, *n + 128);
|
141
|
+
}
|
142
|
+
|
143
|
+
if (c == EOF) {
|
144
|
+
*(*lineptr + count) = '\0';
|
145
|
+
|
146
|
+
if (count > 0) {
|
147
|
+
return count;
|
148
|
+
}
|
149
|
+
|
150
|
+
return -1;
|
151
|
+
}
|
152
|
+
|
153
|
+
*(*lineptr + count) = c;
|
154
|
+
|
155
|
+
++count;
|
156
|
+
// If we hit the end of the line, we are done
|
157
|
+
if (c == '\n') {
|
158
|
+
*(*lineptr + count) = '\0';
|
159
|
+
|
160
|
+
return count;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
char *
|
166
|
+
read_test (const char *path, const char *suffix)
|
167
|
+
{
|
168
|
+
char *file_path = test_file_path (path, suffix);
|
169
|
+
FILE *f;
|
170
|
+
struct stat file_stat;
|
171
|
+
size_t f_size;
|
172
|
+
char *str;
|
173
|
+
|
174
|
+
if (0 != stat (file_path, &file_stat)) {
|
175
|
+
perror (file_path);
|
176
|
+
abort ();
|
177
|
+
}
|
178
|
+
|
179
|
+
f = fopen (file_path, "r");
|
180
|
+
if (!f) {
|
181
|
+
perror (file_path);
|
182
|
+
abort ();
|
183
|
+
}
|
184
|
+
|
185
|
+
f_size = (size_t) file_stat.st_size;
|
186
|
+
str = malloc (f_size + 1);
|
187
|
+
KMS_ASSERT (str);
|
188
|
+
|
189
|
+
memset (str, 0, f_size + 1);
|
190
|
+
|
191
|
+
// Windows will convert crlf to lf
|
192
|
+
// We want this behavior in this function call but
|
193
|
+
// it prevents us from validating we read the whole file here.
|
194
|
+
#ifndef _WIN32
|
195
|
+
if (f_size != fread (str, 1, f_size, f)) {
|
196
|
+
perror (file_path);
|
197
|
+
abort ();
|
198
|
+
}
|
199
|
+
#else
|
200
|
+
fread (str, 1, f_size, f);
|
201
|
+
#endif
|
202
|
+
|
203
|
+
fclose (f);
|
204
|
+
str[f_size] = '\0';
|
205
|
+
|
206
|
+
free (file_path);
|
207
|
+
|
208
|
+
return str;
|
209
|
+
}
|
210
|
+
|
211
|
+
void
|
212
|
+
set_test_date (kms_request_t *request)
|
213
|
+
{
|
214
|
+
struct tm tm;
|
215
|
+
|
216
|
+
/* all tests use the same date and time: 20150830T123600Z */
|
217
|
+
tm.tm_year = 115;
|
218
|
+
tm.tm_mon = 7;
|
219
|
+
tm.tm_mday = 30;
|
220
|
+
|
221
|
+
tm.tm_yday = 241;
|
222
|
+
tm.tm_wday = 0;
|
223
|
+
|
224
|
+
tm.tm_hour = 12;
|
225
|
+
tm.tm_min = 36;
|
226
|
+
tm.tm_sec = 0;
|
227
|
+
|
228
|
+
KMS_ASSERT (kms_request_set_date (request, &tm));
|
229
|
+
}
|
230
|
+
|
231
|
+
kms_request_t *
|
232
|
+
read_req (const char *path)
|
233
|
+
{
|
234
|
+
kms_request_t *request;
|
235
|
+
char *file_path = test_file_path (path, "req");
|
236
|
+
FILE *f;
|
237
|
+
size_t len = 0;
|
238
|
+
ssize_t line_len;
|
239
|
+
char *line = NULL;
|
240
|
+
char *method;
|
241
|
+
char *uri_path;
|
242
|
+
char *field_name;
|
243
|
+
char *field_value;
|
244
|
+
bool r;
|
245
|
+
|
246
|
+
f = fopen (file_path, "r");
|
247
|
+
if (!f) {
|
248
|
+
perror (file_path);
|
249
|
+
abort ();
|
250
|
+
}
|
251
|
+
|
252
|
+
/* like "GET /path HTTP/1.1" */
|
253
|
+
line_len = test_getline (&line, &len, f);
|
254
|
+
method = kms_strndup (line, strchr (line, ' ') - line);
|
255
|
+
uri_path =
|
256
|
+
kms_strndup (line + strlen (method) + 1,
|
257
|
+
line_len - strlen (method) - 1 - strlen (" HTTP/1.1\n"));
|
258
|
+
|
259
|
+
request = kms_request_new (method, uri_path, NULL);
|
260
|
+
request->auto_content_length = false;
|
261
|
+
/* from docs.aws.amazon.com/general/latest/gr/signature-v4-test-suite.html */
|
262
|
+
kms_request_set_region (request, "us-east-1");
|
263
|
+
kms_request_set_service (request, "service");
|
264
|
+
kms_request_set_access_key_id (request, "AKIDEXAMPLE");
|
265
|
+
kms_request_set_secret_key (request,
|
266
|
+
"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
|
267
|
+
|
268
|
+
while ((line_len = test_getline (&line, &len, f)) != -1) {
|
269
|
+
if (strchr (line, ':')) {
|
270
|
+
/* new header field like Host:example.com */
|
271
|
+
field_name = strtok (line, ": ");
|
272
|
+
KMS_ASSERT (field_name);
|
273
|
+
field_value = strtok (NULL, "\n");
|
274
|
+
KMS_ASSERT (field_value);
|
275
|
+
r = kms_request_add_header_field (request, field_name, field_value);
|
276
|
+
KMS_ASSERT (r);
|
277
|
+
} else if (0 == strcmp (line, "\n")) {
|
278
|
+
/* end of header */
|
279
|
+
break;
|
280
|
+
} else if (line_len > 2) {
|
281
|
+
/* continuing a multiline header value from previous line */
|
282
|
+
/* Header line folding is deprecated by RFC 7230 section 3.2. */
|
283
|
+
/* get-header-value-multiline tests this behavior. */
|
284
|
+
kms_request_append_header_field_value (request, "\r\n", 2);
|
285
|
+
/* omit this line's newline */
|
286
|
+
kms_request_append_header_field_value (
|
287
|
+
request, line, (size_t) (line_len - 1));
|
288
|
+
}
|
289
|
+
}
|
290
|
+
|
291
|
+
while ((line_len = test_getline (&line, &len, f)) != -1) {
|
292
|
+
KMS_ASSERT (kms_request_append_payload (request, line, (size_t) line_len));
|
293
|
+
}
|
294
|
+
|
295
|
+
fclose (f);
|
296
|
+
free (file_path);
|
297
|
+
free (line);
|
298
|
+
free (uri_path);
|
299
|
+
free (method);
|
300
|
+
|
301
|
+
set_test_date (request);
|
302
|
+
|
303
|
+
return request;
|
304
|
+
}
|
305
|
+
|
306
|
+
void
|
307
|
+
test_compare (kms_request_t *request,
|
308
|
+
char *(*func) (kms_request_t *),
|
309
|
+
const char *dir_path,
|
310
|
+
const char *suffix)
|
311
|
+
{
|
312
|
+
char *test_name = last_segment (dir_path);
|
313
|
+
char *expect;
|
314
|
+
char *actual;
|
315
|
+
|
316
|
+
expect = read_test (dir_path, suffix);
|
317
|
+
if (0 == strcmp (suffix, "sreq")) {
|
318
|
+
/* The final signed request is an HTTP request.
|
319
|
+
* The expected output must contain \r\n, not \n. */
|
320
|
+
char* tmp = replace_all (expect, "\n", "\r\n");
|
321
|
+
free (expect);
|
322
|
+
expect = tmp;
|
323
|
+
}
|
324
|
+
actual = func (request);
|
325
|
+
ASSERT_CMPSTR (expect, actual);
|
326
|
+
free (actual);
|
327
|
+
free (expect);
|
328
|
+
free (test_name);
|
329
|
+
}
|
330
|
+
|
331
|
+
void
|
332
|
+
test_compare_creq (kms_request_t *request, const char *dir_path)
|
333
|
+
{
|
334
|
+
test_compare (request, kms_request_get_canonical, dir_path, "creq");
|
335
|
+
}
|
336
|
+
|
337
|
+
void
|
338
|
+
test_compare_sts (kms_request_t *request, const char *dir_path)
|
339
|
+
{
|
340
|
+
test_compare (request, kms_request_get_string_to_sign, dir_path, "sts");
|
341
|
+
}
|
342
|
+
|
343
|
+
void
|
344
|
+
test_compare_authz (kms_request_t *request, const char *dir_path)
|
345
|
+
{
|
346
|
+
test_compare (request, kms_request_get_signature, dir_path, "authz");
|
347
|
+
}
|
348
|
+
|
349
|
+
void
|
350
|
+
test_compare_sreq (kms_request_t *request, const char *dir_path)
|
351
|
+
{
|
352
|
+
test_compare (request, kms_request_get_signed, dir_path, "sreq");
|
353
|
+
}
|
354
|
+
|
355
|
+
void
|
356
|
+
aws_sig_v4_test (const char *dir_path)
|
357
|
+
{
|
358
|
+
kms_request_t *request;
|
359
|
+
|
360
|
+
request = read_req (dir_path);
|
361
|
+
test_compare_creq (request, dir_path);
|
362
|
+
test_compare_sts (request, dir_path);
|
363
|
+
test_compare_authz (request, dir_path);
|
364
|
+
test_compare_sreq (request, dir_path);
|
365
|
+
kms_request_destroy (request);
|
366
|
+
}
|
367
|
+
|
368
|
+
bool
|
369
|
+
all_aws_sig_v4_tests (const char *path, const char *selected)
|
370
|
+
{
|
371
|
+
/* Amazon supplies tests, one per directory, 5 files per test, see
|
372
|
+
* docs.aws.amazon.com/general/latest/gr/signature-v4-test-suite.html */
|
373
|
+
DIR *dp;
|
374
|
+
struct dirent *ent;
|
375
|
+
bool ran_tests = false;
|
376
|
+
char *test_name = last_segment (path);
|
377
|
+
char sub[PATH_MAX];
|
378
|
+
|
379
|
+
dp = opendir (path);
|
380
|
+
if (!dp) {
|
381
|
+
perror (path);
|
382
|
+
abort ();
|
383
|
+
}
|
384
|
+
|
385
|
+
if (skip_aws_test (test_name) && !selected) {
|
386
|
+
printf ("SKIP: %s\n", test_name);
|
387
|
+
goto done;
|
388
|
+
}
|
389
|
+
|
390
|
+
while ((ent = readdir (dp))) {
|
391
|
+
if (ent->d_name[0] == '.') {
|
392
|
+
continue;
|
393
|
+
}
|
394
|
+
|
395
|
+
if (ent->d_type & DT_DIR) {
|
396
|
+
snprintf (sub, PATH_MAX, "%s/%s", path, ent->d_name);
|
397
|
+
ran_tests |= all_aws_sig_v4_tests (sub, selected);
|
398
|
+
}
|
399
|
+
|
400
|
+
if (!(ent->d_type & DT_REG) || !ends_with (ent->d_name, ".req")) {
|
401
|
+
continue;
|
402
|
+
}
|
403
|
+
|
404
|
+
/* "ent" is a "test.req" request file, this is a test directory */
|
405
|
+
/* skip the test if it doesn't match the name passed to us */
|
406
|
+
if (selected && 0 != strcmp (test_name, selected)) {
|
407
|
+
continue;
|
408
|
+
}
|
409
|
+
|
410
|
+
printf ("%s\n", path);
|
411
|
+
aws_sig_v4_test (path);
|
412
|
+
ran_tests = true;
|
413
|
+
}
|
414
|
+
|
415
|
+
done:
|
416
|
+
(void) closedir (dp);
|
417
|
+
free (test_name);
|
418
|
+
|
419
|
+
return ran_tests;
|
420
|
+
}
|
421
|
+
|
422
|
+
/* docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html */
|
423
|
+
void
|
424
|
+
example_signature_test (void)
|
425
|
+
{
|
426
|
+
const char *expect =
|
427
|
+
"c4afb1cc5771d871763a393e44b703571b55cc28424d1a5e86da6ed3c154a4b9";
|
428
|
+
kms_request_t *request;
|
429
|
+
unsigned char signing[32];
|
430
|
+
char *sig;
|
431
|
+
|
432
|
+
request = kms_request_new ("GET", "uri", NULL);
|
433
|
+
set_test_date (request);
|
434
|
+
|
435
|
+
kms_request_set_region (request, "us-east-1");
|
436
|
+
kms_request_set_service (request, "iam");
|
437
|
+
kms_request_set_secret_key (request,
|
438
|
+
"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
|
439
|
+
|
440
|
+
KMS_ASSERT (kms_request_get_signing_key (request, signing));
|
441
|
+
sig = hexlify (signing, 32);
|
442
|
+
ASSERT_CMPSTR (expect, sig);
|
443
|
+
free (sig);
|
444
|
+
kms_request_destroy (request);
|
445
|
+
}
|
446
|
+
|
447
|
+
void
|
448
|
+
path_normalization_test (void)
|
449
|
+
{
|
450
|
+
const char *tests[][2] = {
|
451
|
+
{"", "/"},
|
452
|
+
{"/", "/"},
|
453
|
+
{"/..", "/"},
|
454
|
+
{"./..", "/"},
|
455
|
+
{"../..", "/"},
|
456
|
+
{"/../..", "/"},
|
457
|
+
{"a", "a"},
|
458
|
+
{"a/", "a/"},
|
459
|
+
{"a//", "a/"},
|
460
|
+
{"a///", "a/"},
|
461
|
+
{"/a", "/a"},
|
462
|
+
{"//a", "/a"},
|
463
|
+
{"///a", "/a"},
|
464
|
+
{"/a/", "/a/"},
|
465
|
+
{"/a/..", "/"},
|
466
|
+
{"/a/../..", "/"},
|
467
|
+
{"/a/b/../..", "/"},
|
468
|
+
{"/a/b/c/../..", "/a"},
|
469
|
+
{"/a/b/../../d", "/d"},
|
470
|
+
{"/a/b/c/../../d", "/a/d"},
|
471
|
+
{"/a/b", "/a/b"},
|
472
|
+
{"a/..", "/"},
|
473
|
+
{"a/../..", "/"},
|
474
|
+
{"a/b/../..", "/"},
|
475
|
+
{"a/b/c/../..", "a"},
|
476
|
+
{"a/b/../../d", "d"},
|
477
|
+
{"a/b/c/../../d", "a/d"},
|
478
|
+
{"a/b", "a/b"},
|
479
|
+
{"/a//b", "/a/b"},
|
480
|
+
{"/a///b", "/a/b"},
|
481
|
+
{"/a////b", "/a/b"},
|
482
|
+
{"//", "/"},
|
483
|
+
{"//a///", "/a/"},
|
484
|
+
};
|
485
|
+
|
486
|
+
const char **test;
|
487
|
+
const char *out;
|
488
|
+
size_t i;
|
489
|
+
kms_request_str_t *in, *norm;
|
490
|
+
|
491
|
+
for (i = 0; i < sizeof (tests) / (2 * sizeof (const char *)); i++) {
|
492
|
+
test = tests[i];
|
493
|
+
in = kms_request_str_new_from_chars (test[0], -1);
|
494
|
+
out = test[1];
|
495
|
+
norm = kms_request_str_path_normalized (in);
|
496
|
+
ASSERT_CMPSTR (out, norm->str);
|
497
|
+
kms_request_str_destroy (in);
|
498
|
+
kms_request_str_destroy (norm);
|
499
|
+
}
|
500
|
+
}
|
501
|
+
|
502
|
+
kms_request_t *
|
503
|
+
make_test_request (void)
|
504
|
+
{
|
505
|
+
kms_request_t *request = kms_request_new ("POST", "/", NULL);
|
506
|
+
|
507
|
+
kms_request_set_region (request, "foo-region");
|
508
|
+
kms_request_set_service (request, "foo-service");
|
509
|
+
kms_request_set_access_key_id (request, "foo-akid");
|
510
|
+
kms_request_set_secret_key (request, "foo-key");
|
511
|
+
set_test_date (request);
|
512
|
+
|
513
|
+
return request;
|
514
|
+
}
|
515
|
+
|
516
|
+
void
|
517
|
+
host_test (void)
|
518
|
+
{
|
519
|
+
kms_request_t *request = make_test_request ();
|
520
|
+
test_compare_sreq (request, "test/host");
|
521
|
+
kms_request_destroy (request);
|
522
|
+
}
|
523
|
+
|
524
|
+
void
|
525
|
+
content_length_test (void)
|
526
|
+
{
|
527
|
+
const char *payload = "foo-payload";
|
528
|
+
kms_request_t *request = make_test_request ();
|
529
|
+
KMS_ASSERT (kms_request_append_payload (request, payload, strlen (payload)));
|
530
|
+
test_compare_sreq (request, "test/content_length");
|
531
|
+
kms_request_destroy (request);
|
532
|
+
}
|
533
|
+
|
534
|
+
void
|
535
|
+
bad_query_test (void)
|
536
|
+
{
|
537
|
+
kms_request_t *request = kms_request_new ("GET", "/?asdf", NULL);
|
538
|
+
ASSERT_CONTAINS (kms_request_get_error (request), "Cannot parse");
|
539
|
+
kms_request_destroy (request);
|
540
|
+
}
|
541
|
+
|
542
|
+
void
|
543
|
+
append_header_field_value_test (void)
|
544
|
+
{
|
545
|
+
kms_request_t *request = kms_request_new ("GET", "/", NULL);
|
546
|
+
KMS_ASSERT (kms_request_add_header_field (request, "a", "b"));
|
547
|
+
KMS_ASSERT (kms_request_append_header_field_value (request, "asdf", 4));
|
548
|
+
/* header field 0 is "X-Amz-Date", field 1 is "a" */
|
549
|
+
ASSERT_CMPSTR (request->header_fields->kvs[1].value->str, "basdf");
|
550
|
+
kms_request_destroy (request);
|
551
|
+
}
|
552
|
+
|
553
|
+
void
|
554
|
+
set_date_test (void)
|
555
|
+
{
|
556
|
+
// Windows CRT asserts on this negative test because it is a negative test
|
557
|
+
// so it is skipped on Windows.
|
558
|
+
#ifndef _WIN32
|
559
|
+
struct tm tm = {0};
|
560
|
+
kms_request_t *request = kms_request_new ("GET", "/", NULL);
|
561
|
+
|
562
|
+
tm.tm_sec = 9999; /* invalid, shouldn't be > 60 */
|
563
|
+
KMS_ASSERT (!kms_request_set_date (request, &tm));
|
564
|
+
ASSERT_CONTAINS (kms_request_get_error (request), "Invalid tm struct");
|
565
|
+
kms_request_destroy (request);
|
566
|
+
#endif
|
567
|
+
}
|
568
|
+
|
569
|
+
void
|
570
|
+
multibyte_test (void)
|
571
|
+
{
|
572
|
+
/* euro currency symbol */
|
573
|
+
#define EU "\xe2\x82\xac"
|
574
|
+
|
575
|
+
kms_request_t *request = kms_request_new ("GET", "/" EU "/?euro=" EU, NULL);
|
576
|
+
|
577
|
+
set_test_date (request);
|
578
|
+
KMS_ASSERT (kms_request_set_region (request, EU));
|
579
|
+
KMS_ASSERT (kms_request_set_service (request, EU));
|
580
|
+
kms_request_set_access_key_id (request, "AKIDEXAMPLE");
|
581
|
+
kms_request_set_secret_key (request,
|
582
|
+
"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
|
583
|
+
|
584
|
+
KMS_ASSERT (kms_request_add_header_field (request, EU, EU));
|
585
|
+
KMS_ASSERT (kms_request_append_header_field_value (request, "asdf" EU, 7));
|
586
|
+
KMS_ASSERT (kms_request_append_payload (request, EU, sizeof (EU)));
|
587
|
+
/* header field 0 is "X-Amz-Date" */
|
588
|
+
ASSERT_CMPSTR (request->header_fields->kvs[1].value->str, EU "asdf" EU);
|
589
|
+
|
590
|
+
test_compare_creq (request, "test/multibyte");
|
591
|
+
test_compare_sreq (request, "test/multibyte");
|
592
|
+
|
593
|
+
kms_request_destroy (request);
|
594
|
+
|
595
|
+
#undef EU
|
596
|
+
}
|
597
|
+
|
598
|
+
void
|
599
|
+
connection_close_test (void)
|
600
|
+
{
|
601
|
+
kms_request_opt_t *opt;
|
602
|
+
kms_request_t *request;
|
603
|
+
|
604
|
+
opt = kms_request_opt_new ();
|
605
|
+
kms_request_opt_set_connection_close (opt, true);
|
606
|
+
|
607
|
+
request = kms_request_new ("POST", "/", opt);
|
608
|
+
kms_request_set_region (request, "foo-region");
|
609
|
+
kms_request_set_service (request, "foo-service");
|
610
|
+
kms_request_set_access_key_id (request, "foo-akid");
|
611
|
+
kms_request_set_secret_key (request, "foo-key");
|
612
|
+
set_test_date (request);
|
613
|
+
|
614
|
+
test_compare_sreq (request, "test/connection_close");
|
615
|
+
kms_request_opt_destroy (opt);
|
616
|
+
kms_request_destroy (request);
|
617
|
+
}
|
618
|
+
|
619
|
+
/* the ciphertext blob from a response to an "Encrypt" API call */
|
620
|
+
const char ciphertext_blob[] =
|
621
|
+
"\x01\x02\x02\x00\x78\xf3\x8e\xd8\xd4\xc6\xba\xfb\xa1\xcf\xc1\x1e\x68\xf2"
|
622
|
+
"\xa1\x91\x9e\x36\x4d\x74\xa2\xc4\x9e\x30\x67\x08\x53\x33\x0d\xcd\xe0\xc9"
|
623
|
+
"\x1b\x01\x60\x30\xd4\x73\x9e\x90\x1f\xa7\x43\x55\x84\x26\xf9\xd5\xf0\xb1"
|
624
|
+
"\x00\x00\x00\x64\x30\x62\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x07\x06\xa0"
|
625
|
+
"\x55\x30\x53\x02\x01\x00\x30\x4e\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x07"
|
626
|
+
"\x01\x30\x1e\x06\x09\x60\x86\x48\x01\x65\x03\x04\x01\x2e\x30\x11\x04\x0c"
|
627
|
+
"\xa2\xc7\x12\x1c\x25\x38\x0e\xec\x08\x1f\x23\x09\x02\x01\x10\x80\x21\x61"
|
628
|
+
"\x03\xcd\xcb\xe2\xac\x36\x4f\x73\xdb\x1b\x73\x2e\x33\xda\x45\x51\xf4\xcd"
|
629
|
+
"\xc0\xff\xd2\xe1\xb9\xc4\xc2\x0e\xbf\x53\x90\x46\x18\x42";
|
630
|
+
|
631
|
+
void
|
632
|
+
decrypt_request_test (void)
|
633
|
+
{
|
634
|
+
kms_request_t *request = kms_decrypt_request_new (
|
635
|
+
(uint8_t *) ciphertext_blob, sizeof (ciphertext_blob) - 1, NULL);
|
636
|
+
|
637
|
+
set_test_date (request);
|
638
|
+
kms_request_set_region (request, "us-east-1");
|
639
|
+
kms_request_set_service (request, "service");
|
640
|
+
kms_request_set_access_key_id (request, "AKIDEXAMPLE");
|
641
|
+
kms_request_set_secret_key (request,
|
642
|
+
"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
|
643
|
+
|
644
|
+
test_compare_creq (request, "test/decrypt");
|
645
|
+
test_compare_sreq (request, "test/decrypt");
|
646
|
+
|
647
|
+
kms_request_destroy (request);
|
648
|
+
}
|
649
|
+
|
650
|
+
void
|
651
|
+
encrypt_request_test (void)
|
652
|
+
{
|
653
|
+
char *plaintext = "foobar";
|
654
|
+
kms_request_t *request = kms_encrypt_request_new (
|
655
|
+
(uint8_t *) plaintext, strlen (plaintext), "alias/1", NULL);
|
656
|
+
|
657
|
+
set_test_date (request);
|
658
|
+
kms_request_set_region (request, "us-east-1");
|
659
|
+
kms_request_set_service (request, "service");
|
660
|
+
kms_request_set_access_key_id (request, "AKIDEXAMPLE");
|
661
|
+
kms_request_set_secret_key (request,
|
662
|
+
"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY");
|
663
|
+
|
664
|
+
test_compare_creq (request, "test/encrypt");
|
665
|
+
test_compare_sreq (request, "test/encrypt");
|
666
|
+
|
667
|
+
kms_request_destroy (request);
|
668
|
+
}
|
669
|
+
|
670
|
+
void
|
671
|
+
kv_list_del_test (void)
|
672
|
+
{
|
673
|
+
kms_kv_list_t *lst = kms_kv_list_new ();
|
674
|
+
kms_request_str_t *k = kms_request_str_new_from_chars ("one", -1);
|
675
|
+
kms_request_str_t *v = kms_request_str_new_from_chars ("v", -1);
|
676
|
+
kms_kv_list_add (lst, k, v);
|
677
|
+
kms_request_str_set_chars (k, "two", -1);
|
678
|
+
kms_kv_list_add (lst, k, v);
|
679
|
+
kms_request_str_set_chars (k, "three", -1);
|
680
|
+
kms_kv_list_add (lst, k, v);
|
681
|
+
kms_request_str_set_chars (k, "two", -1); /* dupe */
|
682
|
+
kms_kv_list_add (lst, k, v);
|
683
|
+
kms_request_str_set_chars (k, "four", -1);
|
684
|
+
kms_kv_list_add (lst, k, v);
|
685
|
+
KMS_ASSERT (lst->len == 5);
|
686
|
+
kms_kv_list_del (lst, "two"); /* delete both "two" keys */
|
687
|
+
KMS_ASSERT (lst->len == 3);
|
688
|
+
ASSERT_CMPSTR (lst->kvs[0].key->str, "one");
|
689
|
+
ASSERT_CMPSTR (lst->kvs[1].key->str, "three");
|
690
|
+
ASSERT_CMPSTR (lst->kvs[2].key->str, "four");
|
691
|
+
|
692
|
+
kms_request_str_destroy (k);
|
693
|
+
kms_request_str_destroy (v);
|
694
|
+
kms_kv_list_destroy (lst);
|
695
|
+
}
|
696
|
+
|
697
|
+
void
|
698
|
+
b64_test (void)
|
699
|
+
{
|
700
|
+
uint8_t *expected = (uint8_t *) "\x01\x02\x03\x04";
|
701
|
+
char encoded[9];
|
702
|
+
int r;
|
703
|
+
uint8_t data[5];
|
704
|
+
|
705
|
+
r = kms_message_b64_ntop (expected, 4, encoded, 9);
|
706
|
+
KMS_ASSERT (r == 8);
|
707
|
+
ASSERT_CMPSTR (encoded, "AQIDBA==");
|
708
|
+
r = kms_message_b64_pton (encoded, data, 5); /* +1 for terminator */
|
709
|
+
KMS_ASSERT (r == 4);
|
710
|
+
KMS_ASSERT (0 == memcmp (expected, data, 4));
|
711
|
+
}
|
712
|
+
|
713
|
+
void
|
714
|
+
b64_b64url_test (void)
|
715
|
+
{
|
716
|
+
char base64_data[64];
|
717
|
+
char base64url_data[64];
|
718
|
+
int ret;
|
719
|
+
|
720
|
+
memset (base64_data, 0, sizeof (base64_data));
|
721
|
+
memset (base64url_data, 0, sizeof (base64url_data));
|
722
|
+
strcpy (base64_data, "PDw/Pz8+Pg==");
|
723
|
+
ret = kms_message_b64_to_b64url (base64_data,
|
724
|
+
strlen (base64_data),
|
725
|
+
base64url_data,
|
726
|
+
sizeof (base64url_data));
|
727
|
+
ASSERT (ret == 12);
|
728
|
+
ASSERT_CMPSTR (base64url_data, "PDw_Pz8-Pg==");
|
729
|
+
|
730
|
+
memset (base64_data, 0, sizeof (base64_data));
|
731
|
+
ret = kms_message_b64url_to_b64 (base64url_data,
|
732
|
+
strlen (base64url_data),
|
733
|
+
base64_data,
|
734
|
+
sizeof (base64_data));
|
735
|
+
ASSERT (ret == 12);
|
736
|
+
ASSERT_CMPSTR (base64_data, "PDw/Pz8+Pg==");
|
737
|
+
|
738
|
+
/* Convert to base64url in-place. */
|
739
|
+
ret = kms_message_b64_to_b64url (
|
740
|
+
base64_data, strlen (base64_data), base64_data, sizeof (base64_data));
|
741
|
+
ASSERT (ret == 12);
|
742
|
+
ASSERT_CMPSTR (base64_data, "PDw_Pz8-Pg==");
|
743
|
+
}
|
744
|
+
|
745
|
+
void
|
746
|
+
kms_response_parser_test (void)
|
747
|
+
{
|
748
|
+
kms_response_parser_t *parser = kms_response_parser_new ();
|
749
|
+
kms_response_t *response;
|
750
|
+
|
751
|
+
/* the parser resets after returning a response. */
|
752
|
+
ASSERT (
|
753
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
754
|
+
ASSERT (kms_response_parser_feed (
|
755
|
+
parser, (uint8_t *) "Content-Length: 15\r\n", 20));
|
756
|
+
ASSERT (kms_response_parser_feed (parser, (uint8_t *) "\r\n", 2));
|
757
|
+
ASSERT (
|
758
|
+
kms_response_parser_feed (parser, (uint8_t *) "This is a test.", 15));
|
759
|
+
ASSERT (0 == kms_response_parser_wants_bytes (parser, 123));
|
760
|
+
response = kms_response_parser_get_response (parser);
|
761
|
+
ASSERT (response->status == 200)
|
762
|
+
ASSERT_CMPSTR (response->body->str, "This is a test.");
|
763
|
+
|
764
|
+
kms_response_destroy (response);
|
765
|
+
kms_response_parser_destroy (parser);
|
766
|
+
|
767
|
+
/* We fail to parse invalid HTTP */
|
768
|
+
parser = kms_response_parser_new ();
|
769
|
+
ASSERT (!kms_response_parser_feed (
|
770
|
+
parser, (uint8_t *) "To Whom it May Concern\r\n", 24));
|
771
|
+
kms_response_parser_destroy (parser);
|
772
|
+
|
773
|
+
/* We fail on HTTP other than 1.1 */
|
774
|
+
parser = kms_response_parser_new ();
|
775
|
+
ASSERT (!kms_response_parser_feed (
|
776
|
+
parser, (uint8_t *) "HTTP/6.1 200 OK\r\n", 17));
|
777
|
+
kms_response_parser_destroy (parser);
|
778
|
+
|
779
|
+
/* We fail if there is no status */
|
780
|
+
parser = kms_response_parser_new ();
|
781
|
+
ASSERT (!kms_response_parser_feed (
|
782
|
+
parser, (uint8_t *) "HTTP/1.1 CREATED\r\n", 18));
|
783
|
+
kms_response_parser_destroy (parser);
|
784
|
+
|
785
|
+
/* We do not fail when parsing a non-200 status code,
|
786
|
+
* as the content may provide a useful error message. */
|
787
|
+
parser = kms_response_parser_new ();
|
788
|
+
ASSERT (kms_response_parser_feed (
|
789
|
+
parser, (uint8_t *) "HTTP/1.1 100 CONTINUE\r\n", 23));
|
790
|
+
ASSERT (kms_response_parser_status (parser) == 100);
|
791
|
+
kms_response_parser_destroy (parser);
|
792
|
+
|
793
|
+
parser = kms_response_parser_new ();
|
794
|
+
ASSERT (kms_response_parser_feed (
|
795
|
+
parser, (uint8_t *) "HTTP/1.1 201 CREATED\r\n", 22));
|
796
|
+
ASSERT (kms_response_parser_status (parser) == 201);
|
797
|
+
kms_response_parser_destroy (parser);
|
798
|
+
|
799
|
+
parser = kms_response_parser_new ();
|
800
|
+
ASSERT (kms_response_parser_feed (
|
801
|
+
parser, (uint8_t *) "HTTP/1.1 301 MOVED PERMANENTLY\r\n", 32));
|
802
|
+
ASSERT (kms_response_parser_status (parser) == 301);
|
803
|
+
kms_response_parser_destroy (parser);
|
804
|
+
|
805
|
+
parser = kms_response_parser_new ();
|
806
|
+
ASSERT (kms_response_parser_feed (
|
807
|
+
parser, (uint8_t *) "HTTP/1.1 400 BAD REQUEST\r\n", 26));
|
808
|
+
ASSERT (kms_response_parser_status (parser) == 400);
|
809
|
+
kms_response_parser_destroy (parser);
|
810
|
+
|
811
|
+
parser = kms_response_parser_new ();
|
812
|
+
ASSERT (kms_response_parser_feed (
|
813
|
+
parser, (uint8_t *) "HTTP/1.1 404 NOT FOUND\r\n", 24));
|
814
|
+
ASSERT (kms_response_parser_status (parser) == 404);
|
815
|
+
kms_response_parser_destroy (parser);
|
816
|
+
|
817
|
+
parser = kms_response_parser_new ();
|
818
|
+
ASSERT (kms_response_parser_feed (
|
819
|
+
parser, (uint8_t *) "HTTP/1.1 500 INTERNAL SERVER ERROR\r\n", 36));
|
820
|
+
ASSERT (kms_response_parser_status (parser) == 500);
|
821
|
+
kms_response_parser_destroy (parser);
|
822
|
+
|
823
|
+
/* We fail if the header doesn't have a colon in it */
|
824
|
+
parser = kms_response_parser_new ();
|
825
|
+
ASSERT (
|
826
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
827
|
+
ASSERT (kms_response_parser_status (parser) == 200);
|
828
|
+
ASSERT (!kms_response_parser_feed (
|
829
|
+
parser, (uint8_t *) "Content-Length= 15\r\n", 20));
|
830
|
+
ASSERT (strstr (kms_response_parser_error (parser),
|
831
|
+
"Could not parse header, no colon found."));
|
832
|
+
kms_response_parser_destroy (parser);
|
833
|
+
|
834
|
+
parser = kms_response_parser_new ();
|
835
|
+
ASSERT (
|
836
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
837
|
+
ASSERT (kms_response_parser_status (parser) == 200);
|
838
|
+
ASSERT (
|
839
|
+
!kms_response_parser_feed (parser, (uint8_t *) "Anything else\r\n", 15));
|
840
|
+
ASSERT (strstr (kms_response_parser_error (parser),
|
841
|
+
"Could not parse header, no colon found."));
|
842
|
+
kms_response_parser_destroy (parser);
|
843
|
+
|
844
|
+
/* An empty body is ok. */
|
845
|
+
parser = kms_response_parser_new ();
|
846
|
+
ASSERT (
|
847
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
848
|
+
ASSERT (kms_response_parser_status (parser) == 200);
|
849
|
+
ASSERT (kms_response_parser_feed (parser, (uint8_t *) "\r\n", 2));
|
850
|
+
kms_response_parser_destroy (parser);
|
851
|
+
|
852
|
+
/* Extra content is not ok. */
|
853
|
+
parser = kms_response_parser_new ();
|
854
|
+
ASSERT (
|
855
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
856
|
+
ASSERT (kms_response_parser_status (parser) == 200);
|
857
|
+
ASSERT (kms_response_parser_feed (parser, (uint8_t *) "\r\n", 2));
|
858
|
+
ASSERT (!kms_response_parser_feed (parser, (uint8_t *) "\r\n", 2));
|
859
|
+
ASSERT (strstr (kms_response_parser_error (parser),
|
860
|
+
"Unexpected extra HTTP content"));
|
861
|
+
kms_response_parser_destroy (parser);
|
862
|
+
|
863
|
+
parser = kms_response_parser_new ();
|
864
|
+
ASSERT (
|
865
|
+
kms_response_parser_feed (parser, (uint8_t *) "HTTP/1.1 200 OK\r\n", 17));
|
866
|
+
ASSERT (kms_response_parser_status (parser) == 200);
|
867
|
+
ASSERT (kms_response_parser_feed (
|
868
|
+
parser, (uint8_t *) "Content-Length: 5\r\n", 19));
|
869
|
+
ASSERT (kms_response_parser_feed (parser, (uint8_t *) "\r\n", 2));
|
870
|
+
ASSERT (!kms_response_parser_feed (parser, (uint8_t *) "abcdefghi", 9));
|
871
|
+
ASSERT (strstr (kms_response_parser_error (parser),
|
872
|
+
"Unexpected: exceeded content length"));
|
873
|
+
kms_response_parser_destroy (parser);
|
874
|
+
}
|
875
|
+
|
876
|
+
typedef struct {
|
877
|
+
const char *filepath;
|
878
|
+
const char *expected_body;
|
879
|
+
int max_to_read;
|
880
|
+
int expected_status;
|
881
|
+
} parser_testcase_t;
|
882
|
+
|
883
|
+
/* File should have \r\n line endings (use /etc/rewrite.py) */
|
884
|
+
static void
|
885
|
+
parser_testcase_run (parser_testcase_t *testcase)
|
886
|
+
{
|
887
|
+
FILE *response_file;
|
888
|
+
kms_response_parser_t *parser;
|
889
|
+
kms_response_t *response;
|
890
|
+
uint8_t buf[512] = {0};
|
891
|
+
int bytes_to_read;
|
892
|
+
|
893
|
+
response_file = fopen (testcase->filepath, "rb");
|
894
|
+
ASSERT (response_file);
|
895
|
+
|
896
|
+
parser = kms_response_parser_new ();
|
897
|
+
|
898
|
+
while ((bytes_to_read = kms_response_parser_wants_bytes (
|
899
|
+
parser, testcase->max_to_read)) > 0) {
|
900
|
+
if (bytes_to_read > testcase->max_to_read) {
|
901
|
+
bytes_to_read = testcase->max_to_read;
|
902
|
+
}
|
903
|
+
size_t ret = fread (buf, 1, (size_t) bytes_to_read, response_file);
|
904
|
+
|
905
|
+
if (!kms_response_parser_feed (parser, buf, (int) ret)) {
|
906
|
+
printf ("feed error: %s\n", parser->error);
|
907
|
+
ASSERT (false);
|
908
|
+
}
|
909
|
+
}
|
910
|
+
|
911
|
+
fclose (response_file);
|
912
|
+
|
913
|
+
ASSERT (0 == kms_response_parser_wants_bytes (parser, 123));
|
914
|
+
response = kms_response_parser_get_response (parser);
|
915
|
+
ASSERT_CMPSTR (testcase->expected_body, response->body->str);
|
916
|
+
ASSERT (response->status == testcase->expected_status);
|
917
|
+
|
918
|
+
kms_response_parser_destroy (parser);
|
919
|
+
kms_response_destroy (response);
|
920
|
+
}
|
921
|
+
|
922
|
+
static void
|
923
|
+
kms_response_parser_files (void)
|
924
|
+
{
|
925
|
+
const char *body = "{\"CiphertextBlob\":\"AQICAHifzrL6n/"
|
926
|
+
"3uqZyz+z1bJj80DhqPcSAibAaIoYc+HOVP6QEplwbM0wpvU5zsQG/"
|
927
|
+
"1SBKvAAAAZDBiBgkqhkiG9w0BBwagVTBTAgEAME4GCSqGSIb3DQEHATA"
|
928
|
+
"eBglghkgBZQMEAS4wEQQM5syMJE7RodxDaqYqAgEQgCHMFCnFso4Lih0"
|
929
|
+
"CNbLT1kiET0hQyzjgoa9733353GQkGlM=\",\"KeyId\":\"arn:aws:"
|
930
|
+
"kms:us-east-1:524754917239:key/"
|
931
|
+
"bd05530b-0a7f-4fbd-8362-ab3667370db0\"}";
|
932
|
+
const char *chunked_body =
|
933
|
+
"{\"access_token\":"
|
934
|
+
"\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
935
|
+
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
936
|
+
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\","
|
937
|
+
"\"expires_in\":3599,\"token_type\":\"Bearer\"}";
|
938
|
+
parser_testcase_t tests[] = {
|
939
|
+
{"./test/example-response.bin", body, 512, 200},
|
940
|
+
{"./test/example-response.bin", body, 1, 200},
|
941
|
+
{"./test/example-chunked-response.bin", chunked_body, 512, 200},
|
942
|
+
{"./test/example-chunked-response.bin", chunked_body, 1, 200},
|
943
|
+
{"./test/example-multi-chunked-response.bin", chunked_body, 512, 200},
|
944
|
+
{"./test/example-multi-chunked-response.bin", chunked_body, 1, 200}};
|
945
|
+
size_t i;
|
946
|
+
|
947
|
+
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
948
|
+
printf (" parser testcase: %d\n", (int) i);
|
949
|
+
parser_testcase_run (tests + i);
|
950
|
+
}
|
951
|
+
}
|
952
|
+
|
953
|
+
#define CLEAR(_field) \
|
954
|
+
do { \
|
955
|
+
kms_request_str_destroy (_field); \
|
956
|
+
_field = kms_request_str_new (); \
|
957
|
+
} while (0)
|
958
|
+
|
959
|
+
void
|
960
|
+
kms_request_validate_test (void)
|
961
|
+
{
|
962
|
+
kms_request_t *request = NULL;
|
963
|
+
|
964
|
+
request = make_test_request ();
|
965
|
+
CLEAR (request->region);
|
966
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
967
|
+
ASSERT_CMPSTR ("Region not set", kms_request_get_error (request));
|
968
|
+
|
969
|
+
kms_request_destroy (request);
|
970
|
+
|
971
|
+
request = make_test_request ();
|
972
|
+
CLEAR (request->service);
|
973
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
974
|
+
ASSERT_CMPSTR ("Service not set", kms_request_get_error (request));
|
975
|
+
|
976
|
+
kms_request_destroy (request);
|
977
|
+
|
978
|
+
request = make_test_request ();
|
979
|
+
CLEAR (request->access_key_id);
|
980
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
981
|
+
ASSERT_CMPSTR ("Access key ID not set", kms_request_get_error (request));
|
982
|
+
|
983
|
+
kms_request_destroy (request);
|
984
|
+
|
985
|
+
request = make_test_request ();
|
986
|
+
CLEAR (request->method);
|
987
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
988
|
+
ASSERT_CMPSTR ("Method not set", kms_request_get_error (request));
|
989
|
+
|
990
|
+
kms_request_destroy (request);
|
991
|
+
|
992
|
+
request = make_test_request ();
|
993
|
+
CLEAR (request->path);
|
994
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
995
|
+
ASSERT_CMPSTR ("Path not set", kms_request_get_error (request));
|
996
|
+
|
997
|
+
kms_request_destroy (request);
|
998
|
+
|
999
|
+
request = make_test_request ();
|
1000
|
+
CLEAR (request->date);
|
1001
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
1002
|
+
ASSERT_CMPSTR ("Date not set", kms_request_get_error (request));
|
1003
|
+
|
1004
|
+
kms_request_destroy (request);
|
1005
|
+
|
1006
|
+
request = make_test_request ();
|
1007
|
+
CLEAR (request->secret_key);
|
1008
|
+
ASSERT (NULL == kms_request_get_signed (request));
|
1009
|
+
ASSERT_CMPSTR ("Secret key not set", kms_request_get_error (request));
|
1010
|
+
|
1011
|
+
kms_request_destroy (request);
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
/* Test private key signing.
|
1015
|
+
*
|
1016
|
+
* private_key_b64 was generated by taking the base64 data out of
|
1017
|
+
* test-private-key.pem generated as follows: openssl genpkey -out
|
1018
|
+
* test-private-key.pem -algorithm RSA -pkeyopt rsa_keygen_bits:2048
|
1019
|
+
*
|
1020
|
+
* It was used to generate a test signature of the string "data to sign" with:
|
1021
|
+
* openssl dgst -sign test-private-key.pem -sha256 signme.txt | base64
|
1022
|
+
*/
|
1023
|
+
static void
|
1024
|
+
kms_signature_test (void)
|
1025
|
+
{
|
1026
|
+
const char *private_key_b64 =
|
1027
|
+
"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4JOyv5z05cL18ztpknRC7"
|
1028
|
+
"CFY2gYol4DAKerdVUoDJxCTmFMf39dVUEqD0WDiw/qcRtSO1/"
|
1029
|
+
"FRut08PlSPmvbyKetsLoxlpS8lukSzEFpFK7+L+R4miFOl6HvECyg7lbC1H/"
|
1030
|
+
"WGAhIz9yZRlXhRo9qmO/"
|
1031
|
+
"fB6PV9IeYtU+"
|
1032
|
+
"1xYuXicjCDPp36uuxBAnCz7JfvxJ3mdVc0vpSkbSb141nWuKNYR1mgyvvL6KzxO6mYsCo4hR"
|
1033
|
+
"AdhuizD9C4jDHk0V2gDCFBk0h8SLEdzStX8L0jG90/Og4y7J1b/cPo/"
|
1034
|
+
"kbYokkYisxe8cPlsvGBf+rZex7XPxc1yWaP080qeABJb+S88O//"
|
1035
|
+
"LAgMBAAECggEBAKVxP1m3FzHBUe2NZ3fYCc0Qa2zjK7xl1KPFp2u4CU+"
|
1036
|
+
"9sy0oZJUqQHUdm5CMprqWwIHPTftWboFenmCwrSXFOFzujljBO7Z3yc1WD3NJl1ZNepLcsRJ"
|
1037
|
+
"3WWFH5V+NLJ8Bdxlj1DMEZCwr7PC5+vpnCuYWzvT0qOPTl9RNVaW9VVjHouJ9Fg+"
|
1038
|
+
"s2DrShXDegFabl1iZEDdI4xScHoYBob06A5lw0WOCTayzw0Naf37lM8Y4psRAmI46XLiF/"
|
1039
|
+
"Vbuorna4hcChxDePlNLEfMipICcuxTcei1RBSlBa2t1tcnvoTy6cuYDqqImRYjp1KnMKlKQB"
|
1040
|
+
"nQ1NjS2TsRGm+F0FbreVCECgYEA4IDJlm8q/hVyNcPe4OzIcL1rsdYN3bNm2Y2O/"
|
1041
|
+
"YtRPIkQ446ItyxD06d9VuXsQpFp9jNACAPfCMSyHpPApqlxdc8z/"
|
1042
|
+
"xATlgHkcGezEOd1r4E7NdTpGg8y6Rj9b8kVlED6v4grbRhKcU6moyKUQT3+"
|
1043
|
+
"1B6ENZTOKyxuyDEgTwZHtFECgYEA0fqdv9h9s77d6eWmIioP7FSymq93pC4umxf6TVicpjpM"
|
1044
|
+
"ErdD2ZfJGulN37dq8FOsOFnSmFYJdICj/PbJm6p1i8O21lsFCltEqVoVabJ7/"
|
1045
|
+
"0alPfdG2U76OeBqI8ZubL4BMnWXAB/"
|
1046
|
+
"VVEYbyWCNpQSDTjHQYs54qa2I0dJB7OgJt1sCgYEArctFQ02/"
|
1047
|
+
"7H5Rscl1yo3DBXO94SeiCFSPdC8f2Kt3MfOxvVdkAtkjkMACSbkoUsgbTVqTYSEOEc2jTgR3"
|
1048
|
+
"iQ13JgpHaFbbsq64V0QP3TAxbLIQUjYGVgQaF1UfLOBv8hrzgj45z/ST/"
|
1049
|
+
"G80lOl595+0nCUbmBcgG1AEWrmdF0/"
|
1050
|
+
"3RmECgYAKvIzKXXB3+19vcT2ga5Qq2l3TiPtOGsppRb2XrNs9qKdxIYvHmXo/"
|
1051
|
+
"9QP1V3SRW0XoD7ez8FpFabp42cmPOxUNk3FK3paQZABLxH5pzCWI9PzIAVfPDrm+"
|
1052
|
+
"sdnbgG7vAnwfL2IMMJSA3aDYGCbF9EgefG+"
|
1053
|
+
"STcpfqq7fQ6f5TBgLFwKBgCd7gn1xYL696SaKVSm7VngpXlczHVEpz3kStWR5gfzriPBxXgM"
|
1054
|
+
"VcWmcbajRser7ARpCEfbxM1UJyv6oAYZWVSNErNzNVb4POqLYcCNySuC6xKhs9FrEQnyKjyk"
|
1055
|
+
"8wI4VnrEMGrQ8e+qYSwYk9Gh6dKGoRMAPYVXQAO0fIsHF/T0a";
|
1056
|
+
const char *data_to_sign = "data to sign";
|
1057
|
+
const char *expected_signature =
|
1058
|
+
"VocBRhpMmQ2XCzVehWSqheQLnU889gf3dhU4AnVnQTJjsKx/CM23qKDPkZDd2A/"
|
1059
|
+
"BnQsp99SN7ksIX5Raj0TPwyN5OCN/YrNFNGoOFlTsGhgP/"
|
1060
|
+
"hyE8X3Duiq6sNO0SMvRYNPFFGlJFsp1Fw3Z94eYMg4/Wpw5s4+Jo5Zm/"
|
1061
|
+
"qY7aTJIqDKDQ3CNHLeJgcMUOc9sz01/"
|
1062
|
+
"GzoUYKDVODHSxrYEk5ireFJFz9vP8P7Ha+"
|
1063
|
+
"VDUZuQIQdXer9NBbGFtYmWprY3nn4D3Dw93Sn0V0dIqYeIo91oKyslvMebmUM95S2PyIJdEp"
|
1064
|
+
"Pb2DJDxjvX/0LLwSWlSXRWy9gapWoBkb4ynqZBsg==";
|
1065
|
+
uint8_t *private_key_raw;
|
1066
|
+
size_t private_key_len;
|
1067
|
+
unsigned char *signature_raw;
|
1068
|
+
bool ret;
|
1069
|
+
char *signature_b64;
|
1070
|
+
|
1071
|
+
private_key_raw = kms_message_b64_to_raw (private_key_b64, &private_key_len);
|
1072
|
+
signature_raw = malloc (256);
|
1073
|
+
|
1074
|
+
ret = kms_sign_rsaes_pkcs1_v1_5 (NULL /* unused ctx */,
|
1075
|
+
(const char *) private_key_raw,
|
1076
|
+
private_key_len,
|
1077
|
+
data_to_sign,
|
1078
|
+
strlen (data_to_sign),
|
1079
|
+
signature_raw);
|
1080
|
+
KMS_ASSERT (ret);
|
1081
|
+
signature_b64 = kms_message_raw_to_b64 (signature_raw, 256);
|
1082
|
+
|
1083
|
+
if (0 != strcmp (signature_b64, expected_signature)) {
|
1084
|
+
printf ("generated signature: %s\n", signature_b64);
|
1085
|
+
printf ("but expected signature: %s\n", expected_signature);
|
1086
|
+
abort ();
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
/* Test with an invalid key. */
|
1090
|
+
ret = kms_sign_rsaes_pkcs1_v1_5 (
|
1091
|
+
NULL, "blah", 4, data_to_sign, strlen (data_to_sign), signature_raw);
|
1092
|
+
|
1093
|
+
free (private_key_raw);
|
1094
|
+
free (signature_raw);
|
1095
|
+
free (signature_b64);
|
1096
|
+
|
1097
|
+
KMS_ASSERT (!ret);
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
static void
|
1101
|
+
kms_request_kmip_prohibited_test (void)
|
1102
|
+
{
|
1103
|
+
kms_request_opt_t *opt;
|
1104
|
+
kms_request_t *req;
|
1105
|
+
|
1106
|
+
opt = kms_request_opt_new ();
|
1107
|
+
kms_request_opt_set_provider (opt, KMS_REQUEST_PROVIDER_KMIP);
|
1108
|
+
req = kms_request_new ("method", "path_and_query", opt);
|
1109
|
+
ASSERT_REQUEST_ERROR (req, "Function not applicable to KMIP");
|
1110
|
+
kms_request_destroy (req);
|
1111
|
+
kms_request_opt_destroy (opt);
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
static int
|
1115
|
+
count_substrings (const char *big, const char *little)
|
1116
|
+
{
|
1117
|
+
char *iter;
|
1118
|
+
int count = 0;
|
1119
|
+
|
1120
|
+
iter = strstr (big, little);
|
1121
|
+
while (iter != NULL) {
|
1122
|
+
count += 1;
|
1123
|
+
iter += strlen (little);
|
1124
|
+
iter = strstr (iter, little);
|
1125
|
+
}
|
1126
|
+
return count;
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
/* Test that outgoing HTTP requests use \r\n line delimitters, not \n.
|
1130
|
+
* This is a regression test for MONGOCRYPT-457. */
|
1131
|
+
static void
|
1132
|
+
test_request_newlines (void)
|
1133
|
+
{
|
1134
|
+
bool ok;
|
1135
|
+
kms_request_t *req;
|
1136
|
+
kms_request_opt_t *opt;
|
1137
|
+
uint8_t example_data[] = {0x01, 0x02, 0x03, 0x04};
|
1138
|
+
|
1139
|
+
// Test kms_request_to_string.
|
1140
|
+
{
|
1141
|
+
opt = kms_request_opt_new ();
|
1142
|
+
kms_request_opt_set_connection_close (opt, true);
|
1143
|
+
ASSERT (kms_request_opt_set_provider (opt, KMS_REQUEST_PROVIDER_AZURE));
|
1144
|
+
req = kms_azure_request_wrapkey_new ("example-host",
|
1145
|
+
"example-access-token",
|
1146
|
+
"example-key-name",
|
1147
|
+
"example-key-version",
|
1148
|
+
example_data,
|
1149
|
+
sizeof (example_data),
|
1150
|
+
opt);
|
1151
|
+
ASSERT_REQUEST_OK (req);
|
1152
|
+
char *req_str = kms_request_to_string (req);
|
1153
|
+
ASSERT_REQUEST_OK (req);
|
1154
|
+
ASSERT (req_str);
|
1155
|
+
/* Check that all \n have a \r. */
|
1156
|
+
int n = count_substrings (req_str, "\n");
|
1157
|
+
int rn = count_substrings (req_str, "\r\n");
|
1158
|
+
ASSERT_CMPINT (n, ==, rn);
|
1159
|
+
ASSERT_CMPINT (rn, ==, 8);
|
1160
|
+
free (req_str);
|
1161
|
+
kms_request_opt_destroy (opt);
|
1162
|
+
kms_request_destroy (req);
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
// Test kms_request_get_signed.
|
1166
|
+
{
|
1167
|
+
opt = kms_request_opt_new ();
|
1168
|
+
kms_request_opt_set_connection_close (opt, true);
|
1169
|
+
req = kms_caller_identity_request_new (opt);
|
1170
|
+
ASSERT_REQUEST_OK (req);
|
1171
|
+
ok = kms_request_set_region (req, "example-region");
|
1172
|
+
ASSERT_REQUEST_OK (req);
|
1173
|
+
ASSERT (ok);
|
1174
|
+
ok = kms_request_set_service (req, "example-service");
|
1175
|
+
ASSERT_REQUEST_OK (req);
|
1176
|
+
ASSERT (ok);
|
1177
|
+
ok = kms_request_set_access_key_id (req, "example-access-key-id");
|
1178
|
+
ASSERT_REQUEST_OK (req);
|
1179
|
+
ASSERT (ok);
|
1180
|
+
ok = kms_request_set_secret_key (req, "example-secret-key");
|
1181
|
+
ASSERT_REQUEST_OK (req);
|
1182
|
+
ASSERT (ok);
|
1183
|
+
char *req_str = kms_request_get_signed (req);
|
1184
|
+
ASSERT_REQUEST_OK (req);
|
1185
|
+
ASSERT (req_str);
|
1186
|
+
/* Check that all \n have a \r. */
|
1187
|
+
int n = count_substrings (req_str, "\n");
|
1188
|
+
int rn = count_substrings (req_str, "\r\n");
|
1189
|
+
ASSERT_CMPINT (n, ==, rn);
|
1190
|
+
ASSERT_CMPINT (rn, ==, 8);
|
1191
|
+
free (req_str);
|
1192
|
+
kms_request_opt_destroy (opt);
|
1193
|
+
kms_request_destroy (req);
|
1194
|
+
}
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
#define RUN_TEST(_func) \
|
1198
|
+
do { \
|
1199
|
+
if (!selector || 0 == kms_strcasecmp (#_func, selector)) { \
|
1200
|
+
printf ("%s\n", #_func); \
|
1201
|
+
_func (); \
|
1202
|
+
ran_tests = true; \
|
1203
|
+
} \
|
1204
|
+
} while (0)
|
1205
|
+
|
1206
|
+
extern void kms_kmip_writer_test (void);
|
1207
|
+
extern void kms_kmip_reader_test (void);
|
1208
|
+
extern void kms_kmip_reader_negative_int_test (void);
|
1209
|
+
extern void kms_kmip_reader_find_test (void);
|
1210
|
+
extern void kms_kmip_reader_find_and_recurse_test (void);
|
1211
|
+
extern void kms_kmip_reader_find_and_read_enum_test (void);
|
1212
|
+
extern void kms_kmip_reader_find_and_read_bytes_test (void);
|
1213
|
+
extern void kms_kmip_request_register_secretdata_test (void);
|
1214
|
+
extern void kms_kmip_request_register_secretdata_invalid_test (void);
|
1215
|
+
extern void kms_kmip_request_get_test (void);
|
1216
|
+
extern void kms_kmip_request_activate_test (void);
|
1217
|
+
extern void kms_kmip_response_parser_test (void);
|
1218
|
+
extern void kms_kmip_response_get_unique_identifier_test (void);
|
1219
|
+
extern void kms_kmip_response_get_secretdata_test (void);
|
1220
|
+
extern void kms_kmip_response_get_secretdata_notfound_test (void);
|
1221
|
+
extern void kms_kmip_response_parser_reuse_test (void);
|
1222
|
+
extern void kms_kmip_response_parser_excess_test (void);
|
1223
|
+
extern void kms_kmip_response_parser_notenough_test (void);
|
1224
|
+
|
1225
|
+
int
|
1226
|
+
main (int argc, char *argv[])
|
1227
|
+
{
|
1228
|
+
const char *help;
|
1229
|
+
char *selector = NULL;
|
1230
|
+
bool ran_tests = false;
|
1231
|
+
|
1232
|
+
help = "Usage: test_kms_request [TEST_NAME]";
|
1233
|
+
|
1234
|
+
if (argc > 2) {
|
1235
|
+
fprintf (stderr, "%s\n", help);
|
1236
|
+
abort ();
|
1237
|
+
} else if (argc == 2) {
|
1238
|
+
selector = argv[1];
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
int ret = kms_message_init ();
|
1242
|
+
if (ret != 0) {
|
1243
|
+
printf ("kms_message_init failed: 0x%x\n", ret);
|
1244
|
+
abort ();
|
1245
|
+
}
|
1246
|
+
|
1247
|
+
RUN_TEST (example_signature_test);
|
1248
|
+
RUN_TEST (path_normalization_test);
|
1249
|
+
RUN_TEST (host_test);
|
1250
|
+
RUN_TEST (content_length_test);
|
1251
|
+
RUN_TEST (bad_query_test);
|
1252
|
+
RUN_TEST (append_header_field_value_test);
|
1253
|
+
RUN_TEST (set_date_test);
|
1254
|
+
RUN_TEST (multibyte_test);
|
1255
|
+
RUN_TEST (connection_close_test);
|
1256
|
+
RUN_TEST (decrypt_request_test);
|
1257
|
+
RUN_TEST (encrypt_request_test);
|
1258
|
+
RUN_TEST (kv_list_del_test);
|
1259
|
+
RUN_TEST (b64_test);
|
1260
|
+
RUN_TEST (b64_b64url_test);
|
1261
|
+
|
1262
|
+
ran_tests |= all_aws_sig_v4_tests (aws_test_suite_dir, selector);
|
1263
|
+
|
1264
|
+
RUN_TEST (kms_response_parser_test);
|
1265
|
+
RUN_TEST (kms_response_parser_files);
|
1266
|
+
RUN_TEST (kms_request_validate_test);
|
1267
|
+
|
1268
|
+
RUN_TEST (kms_signature_test);
|
1269
|
+
|
1270
|
+
RUN_TEST (kms_kmip_writer_test);
|
1271
|
+
RUN_TEST (kms_kmip_reader_test);
|
1272
|
+
RUN_TEST (kms_kmip_reader_negative_int_test);
|
1273
|
+
RUN_TEST (kms_kmip_reader_test);
|
1274
|
+
RUN_TEST (kms_kmip_reader_find_and_recurse_test);
|
1275
|
+
RUN_TEST (kms_kmip_reader_find_and_read_enum_test);
|
1276
|
+
RUN_TEST (kms_kmip_reader_find_and_read_bytes_test);
|
1277
|
+
RUN_TEST (kms_kmip_request_register_secretdata_test);
|
1278
|
+
RUN_TEST (kms_kmip_request_register_secretdata_invalid_test);
|
1279
|
+
RUN_TEST (kms_kmip_request_get_test);
|
1280
|
+
RUN_TEST (kms_kmip_request_activate_test);
|
1281
|
+
RUN_TEST (kms_request_kmip_prohibited_test);
|
1282
|
+
RUN_TEST (kms_kmip_response_parser_test);
|
1283
|
+
RUN_TEST (kms_kmip_response_get_unique_identifier_test);
|
1284
|
+
RUN_TEST (kms_kmip_response_get_secretdata_test);
|
1285
|
+
RUN_TEST (kms_kmip_response_get_secretdata_notfound_test);
|
1286
|
+
RUN_TEST (kms_kmip_response_parser_reuse_test);
|
1287
|
+
RUN_TEST (kms_kmip_response_parser_excess_test);
|
1288
|
+
RUN_TEST (kms_kmip_response_parser_notenough_test);
|
1289
|
+
RUN_TEST (test_request_newlines);
|
1290
|
+
RUN_TEST (test_kms_util);
|
1291
|
+
|
1292
|
+
|
1293
|
+
if (!ran_tests) {
|
1294
|
+
KMS_ASSERT (argc == 2);
|
1295
|
+
fprintf (stderr, "No such test: \"%s\"\n", argv[1]);
|
1296
|
+
abort ();
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
kms_message_cleanup ();
|
1300
|
+
|
1301
|
+
return 0;
|
1302
|
+
}
|