libmongocrypt-helper 1.7.0.0.1001 → 1.7.4.0.1000
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/libmongocrypt/extconf.rb +70 -0
- data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +164 -0
- data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +699 -0
- data/ext/libmongocrypt/libmongocrypt/CODEOWNERS +13 -0
- data/ext/libmongocrypt/libmongocrypt/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/README.md +250 -0
- data/ext/libmongocrypt/libmongocrypt/VERSION_CURRENT +1 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/CMakeLists.txt +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/AssemblyInfo.cs +4 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Binary.cs +131 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/BinarySafeHandle.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CheckableSafeHandle.cs +46 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CipherCallbacks.cs +168 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/ContextSafeHandle.cs +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +238 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClientFactory.cs +134 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptContext.cs +214 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptException.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptOptions.cs +67 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HashCallback.cs +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/HmacShaCallbacks.cs +96 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/IStatus.cs +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsCredentials.cs +53 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsKeyId.cs +91 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequest.cs +125 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/KmsRequestCollection.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +652 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoader.cs +252 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LibraryLoadingException.cs +34 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/License.txt +14 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/LogLevel.cs +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoCryptSafeHandle.cs +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.csproj +106 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.ruleset +85 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/MongoDB.Libmongocrypt.targets +21 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/OperatingSystemHelper.cs +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Package.include.template.csproj +38 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/PinnedBinary.cs +49 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SecureRandomCallback.cs +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/SigningRSAESPKCSCallback.cs +74 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Status.cs +94 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StatusSafeHandle.cs +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/StyleCop.ruleset +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/stylecop.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Package.include.template.csproj +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/Program.cs +442 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +748 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BsonUtil.cs +82 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CallbackUtils.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/CipherCallbacksTests.cs +46 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HashCallbackTests.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/HmacShaCallbacksTests.cs +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/MongoDB.Libmongocrypt.Test.csproj +35 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/Package.include.template.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/SigningRSAESPKCSCallbackTests.cs +64 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-command.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-document.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/test/example/mongocryptd-command.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/xunit.runner.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/BasicTests.cs +54 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/MongoDB.Libmongocrypt.Test32.csproj +42 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test32/Package.include.template.csproj +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/README.md +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +219 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.ps1 +275 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.sh +77 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/README.md +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +339 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradle/wrapper/gradle-wrapper.properties +5 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew +188 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/gradlew.bat +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/BinaryHolder.java +45 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPI.java +1130 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CAPIHelper.java +96 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/CipherCallback.java +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/DisposableMemory.java +31 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/JULLogger.java +130 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Logger.java +144 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/Loggers.java +50 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MacCallback.java +60 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MessageDigestCallback.java +55 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoAwsKmsProviderOptions.java +104 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypt.java +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContext.java +137 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptContextImpl.java +164 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptException.java +67 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptImpl.java +408 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCryptOptions.java +284 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoCrypts.java +38 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoDataKeyOptions.java +125 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoExplicitEncryptOptions.java +225 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptor.java +76 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoKeyDecryptorImpl.java +105 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoLocalKmsProviderOptions.java +83 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/MongoRewrapManyDataKeyOptions.java +104 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SLF4JLogger.java +110 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SecureRandomCallback.java +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/SigningRSAESPKCSCallback.java +76 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/main/java/com/mongodb/crypt/capi/package-info.java +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +345 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/command.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-command.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-document.json +0 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/json-schema.json +15 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-document.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter-keyAltName.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/kms-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-command.json +22 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/CHANGELOG.md +81 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/README.md +773 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/binding.gyp +79 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/README.hbs +44 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/build-static.sh +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/index.d.ts +515 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/autoEncrypter.js +420 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/buffer_pool.js +123 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/clientEncryption.js +699 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/common.js +100 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/credentialsProvider.js +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/cryptoCallbacks.js +87 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/index.js +42 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/mongocryptdManager.js +66 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/stateMachine.js +487 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package-lock.json +16051 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/package.json +81 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.cc +929 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.h +114 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/autoEncrypter.test.js +953 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/buffer_pool.test.js +91 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/clientEncryption.test.js +701 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/credentialsProvider.test.js +163 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/cryptoCallbacks.test.js +284 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/README.md +5 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/collection-info.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encrypted-document-nested.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encrypted-document.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/encryptedFields.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/key-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/key1-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/kms-decrypt-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/data/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/mongocryptdManager.test.js +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/release.test.js +59 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/requirements.helper.js +29 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/stateMachine.test.js +331 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/node/test/tools/mongodb_reporter.js +325 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +121 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/LICENSE +201 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +187 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/RELEASE.rst +107 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/build-manylinux-wheel.sh +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/__init__.py +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/auto_encrypter.py +61 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binary.py +94 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +1561 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/compat.py +61 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/credentials.py +136 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/crypto.py +162 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/errors.py +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/explicit_encrypter.py +248 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +808 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/state_machine.py +156 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +17 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +92 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/setup.py +84 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/strip_header.py +51 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/__init__.py +37 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/collection-info.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/command-reply.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/command.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/cmd.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/compact/success/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-command-reply.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-command.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-field-config-map.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/encrypted-value.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document-azure.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document-gcp.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-document.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/key-filter.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/12345678123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/12345678123498761234123456789013-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply-azure.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply-gcp.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/kms-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/list-collections-filter.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/mongocryptd-command.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/mongocryptd-reply.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/schema-map.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_binding.py +71 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_crypto.py +49 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +825 -0
- data/ext/libmongocrypt/libmongocrypt/bindings/python/test-requirements.txt +12 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/FetchMongoC.cmake +20 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +209 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ImportDFP.cmake +70 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/IntelDFP.cmake +409 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/LTO.cmake +57 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/MongoC-Warnings.cmake +74 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-hidden-symbols.map +8 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-hidden-symbols.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt-static.pc.in +9 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/libmongocrypt.pc.in +10 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ltocheck-lib.c +6 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/ltocheck-main.c +9 -0
- data/ext/libmongocrypt/libmongocrypt/cmake/mongocrypt-config.cmake +42 -0
- data/ext/libmongocrypt/libmongocrypt/debian/build_snapshot.sh +79 -0
- data/ext/libmongocrypt/libmongocrypt/debian/changelog +105 -0
- data/ext/libmongocrypt/libmongocrypt/debian/compat +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/control +41 -0
- data/ext/libmongocrypt/libmongocrypt/debian/copyright +129 -0
- data/ext/libmongocrypt/libmongocrypt/debian/gbp.conf +23 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt-dev.dirs +2 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt-dev.install +5 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt0.dirs +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/libmongocrypt0.install +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/rules +46 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/format +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/lintian-overrides +3 -0
- data/ext/libmongocrypt/libmongocrypt/debian/source/options +1 -0
- data/ext/libmongocrypt/libmongocrypt/debian/watch +3 -0
- data/ext/libmongocrypt/libmongocrypt/doc/Doxygen +2474 -0
- data/ext/libmongocrypt/libmongocrypt/etc/calc_release_version.py +265 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/control +33 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/rules +41 -0
- data/ext/libmongocrypt/libmongocrypt/etc/debian/source/format +1 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_aead_generate_tests.py +41 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto.py +105 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto_selftest.py +52 -0
- data/ext/libmongocrypt/libmongocrypt/etc/fle2_generate_tests.py +34 -0
- data/ext/libmongocrypt/libmongocrypt/etc/generate-kek-tests.py +69 -0
- data/ext/libmongocrypt/libmongocrypt/etc/generate-test-data.py +141 -0
- data/ext/libmongocrypt/libmongocrypt/etc/list-compile-files.py +20 -0
- data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-MONGOCRYPT-571.patch +25 -0
- data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-s390x.patch +134 -0
- data/ext/libmongocrypt/libmongocrypt/etc/packager.py +854 -0
- data/ext/libmongocrypt/libmongocrypt/etc/print-marking.py +36 -0
- data/ext/libmongocrypt/libmongocrypt/etc/repo_config.yaml +257 -0
- data/ext/libmongocrypt/libmongocrypt/etc/requirements.txt +2 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rewrite.py +16 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rpm/libmongocrypt.spec +67 -0
- data/ext/libmongocrypt/libmongocrypt/etc/rpm/tweak.awk +19 -0
- data/ext/libmongocrypt/libmongocrypt/integrating.md +251 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/CMakeLists.txt +305 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/COPYING +177 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/README.md +41 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/THIRD_PARTY_NOTICES +42 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/LICENSE +202 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/NOTICE +2 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq +10 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/normalize-path/normalize-path.txt +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-sts-token/readme.txt +15 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req +3 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/cmake/kms_message-config.cmake +1 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/cmake/libkms_message.pc.in +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.c +67 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.h +24 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_azure_request.c +219 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_b64.c +654 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_caller_identity_request.c +52 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_apple.c +159 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_libcrypto.c +142 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_none.c +65 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_crypto_windows.c +268 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_decrypt_request.c +72 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_encrypt_request.c +73 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_endian_private.h +165 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_gcp_request.c +286 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_item_type_private.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_reader_writer.c +502 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_reader_writer_private.h +150 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_request.c +256 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response.c +323 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response_parser.c +148 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_response_parser_private.h +55 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_result_reason_private.h +77 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_result_status_private.h +54 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_tag_type_private.h +343 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kv_list.c +149 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kv_list.h +56 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_azure_request.h +110 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_b64.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_caller_identity_request.h +36 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_decrypt_request.h +37 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_encrypt_request.h +39 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_gcp_request.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_request.h +58 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_response.h +40 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_kmip_response_parser.h +26 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_message.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_message_defines.h +72 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_request.h +103 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_request_opt.h +80 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_response.h +43 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message/kms_response_parser.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message.c +47 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message_private.h +142 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_port.c +33 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_port.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request.c +925 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_opt.c +88 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_opt_private.h +32 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.c +520 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.h +89 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response.c +54 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response_parser.c +408 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.c +74 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/connection_close/connection_close.sreq +5 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/content_length/content_length.sreq +7 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/decrypt/decrypt.creq +11 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/decrypt/decrypt.sreq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/encrypt/encrypt.creq +11 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/encrypt/encrypt.sreq +9 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-chunked-response.bin +20 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-multi-chunked-response.bin +22 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/example-response.bin +6 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/host/host.sreq +4 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/multibyte/multibyte.creq +10 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/multibyte/multibyte.sreq +8 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kmip_reader_writer.c +485 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_assert.h +147 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_azure_online.c +260 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_gcp_online.c +250 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_request.c +223 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response.c +214 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response_parser.c +197 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.c +120 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.h +35 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_request.c +1302 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_util.c +92 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_util.h +45 -0
- data/ext/libmongocrypt/libmongocrypt/kms-message/test/windows/dirent.h +1224 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/cng.c +640 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/commoncrypto.c +326 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +97 -0
- data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +237 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-array-private.h +54 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-array.c +102 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-check-conversions-private.h +36 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +743 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +86 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +48 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +127 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +40 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +152 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +487 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private.h +47 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +156 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private.h +95 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +158 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +316 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private.h +179 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +385 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-private.h +93 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev.c +269 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-range-operator-private.h +29 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +91 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +658 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +124 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +161 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +242 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +128 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +620 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +308 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +112 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +99 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +382 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +130 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +235 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +118 -0
- data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +151 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/check.hpp +89 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/endian.h +42 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +685 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.c +3 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +407 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/macros.h +53 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +381 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +93 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +1028 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +137 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +88 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +4 -0
- data/ext/libmongocrypt/libmongocrypt/src/mlib/windows-lean.h +19 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongo_crypt-v1.h +320 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary-private.h +34 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary.c +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +236 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +691 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +24 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +82 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key-private.h +55 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +190 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth-private.h +46 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth.c +126 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +96 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +341 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +212 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-compat.h +44 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-config.h.in +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +303 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +1850 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +534 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +773 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +3005 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +269 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +415 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +1283 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +97 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endian-private.h +168 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint-private.h +64 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint.c +212 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek-private.h +109 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek.c +325 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker-private.h +209 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +1189 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +87 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +473 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +154 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +1785 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log-private.h +111 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +123 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +74 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +1624 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-mutex-private.h +46 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +231 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +493 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +197 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status-private.h +39 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status.c +169 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util-private.h +59 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +234 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util-private.h +84 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +203 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +1605 -0
- data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +1610 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +132 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +57 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +92 -0
- data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +155 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/NIST-CAVP.cstructs +1350 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/aes-ctr.cstructs +359 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/cache-tests.json +197 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-no-schema.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-no-validator.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collection-info-view.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/collinfo-siblings.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/missing-key-id/collinfo.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-fields/collinfo.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/no-fields/encrypted-payload.json +4 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/cmd.json +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-payload.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/mongocryptd-reply.json +72 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/cmd-to-mongocryptd.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/encrypted-payload.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/omitted/mongocryptd-reply.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/cmd-to-mongocryptd.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved/mongocryptd-reply.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/cmd-to-mongocryptd.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/collinfo.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/encrypted-payload.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_empty/mongocryptd-reply.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/cmd-to-mongocryptd.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/cmd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/collinfo.json +25 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/encrypted-payload.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/dollardb/preserved_fle1/mongocryptd-reply.json +15 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-extraField.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-missingKeyId.json +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-oneField.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/efc/efc-twoFields.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/encrypted-cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/encrypted-field-config-map.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decryption-input.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/find-with-encryptionInformation.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/cmd-to-mongocryptd.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/insert/collinfo.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-collMod/mongocryptd-reply.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/old-mongocryptd/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/cmd-to-mongocryptd.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/cmd.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/encrypted-payload.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-cmd-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/cmd-to-mongocryptd.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/with-schema/schema-map.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/cmd-to-mongocryptd.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-create/without-schema/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/collinfo.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-csfle/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/cmd-to-mongocryptd.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/collinfo.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle1-explain/with-mongocryptd/mongocryptd-reply.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-aead.cstructs +109 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/cmd-to-mongocryptd.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/cmd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/encrypted-field-config-map.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/encrypted-payload.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/ismaster-to-mongocryptd.json +3 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/mongocryptd-ismaster.json +12 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-create/mongocryptd-reply.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-decrypt-ieev/first-filter.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-decrypt-ieev/second-filter.json +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload.json +91 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/mongocryptd-reply.json +66 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/collinfo.json +49 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-field-config-map.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload.json +98 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/mongocryptd-reply.json +72 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/cmd-to-mongocryptd.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/collinfo.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-mongocryptd/mongocryptd-reply.json +47 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/encrypted-payload.json +41 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality/mongocryptd-reply.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongocryptd.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd-to-mongod.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-explicit/reply-from-mongocryptd.json +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/README.md +2 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/cmd.json +10 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/encrypted-payload.json +51 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision/mongocryptd-reply.json +59 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/cmd.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/encrypted-payload.json +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/rangeopts.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/value-to-encrypt.json +20 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload.json +16 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/value-to-encrypt.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/encrypted-payload.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/mongocryptd-reply.json +50 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/README.md +2 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/RNG_DATA.h +67 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/cmd.json +13 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/RNG_DATA.h +134 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/RNG_DATA.h +73 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/encrypted-payload.json +54 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/mongocryptd-reply.json +62 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/RNG_DATA.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-field-map.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/encrypted-payload.json +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/mongocryptd-reply.json +56 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/RNG_DATA.h +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/RNG_DATA.h +67 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/cmd.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-field-map.json +28 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/encrypted-payload.json +45 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/mongocryptd-reply.json +53 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/RNG_DATA.h +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/rangeopts.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/RNG_DATA.h +27 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/RNG_DATA.h +70 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/rangeopts.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/RNG_DATA.h +17 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload.json +8 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/rangeopts.json +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/value-to-encrypt.json +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/cmd.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/encrypted-field-map.json +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/encrypted-payload.json +14 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed/mongocryptd-reply.json +46 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/fle2.cstructs +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/decrypt-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/encrypt-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/gcp-auth/oauth-response.txt +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kek-tests.json +169 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-azure.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-full.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-gcp.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-kmip.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-local.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-no-region.json +31 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name-duplicate-id.json +36 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/key-document-with-alt-name2.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789013-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789014-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/12345678123498761234123456789014-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-aws-decrypt-reply.txt +11 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-aws-document.json +32 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-key-material.txt +1 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/ABCDEFAB123498761234123456789012-local-document.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/keys/README.md +21 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kms-encrypt-reply.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/kms-tests.json +297 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-cmd.json +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-existing-ciphertext.json +24 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-invalid.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-key-alt-name.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-key-alt-name2.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-no-encryption-needed.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-no-markings.json +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/mongocryptd-reply-random.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_decimal128.cstruct +14527 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_double.cstruct +7959 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_int32.cstruct +6906 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-edge-generation/edges_int64.cstruct +9429 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_decimal128.cstruct +4565 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_decimal128_precision.cstruct +312 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_double.cstruct +3277 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_double_precision.cstruct +369 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_int32.cstruct +4612 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/range-min-cover/mincover_int64.cstruct +3398 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-a.json +35 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-b.json +37 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/key-document-local.json +30 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-decrypt-reply-a.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-decrypt-reply-b.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-encrypt-reply-a.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/rmd/kms-encrypt-reply-b.txt +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema-map.json +40 -0
- data/ext/libmongocrypt/libmongocrypt/test/data/schema.json +19 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/README.md +5 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/cmd.json +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/collection-info.json +39 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/encrypted-command.json +9 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/key-document-custom-endpoint.json +34 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/key-document.json +33 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/kms-decrypt-reply.txt +6 -0
- data/ext/libmongocrypt/libmongocrypt/test/example/mongocryptd-reply.json +18 -0
- data/ext/libmongocrypt/libmongocrypt/test/example-no-bson.c +23 -0
- data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +368 -0
- data/ext/libmongocrypt/libmongocrypt/test/fuzz_kms.c +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +22 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +312 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +104 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +443 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +184 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +200 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +518 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +468 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +886 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +609 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +174 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +251 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +245 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +1079 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +26 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +218 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +266 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache-oauth.c +57 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +264 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +259 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +478 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +917 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +177 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.h +110 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +892 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +208 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +1134 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +5096 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +1061 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +1301 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +489 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +48 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +138 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +104 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-broker.c +1174 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +475 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key.c +282 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +561 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +206 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +89 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +137 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +738 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +88 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-traverse-util.c +548 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.c +105 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.h +42 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +1060 -0
- data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +290 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/HELP.autogen +102 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/README.md +103 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +612 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/helpgen.py +7 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/make_includes.py +845 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/util.c +969 -0
- data/ext/libmongocrypt/libmongocrypt/test/util/util.h +96 -0
- data/ext/libmongocrypt/libmongocrypt/third-party/IntelRDFPMathLib20U2.tar.xz +0 -0
- data/lib/libmongocrypt_helper/version.rb +2 -2
- data/lib/libmongocrypt_helper.rb +13 -1
- data.tar.gz.sig +0 -0
- metadata +988 -6
- metadata.gz.sig +0 -0
- data/so/libmongocrypt.so +0 -0
@@ -0,0 +1,886 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2022-present MongoDB, Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
#include "test-mongocrypt.h"
|
17
|
+
|
18
|
+
#include "mc-check-conversions-private.h"
|
19
|
+
#include "mc-range-encoding-private.h"
|
20
|
+
|
21
|
+
#include <float.h> // DBL_MAX
|
22
|
+
#include <math.h> // INFINITY, NAN
|
23
|
+
|
24
|
+
typedef struct {
|
25
|
+
mc_getTypeInfo32_args_t args;
|
26
|
+
mc_OSTType_Int32 expect;
|
27
|
+
const char *expectError;
|
28
|
+
} Int32Test;
|
29
|
+
|
30
|
+
static void
|
31
|
+
_test_RangeTest_Encode_Int32 (_mongocrypt_tester_t *tester)
|
32
|
+
{
|
33
|
+
Int32Test tests[] = {
|
34
|
+
/* Test cases copied from server Int32_NoBounds test ... begin */
|
35
|
+
{.args = {.value = INT32_C (2147483647)},
|
36
|
+
.expect = {.value = UINT32_C (4294967295), .min = 0, .max = UINT32_MAX}},
|
37
|
+
{.args = {.value = 1},
|
38
|
+
.expect = {.value = UINT32_C (2147483649), .min = 0, .max = UINT32_MAX}},
|
39
|
+
{.args = {.value = 0},
|
40
|
+
.expect = {.value = UINT32_C (2147483648), .min = 0, .max = UINT32_MAX}},
|
41
|
+
{.args = {.value = -1},
|
42
|
+
.expect = {.value = UINT32_C (2147483647), .min = 0, .max = UINT32_MAX}},
|
43
|
+
{.args = {.value = -2},
|
44
|
+
.expect = {.value = UINT32_C (2147483646), .min = 0, .max = UINT32_MAX}},
|
45
|
+
{.args = {.value = INT32_C (-2147483647)},
|
46
|
+
.expect = {.value = 1, .min = 0, .max = UINT32_MAX}},
|
47
|
+
{.args = {.value = INT32_MIN},
|
48
|
+
.expect = {.value = 0, .min = 0, .max = UINT32_MAX}},
|
49
|
+
/* Test cases copied from server Int32_NoBounds test ... end */
|
50
|
+
/* Test cases copied from server Int32_Bounds test .. begin */
|
51
|
+
{.args = {.value = 1, .min = OPT_I32 (1), .max = OPT_I32 (3)},
|
52
|
+
.expect = {.value = 0, 0, .max = 2}},
|
53
|
+
{.args = {.value = 0, .min = OPT_I32 (0), .max = OPT_I32 (1)},
|
54
|
+
.expect = {.value = 0, .min = 0, .max = 1}},
|
55
|
+
{.args = {.value = -1, .min = OPT_I32 (-1), .max = OPT_I32 (0)},
|
56
|
+
.expect = {.value = 0, .min = 0, .max = 1}},
|
57
|
+
{.args = {.value = -2, .min = OPT_I32 (-2), .max = OPT_I32 (0)},
|
58
|
+
.expect = {.value = 0, .min = 0, .max = 2}},
|
59
|
+
{.args = {.value = INT32_C (-2147483647),
|
60
|
+
.min = OPT_I32 (INT32_MIN),
|
61
|
+
.max = OPT_I32 (1)},
|
62
|
+
.expect = {.value = 1, .min = 0, .max = UINT32_C (2147483649)}},
|
63
|
+
{.args = {.value = INT32_MIN,
|
64
|
+
.min = OPT_I32 (INT32_MIN),
|
65
|
+
.max = OPT_I32 (0)},
|
66
|
+
.expect = {.value = 0, .min = 0, .max = UINT32_C (2147483648)}},
|
67
|
+
{.args = {.value = 0, .min = OPT_I32 (INT32_MIN), .max = OPT_I32 (1)},
|
68
|
+
.expect = {.value = UINT32_C (2147483648),
|
69
|
+
.min = 0,
|
70
|
+
.max = UINT32_C (2147483649)}},
|
71
|
+
{.args = {.value = 1, .min = OPT_I32 (INT32_MIN), .max = OPT_I32 (2)},
|
72
|
+
.expect = {.value = UINT32_C (2147483649),
|
73
|
+
.min = 0,
|
74
|
+
.max = UINT32_C (2147483650)}},
|
75
|
+
{.args = {.value = INT32_C (2147483647),
|
76
|
+
.min = OPT_I32 (-2147483647),
|
77
|
+
.max = OPT_I32 (2147483647)},
|
78
|
+
.expect = {.value = UINT32_C (4294967294),
|
79
|
+
.min = 0,
|
80
|
+
.max = UINT32_C (4294967294)}},
|
81
|
+
{.args = {.value = INT32_C (2147483647),
|
82
|
+
.min = OPT_I32 (INT32_MIN),
|
83
|
+
.max = OPT_I32 (2147483647)},
|
84
|
+
.expect = {.value = UINT32_C (4294967295),
|
85
|
+
.min = 0,
|
86
|
+
.max = UINT32_C (4294967295)}},
|
87
|
+
{.args = {.value = 15, .min = OPT_I32 (10), .max = OPT_I32 (26)},
|
88
|
+
.expect = {.value = 5, .min = 0, .max = 16}},
|
89
|
+
{.args = {.value = 15, .min = OPT_I32 (-10), .max = OPT_I32 (55)},
|
90
|
+
.expect = {.value = 25, .min = 0, .max = 65}},
|
91
|
+
/* Test cases copied from server Int32_Bounds test ... end */
|
92
|
+
/* Test cases copied from server Int32_Errors test ... begin */
|
93
|
+
{.args = {.value = 1, .max = OPT_I32 (2)},
|
94
|
+
.expectError =
|
95
|
+
"Must specify both a lower and upper bound or no bounds."},
|
96
|
+
{.args = {.value = 1, .min = OPT_I32 (0)},
|
97
|
+
.expectError =
|
98
|
+
"Must specify both a lower and upper bound or no bounds."},
|
99
|
+
{.args = {.value = 1, .min = OPT_I32 (2), .max = OPT_I32 (1)},
|
100
|
+
.expectError = "The minimum value must be less than the maximum value"},
|
101
|
+
{.args = {.value = 1, .min = OPT_I32 (2), .max = OPT_I32 (3)},
|
102
|
+
.expectError = "Value must be greater than or equal to the minimum "
|
103
|
+
"value and less than or equal to the maximum value"},
|
104
|
+
{.args = {.value = 4, .min = OPT_I32 (2), .max = OPT_I32 (3)},
|
105
|
+
.expectError = "Value must be greater than or equal to the minimum "
|
106
|
+
"value and less than or equal to the maximum value"},
|
107
|
+
{.args = {.value = 4,
|
108
|
+
.min = OPT_I32 (INT32_MIN),
|
109
|
+
.max = OPT_I32 (INT32_MIN)},
|
110
|
+
.expectError = "The minimum value must be less than the maximum value"},
|
111
|
+
/* Test cases copied from server Int32_Errors test ... end */
|
112
|
+
};
|
113
|
+
|
114
|
+
for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
115
|
+
Int32Test *test = tests + i;
|
116
|
+
mongocrypt_status_t *const status = mongocrypt_status_new ();
|
117
|
+
|
118
|
+
// Print a description of the test case.
|
119
|
+
printf ("_test_RangeTest_Encode_Int32: value=%" PRId32, test->args.value);
|
120
|
+
if (test->args.min.set) {
|
121
|
+
printf (" min=%" PRId32, test->args.min.value);
|
122
|
+
}
|
123
|
+
if (test->args.max.set) {
|
124
|
+
printf (" max=%" PRId32, test->args.max.value);
|
125
|
+
}
|
126
|
+
printf ("\n");
|
127
|
+
mc_OSTType_Int32 got;
|
128
|
+
const bool ok = mc_getTypeInfo32 (test->args, &got, status);
|
129
|
+
if (test->expectError) {
|
130
|
+
ASSERT_OR_PRINT_MSG (!ok, "expected error, but got none");
|
131
|
+
ASSERT_STATUS_CONTAINS (status, test->expectError);
|
132
|
+
} else {
|
133
|
+
ASSERT_OK_STATUS (ok, status);
|
134
|
+
ASSERT_CMPUINT32 (got.value, ==, test->expect.value);
|
135
|
+
ASSERT_CMPUINT32 (got.min, ==, test->expect.min);
|
136
|
+
ASSERT_CMPUINT32 (got.max, ==, test->expect.max);
|
137
|
+
}
|
138
|
+
mongocrypt_status_destroy (status);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
typedef struct {
|
143
|
+
mc_getTypeInfo64_args_t args;
|
144
|
+
mc_OSTType_Int64 expect;
|
145
|
+
const char *expectError;
|
146
|
+
} Int64Test;
|
147
|
+
|
148
|
+
static void
|
149
|
+
_test_RangeTest_Encode_Int64 (_mongocrypt_tester_t *tester)
|
150
|
+
{
|
151
|
+
Int64Test tests[] = {
|
152
|
+
/* Test cases copied from server Int64_NoBounds test ... begin */
|
153
|
+
{.args = {.value = INT64_C (9223372036854775807)},
|
154
|
+
.expect = {.value = UINT64_C (18446744073709551615),
|
155
|
+
.min = 0,
|
156
|
+
.max = UINT64_MAX}},
|
157
|
+
{.args = {.value = 1},
|
158
|
+
.expect = {.value = UINT64_C (9223372036854775809),
|
159
|
+
.min = 0,
|
160
|
+
.max = UINT64_MAX}},
|
161
|
+
{.args = {.value = 0},
|
162
|
+
.expect = {.value = UINT64_C (9223372036854775808),
|
163
|
+
.min = 0,
|
164
|
+
.max = UINT64_MAX}},
|
165
|
+
{.args = {.value = -1},
|
166
|
+
.expect = {.value = UINT64_C (9223372036854775807),
|
167
|
+
.min = 0,
|
168
|
+
.max = UINT64_MAX}},
|
169
|
+
{.args = {.value = -2},
|
170
|
+
.expect = {.value = UINT64_C (9223372036854775806),
|
171
|
+
.min = 0,
|
172
|
+
.max = UINT64_MAX}},
|
173
|
+
{.args = {.value = INT64_C (-9223372036854775807)},
|
174
|
+
.expect = {.value = 1, .min = 0, .max = UINT64_MAX}},
|
175
|
+
{.args = {.value = INT64_MIN},
|
176
|
+
.expect = {.value = 0, .min = 0, .max = UINT64_MAX}},
|
177
|
+
/* Test cases copied from server Int64_NoBounds test ... end */
|
178
|
+
/* Test cases copied from server Int64_Bounds test ... begin */
|
179
|
+
{.args = {.value = 1, .min = OPT_I64 (1), .max = OPT_I64 (2)},
|
180
|
+
.expect = {.value = 0, .min = 0, .max = 1}},
|
181
|
+
{.args = {.value = 0, .min = OPT_I64 (0), .max = OPT_I64 (1)},
|
182
|
+
.expect = {.value = 0, .min = 0, .max = 1}},
|
183
|
+
{.args = {.value = -1, .min = OPT_I64 (-1), .max = OPT_I64 (0)},
|
184
|
+
.expect = {.value = 0, .min = 0, .max = 1}},
|
185
|
+
{.args = {.value = -2, .min = OPT_I64 (-2), .max = OPT_I64 (0)},
|
186
|
+
.expect = {.value = 0, .min = 0, .max = 2}},
|
187
|
+
{.args = {.value = INT64_C (-9223372036854775807),
|
188
|
+
.min = OPT_I64 (INT64_MIN),
|
189
|
+
.max = OPT_I64 (1)},
|
190
|
+
.expect = {.value = 1, .min = 0, .max = UINT64_C (9223372036854775809)}},
|
191
|
+
{.args = {.value = INT64_MIN,
|
192
|
+
.min = OPT_I64 (INT64_MIN),
|
193
|
+
.max = OPT_I64 (0)},
|
194
|
+
.expect = {.value = 0, .min = 0, .max = UINT64_C (9223372036854775808)}},
|
195
|
+
{.args = {.value = 0, .min = OPT_I64 (INT64_MIN), .max = OPT_I64 (37)},
|
196
|
+
.expect = {.value = UINT64_C (9223372036854775808),
|
197
|
+
.min = 0,
|
198
|
+
.max = UINT64_C (9223372036854775845)}},
|
199
|
+
{.args = {.value = 1, .min = OPT_I64 (INT64_MIN), .max = OPT_I64 (42)},
|
200
|
+
.expect = {.value = UINT64_C (9223372036854775809),
|
201
|
+
.min = 0,
|
202
|
+
.max = UINT64_C (9223372036854775850)}},
|
203
|
+
{.args = {.value = INT64_C (9223372036854775807),
|
204
|
+
.min = OPT_I64 (-9223372036854775807),
|
205
|
+
.max = OPT_I64 (9223372036854775807)},
|
206
|
+
.expect = {.value = UINT64_C (18446744073709551614),
|
207
|
+
.min = 0,
|
208
|
+
.max = UINT64_C (18446744073709551614)}},
|
209
|
+
{.args = {.value = INT64_C (9223372036854775807),
|
210
|
+
.min = OPT_I64 (INT64_MIN),
|
211
|
+
.max = OPT_I64 (9223372036854775807)},
|
212
|
+
.expect = {.value = UINT64_C (18446744073709551615),
|
213
|
+
.min = 0,
|
214
|
+
.max = UINT64_C (18446744073709551615)}},
|
215
|
+
{.args = {.value = 15, .min = OPT_I64 (10), .max = OPT_I64 (26)},
|
216
|
+
.expect = {.value = 5, .min = 0, .max = 16}},
|
217
|
+
{.args = {.value = 15, .min = OPT_I64 (-10), .max = OPT_I64 (55)},
|
218
|
+
.expect = {.value = 25, .min = 0, .max = 65}},
|
219
|
+
/* Test cases copied from server Int64_Bounds test ... end */
|
220
|
+
/* Test cases copied from server Int64_Errors test ... begin */
|
221
|
+
{.args = {.value = 1, .max = OPT_I64 (2)},
|
222
|
+
.expectError =
|
223
|
+
"Must specify both a lower and upper bound or no bounds."},
|
224
|
+
{.args = {.value = 1, .min = OPT_I64 (0)},
|
225
|
+
.expectError =
|
226
|
+
"Must specify both a lower and upper bound or no bounds."},
|
227
|
+
{.args = {.value = 1, .min = OPT_I64 (2), .max = OPT_I64 (1)},
|
228
|
+
.expectError = "The minimum value must be less than the maximum value"},
|
229
|
+
{.args = {.value = 1, .min = OPT_I64 (2), .max = OPT_I64 (3)},
|
230
|
+
.expectError = "Value must be greater than or equal to the minimum "
|
231
|
+
"value and less than or equal to the maximum value"},
|
232
|
+
{.args = {.value = 4, .min = OPT_I64 (2), .max = OPT_I64 (3)},
|
233
|
+
.expectError = "Value must be greater than or equal to the minimum "
|
234
|
+
"value and less than or equal to the maximum value"},
|
235
|
+
{.args = {.value = 4,
|
236
|
+
.min = OPT_I64 (INT64_MIN),
|
237
|
+
.max = OPT_I64 (INT64_MIN)},
|
238
|
+
.expectError = "The minimum value must be less than the maximum value"},
|
239
|
+
/* Test cases copied from server Int64_Errors test ... end */
|
240
|
+
};
|
241
|
+
|
242
|
+
for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
243
|
+
Int64Test *test = tests + i;
|
244
|
+
mongocrypt_status_t *const status = mongocrypt_status_new ();
|
245
|
+
|
246
|
+
// Print a description of the test case.
|
247
|
+
printf ("_test_RangeTest_Encode_Int64: value=%" PRId64, test->args.value);
|
248
|
+
if (test->args.min.set) {
|
249
|
+
printf (" min=%" PRId64, test->args.min.value);
|
250
|
+
}
|
251
|
+
if (test->args.max.set) {
|
252
|
+
printf (" max=%" PRId64, test->args.max.value);
|
253
|
+
}
|
254
|
+
printf ("\n");
|
255
|
+
mc_OSTType_Int64 got;
|
256
|
+
const bool ok = mc_getTypeInfo64 (test->args, &got, status);
|
257
|
+
if (test->expectError) {
|
258
|
+
ASSERT_OR_PRINT_MSG (!ok, "expected error, but got none");
|
259
|
+
ASSERT_STATUS_CONTAINS (status, test->expectError);
|
260
|
+
} else {
|
261
|
+
ASSERT_OK_STATUS (ok, status);
|
262
|
+
ASSERT_CMPUINT64 (got.value, ==, test->expect.value);
|
263
|
+
ASSERT_CMPUINT64 (got.min, ==, test->expect.min);
|
264
|
+
ASSERT_CMPUINT64 (got.max, ==, test->expect.max);
|
265
|
+
}
|
266
|
+
mongocrypt_status_destroy (status);
|
267
|
+
}
|
268
|
+
}
|
269
|
+
|
270
|
+
typedef struct {
|
271
|
+
double value;
|
272
|
+
mc_optional_double_t min;
|
273
|
+
mc_optional_double_t max;
|
274
|
+
mc_optional_uint32_t precision;
|
275
|
+
uint64_t expect;
|
276
|
+
mc_optional_uint64_t expectMax;
|
277
|
+
const char *expectError;
|
278
|
+
} DoubleTest;
|
279
|
+
|
280
|
+
static void
|
281
|
+
_test_RangeTest_Encode_Double (_mongocrypt_tester_t *tester)
|
282
|
+
{
|
283
|
+
DoubleTest tests[] = {
|
284
|
+
/* Test cases copied from server Double_Bounds test ... begin */
|
285
|
+
// Larger numbers map to larger uint64
|
286
|
+
{.value = -1111, .expect = UINT64_C (4570770991734587392)},
|
287
|
+
{.value = -111, .expect = UINT64_C (4585860689314185216)},
|
288
|
+
{.value = -11, .expect = UINT64_C (4600989969312382976)},
|
289
|
+
{.value = -10, .expect = UINT64_C (4601552919265804288)},
|
290
|
+
{.value = -3, .expect = UINT64_C (4609434218613702656)},
|
291
|
+
{.value = -2, .expect = UINT64_C (4611686018427387904)},
|
292
|
+
|
293
|
+
{.value = -1, .expect = UINT64_C (4616189618054758400)},
|
294
|
+
{.value = 1, .expect = UINT64_C (13830554455654793216)},
|
295
|
+
{.value = 22, .expect = UINT64_C (13850257704024539136)},
|
296
|
+
{.value = 333, .expect = UINT64_C (13867937850999177216)},
|
297
|
+
|
298
|
+
// Larger exponents map to larger uint64
|
299
|
+
{.value = 33E56, .expect = UINT64_C (14690973652625833878)},
|
300
|
+
{.value = 22E57, .expect = UINT64_C (14703137697061005818)},
|
301
|
+
{.value = 11E58, .expect = UINT64_C (14713688953586463292)},
|
302
|
+
|
303
|
+
// Smaller exponents map to smaller uint64
|
304
|
+
{.value = 1E-6, .expect = UINT64_C (13740701229962882445)},
|
305
|
+
{.value = 1E-7, .expect = UINT64_C (13725520251343122248)},
|
306
|
+
{.value = 1E-8, .expect = UINT64_C (13710498295186492474)},
|
307
|
+
{.value = 1E-56, .expect = UINT64_C (12992711961033031890)},
|
308
|
+
{.value = 1E-57, .expect = UINT64_C (12977434315086142017)},
|
309
|
+
{.value = 1E-58, .expect = UINT64_C (12962510038552207822)},
|
310
|
+
|
311
|
+
// Smaller negative exponents map to smaller uint64
|
312
|
+
{.value = -1E-06, .expect = UINT64_C (4706042843746669171)},
|
313
|
+
{.value = -1E-07, .expect = UINT64_C (4721223822366429368)},
|
314
|
+
{.value = -1E-08, .expect = UINT64_C (4736245778523059142)},
|
315
|
+
{.value = -1E-56, .expect = UINT64_C (5454032112676519726)},
|
316
|
+
{.value = -1E-57, .expect = UINT64_C (5469309758623409599)},
|
317
|
+
{.value = -1E-58, .expect = UINT64_C (5484234035157343794)},
|
318
|
+
|
319
|
+
// Larger exponents map to larger uint64
|
320
|
+
{.value = -33E+56, .expect = UINT64_C (3755770421083717738)},
|
321
|
+
{.value = -22E+57, .expect = UINT64_C (3743606376648545798)},
|
322
|
+
{.value = -11E+58, .expect = UINT64_C (3733055120123088324)},
|
323
|
+
|
324
|
+
{.value = 0, .expect = UINT64_C (9223372036854775808)},
|
325
|
+
{.value = -0.0, .expect = UINT64_C (9223372036854775808)},
|
326
|
+
/* Test cases copied from server Double_Bounds test ... end */
|
327
|
+
/* Test cases copied from server Double_Errors test ... begin */
|
328
|
+
{.value = INFINITY,
|
329
|
+
.expectError = "Infinity and NaN double values are not supported."},
|
330
|
+
{.value = NAN,
|
331
|
+
.expectError = "Infinity and NaN double values are not supported."},
|
332
|
+
/* Test cases copied from server Double_Errors test ... end */
|
333
|
+
|
334
|
+
/* Test cases copied from Double_Bounds_Precision ... begin */
|
335
|
+
{.value = 3.141592653589,
|
336
|
+
.precision = OPT_U32_C (1),
|
337
|
+
.min = OPT_DOUBLE_C (-100000),
|
338
|
+
.max = OPT_DOUBLE_C (100000),
|
339
|
+
.expect = UINT64_C (1000031),
|
340
|
+
.expectMax = OPT_U64_C (2097151)},
|
341
|
+
{.value = 3.141592653589,
|
342
|
+
.precision = OPT_U32_C (2),
|
343
|
+
.min = OPT_DOUBLE_C (-100000),
|
344
|
+
.max = OPT_DOUBLE_C (100000),
|
345
|
+
.expect = 10000314,
|
346
|
+
.expectMax = OPT_U64_C (33554431)},
|
347
|
+
{.value = 3.141592653589,
|
348
|
+
.precision = OPT_U32_C (3),
|
349
|
+
.min = OPT_DOUBLE_C (-100000),
|
350
|
+
.max = OPT_DOUBLE_C (100000),
|
351
|
+
.expect = 100003141,
|
352
|
+
.expectMax = OPT_U64_C (268435455)},
|
353
|
+
{.value = 3.141592653589,
|
354
|
+
.precision = OPT_U32_C (4),
|
355
|
+
.min = OPT_DOUBLE_C (-100000),
|
356
|
+
.max = OPT_DOUBLE_C (100000),
|
357
|
+
.expect = 1000031415,
|
358
|
+
.expectMax = OPT_U64_C (2147483647)},
|
359
|
+
{.value = 3.141592653589,
|
360
|
+
.precision = OPT_U32_C (5),
|
361
|
+
.min = OPT_DOUBLE_C (-100000),
|
362
|
+
.max = OPT_DOUBLE_C (100000),
|
363
|
+
.expect = 10000314159,
|
364
|
+
.expectMax = OPT_U64_C (34359738367)},
|
365
|
+
{.value = 3.141592653589,
|
366
|
+
.precision = OPT_U32_C (6),
|
367
|
+
.min = OPT_DOUBLE_C (-100000),
|
368
|
+
.max = OPT_DOUBLE_C (100000),
|
369
|
+
.expect = 100003141592,
|
370
|
+
.expectMax = OPT_U64_C (274877906943)},
|
371
|
+
{.value = 3.141592653589,
|
372
|
+
.precision = OPT_U32_C (7),
|
373
|
+
.min = OPT_DOUBLE_C (-100000),
|
374
|
+
.max = OPT_DOUBLE_C (100000),
|
375
|
+
.expect = 1000031415926,
|
376
|
+
.expectMax = OPT_U64_C (2199023255551)},
|
377
|
+
{.value = 0,
|
378
|
+
.max = OPT_DOUBLE_C (1),
|
379
|
+
.min = OPT_DOUBLE_C (-1),
|
380
|
+
.precision = OPT_U32_C (3),
|
381
|
+
.expect = 1000,
|
382
|
+
.expectMax = OPT_U64_C (4095)},
|
383
|
+
{.value = 0,
|
384
|
+
.max = OPT_DOUBLE_C (1),
|
385
|
+
.min = OPT_DOUBLE_C (-1E5),
|
386
|
+
.precision = OPT_U32_C (3),
|
387
|
+
.expect = 100000000,
|
388
|
+
.expectMax = OPT_U64_C (134217727)},
|
389
|
+
{.value = -1E-33,
|
390
|
+
.max = OPT_DOUBLE_C (1),
|
391
|
+
.min = OPT_DOUBLE_C (-1E5),
|
392
|
+
.precision = OPT_U32_C (3),
|
393
|
+
.expect = 100000000,
|
394
|
+
.expectMax = OPT_U64_C (134217727)},
|
395
|
+
{.value = 0,
|
396
|
+
.max = OPT_DOUBLE_C (DBL_MAX),
|
397
|
+
.min = OPT_DOUBLE_C (-DBL_MAX),
|
398
|
+
.precision = OPT_U32_C (3),
|
399
|
+
.expect = UINT64_C (9223372036854775808),
|
400
|
+
// Expect precision not to be used.
|
401
|
+
.expectMax = OPT_U64_C (UINT64_MAX)},
|
402
|
+
{.value = 3.141592653589,
|
403
|
+
.max = OPT_DOUBLE_C (5),
|
404
|
+
.min = OPT_DOUBLE_C (0),
|
405
|
+
.precision = OPT_U32_C (0),
|
406
|
+
.expect = 3,
|
407
|
+
.expectMax = OPT_U64_C (7)},
|
408
|
+
{.value = 3.141592653589,
|
409
|
+
.max = OPT_DOUBLE_C (5),
|
410
|
+
.min = OPT_DOUBLE_C (0),
|
411
|
+
.precision = OPT_U32_C (1),
|
412
|
+
.expect = 31,
|
413
|
+
.expectMax = OPT_U64_C (63)},
|
414
|
+
{.value = 3.141592653589,
|
415
|
+
.max = OPT_DOUBLE_C (5),
|
416
|
+
.min = OPT_DOUBLE_C (0),
|
417
|
+
.precision = OPT_U32_C (2),
|
418
|
+
.expect = 314,
|
419
|
+
.expectMax = OPT_U64_C (1023)},
|
420
|
+
{.value = 3.141592653589,
|
421
|
+
.max = OPT_DOUBLE_C (5),
|
422
|
+
.min = OPT_DOUBLE_C (0),
|
423
|
+
.precision = OPT_U32_C (3),
|
424
|
+
.expect = 3141,
|
425
|
+
.expectMax = OPT_U64_C (8191)},
|
426
|
+
{.value = 3.141592653589,
|
427
|
+
.max = OPT_DOUBLE_C (5),
|
428
|
+
.min = OPT_DOUBLE_C (0),
|
429
|
+
.precision = OPT_U32_C (16),
|
430
|
+
.expect = 31415926535890000,
|
431
|
+
.expectMax = OPT_U64_C (72057594037927935)},
|
432
|
+
{.value = -5,
|
433
|
+
.max = OPT_DOUBLE_C (-1),
|
434
|
+
.min = OPT_DOUBLE_C (-10),
|
435
|
+
.precision = OPT_U32_C (3),
|
436
|
+
.expect = 5000,
|
437
|
+
.expectMax = OPT_U64_C (16383)},
|
438
|
+
{.value = 1E100,
|
439
|
+
.max = OPT_DOUBLE_C (DBL_MAX),
|
440
|
+
.min = OPT_DOUBLE_C (-DBL_MAX),
|
441
|
+
.precision = OPT_U32_C (3),
|
442
|
+
.expect = 15326393489903895421ULL,
|
443
|
+
// Expect precision not to be used.
|
444
|
+
.expectMax = OPT_U64_C (UINT64_MAX)},
|
445
|
+
{.value = 1E9,
|
446
|
+
.max = OPT_DOUBLE_C (1E10),
|
447
|
+
.min = OPT_DOUBLE_C (0),
|
448
|
+
.precision = OPT_U32_C (3),
|
449
|
+
.expect = 1000000000000,
|
450
|
+
.expectMax = OPT_U64_C (17592186044415)},
|
451
|
+
{.value = 1E9,
|
452
|
+
.max = OPT_DOUBLE_C (1E10),
|
453
|
+
.min = OPT_DOUBLE_C (0),
|
454
|
+
.precision = OPT_U32_C (0),
|
455
|
+
.expect = 1000000000,
|
456
|
+
.expectMax = OPT_U64_C (17179869183)},
|
457
|
+
{.value = -5,
|
458
|
+
.max = OPT_DOUBLE_C (10),
|
459
|
+
.min = OPT_DOUBLE_C (-10),
|
460
|
+
.precision = OPT_U32_C (0),
|
461
|
+
.expect = 5,
|
462
|
+
.expectMax = OPT_U64_C (31)},
|
463
|
+
{.value = -5,
|
464
|
+
.max = OPT_DOUBLE_C (10),
|
465
|
+
.min = OPT_DOUBLE_C (-10),
|
466
|
+
.precision = OPT_U32_C (2),
|
467
|
+
.expect = 500,
|
468
|
+
.expectMax = OPT_U64_C (4095)},
|
469
|
+
{.value = 1E-30,
|
470
|
+
.max = OPT_DOUBLE_C (10E-30),
|
471
|
+
.min = OPT_DOUBLE_C (1E-30),
|
472
|
+
.precision = OPT_U32_C (35),
|
473
|
+
.expect = 13381399884061196960ULL,
|
474
|
+
// Expect precision not to be used.
|
475
|
+
.expectMax = OPT_U64_C (UINT64_MAX)},
|
476
|
+
/* Test cases copied from Double_Bounds_Precision ... end */
|
477
|
+
{.value = -1,
|
478
|
+
.min = OPT_DOUBLE_C (0),
|
479
|
+
.max = OPT_DOUBLE_C (200),
|
480
|
+
.precision = OPT_U32_C (1),
|
481
|
+
.expectError = "greater than or equal to the minimum value"},
|
482
|
+
{.value = -1,
|
483
|
+
.min = OPT_DOUBLE_C (0),
|
484
|
+
.max = OPT_DOUBLE_C (201),
|
485
|
+
.precision = OPT_U32_C (1),
|
486
|
+
.expectError = "less than or equal to the maximum value"}};
|
487
|
+
|
488
|
+
for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
489
|
+
DoubleTest *test = tests + i;
|
490
|
+
mongocrypt_status_t *const status = mongocrypt_status_new ();
|
491
|
+
|
492
|
+
if (test->min.set && test->max.set && test->precision.set) {
|
493
|
+
printf ("_test_RangeTest_Encode_Double: value=%f, min=%f, max=%f, "
|
494
|
+
"precision=%" PRIu32 "\n",
|
495
|
+
test->value,
|
496
|
+
test->min.value,
|
497
|
+
test->max.value,
|
498
|
+
test->precision.value);
|
499
|
+
} else {
|
500
|
+
printf ("_test_RangeTest_Encode_Double: value=%f\n", test->value);
|
501
|
+
}
|
502
|
+
|
503
|
+
mc_OSTType_Double got;
|
504
|
+
const bool ok = mc_getTypeInfoDouble (
|
505
|
+
(mc_getTypeInfoDouble_args_t){.value = test->value,
|
506
|
+
.min = test->min,
|
507
|
+
.max = test->max,
|
508
|
+
.precision = test->precision},
|
509
|
+
&got,
|
510
|
+
status);
|
511
|
+
if (test->expectError) {
|
512
|
+
ASSERT_OR_PRINT_MSG (!ok, "expected error, but got none");
|
513
|
+
ASSERT_STATUS_CONTAINS (status, test->expectError);
|
514
|
+
} else {
|
515
|
+
ASSERT_OK_STATUS (ok, status);
|
516
|
+
ASSERT_CMPUINT64 (got.value, ==, test->expect);
|
517
|
+
ASSERT_CMPUINT64 (got.min, ==, 0);
|
518
|
+
ASSERT_CMPUINT64 (got.max,
|
519
|
+
==,
|
520
|
+
test->expectMax.set ? test->expectMax.value
|
521
|
+
: UINT64_MAX);
|
522
|
+
}
|
523
|
+
mongocrypt_status_destroy (status);
|
524
|
+
}
|
525
|
+
}
|
526
|
+
|
527
|
+
|
528
|
+
#if MONGOCRYPT_HAVE_DECIMAL128_SUPPORT
|
529
|
+
typedef struct {
|
530
|
+
mc_dec128 value;
|
531
|
+
mc_optional_dec128_t min;
|
532
|
+
mc_optional_dec128_t max;
|
533
|
+
mc_optional_uint32_t precision;
|
534
|
+
mlib_int128 expect;
|
535
|
+
const char *expectError;
|
536
|
+
} Decimal128Test;
|
537
|
+
|
538
|
+
static void
|
539
|
+
_test_RangeTest_Encode_Decimal128 (_mongocrypt_tester_t *tester)
|
540
|
+
{
|
541
|
+
Decimal128Test tests[] = {
|
542
|
+
#define CASE(Value, ExpectStr) \
|
543
|
+
(Decimal128Test){.value = mc_dec128_from_string (#Value), \
|
544
|
+
.expect = mlib_int128_from_string (ExpectStr, NULL)}
|
545
|
+
/* Test cases copied from server Decimal128_Bounds test ... begin */
|
546
|
+
// Larger numbers map to larger int128
|
547
|
+
CASE (-1234567890E7, "108549948892579231731687303715884111887"),
|
548
|
+
CASE (-1234567890E6, "108559948892579231731687303715884111886"),
|
549
|
+
CASE (-1234567890E5, "108569948892579231731687303715884111885"),
|
550
|
+
CASE (-1234567890E4, "108579948892579231731687303715884111884"),
|
551
|
+
CASE (-1234567890E3, "108589948892579231731687303715884111883"),
|
552
|
+
CASE (-1234567890E2, "108599948892579231731687303715884111882"),
|
553
|
+
CASE (-1234567890E1, "108609948892579231731687303715884111881"),
|
554
|
+
CASE (-123456789012345, "108569948892579108281687303715884111885"),
|
555
|
+
CASE (-12345678901234, "108579948892579108331687303715884111884"),
|
556
|
+
CASE (-1234567890123, "108589948892579108731687303715884111883"),
|
557
|
+
CASE (-123456789012, "108599948892579111731687303715884111882"),
|
558
|
+
CASE (-12345678901, "108609948892579131731687303715884111881"),
|
559
|
+
CASE (-1234567890, "108619948892579231731687303715884111880"),
|
560
|
+
CASE (-99999999, "108631183460569231731687303715884111878"),
|
561
|
+
CASE (-8888888, "108642294572469231731687303715884111877"),
|
562
|
+
CASE (-777777, "108653405690469231731687303715884111876"),
|
563
|
+
CASE (-66666, "108664516860469231731687303715884111875"),
|
564
|
+
CASE (-5555, "108675628460469231731687303715884111874"),
|
565
|
+
CASE (-444, "108686743460469231731687303715884111873"),
|
566
|
+
CASE (-334, "108687843460469231731687303715884111873"),
|
567
|
+
CASE (-333, "108687853460469231731687303715884111873"),
|
568
|
+
CASE (-44, "108696783460469231731687303715884111872"),
|
569
|
+
CASE (-33, "108697883460469231731687303715884111872"),
|
570
|
+
CASE (-22, "108698983460469231731687303715884111872"),
|
571
|
+
CASE (-5, "108706183460469231731687303715884111871"),
|
572
|
+
CASE (-4, "108707183460469231731687303715884111871"),
|
573
|
+
CASE (-3, "108708183460469231731687303715884111871"),
|
574
|
+
CASE (-2, "108709183460469231731687303715884111871"),
|
575
|
+
CASE (-1, "108710183460469231731687303715884111871"),
|
576
|
+
CASE (0, "170141183460469231731687303715884105728"),
|
577
|
+
CASE (1, "231572183460469231731687303715884099585"),
|
578
|
+
CASE (2, "231573183460469231731687303715884099585"),
|
579
|
+
CASE (3, "231574183460469231731687303715884099585"),
|
580
|
+
CASE (4, "231575183460469231731687303715884099585"),
|
581
|
+
CASE (5, "231576183460469231731687303715884099585"),
|
582
|
+
CASE (22, "231583383460469231731687303715884099584"),
|
583
|
+
CASE (33, "231584483460469231731687303715884099584"),
|
584
|
+
CASE (44, "231585583460469231731687303715884099584"),
|
585
|
+
CASE (333, "231594513460469231731687303715884099583"),
|
586
|
+
CASE (334, "231594523460469231731687303715884099583"),
|
587
|
+
CASE (444, "231595623460469231731687303715884099583"),
|
588
|
+
CASE (5555, "231606738460469231731687303715884099582"),
|
589
|
+
CASE (66666, "231617850060469231731687303715884099581"),
|
590
|
+
CASE (777777, "231628961230469231731687303715884099580"),
|
591
|
+
CASE (8888888, "231640072348469231731687303715884099579"),
|
592
|
+
CASE (33E56, "232144483460469231731687303715884099528"),
|
593
|
+
CASE (22E57, "232153383460469231731687303715884099527"),
|
594
|
+
CASE (11E58, "232162283460469231731687303715884099526"),
|
595
|
+
|
596
|
+
// Smaller exponents map to smaller int128
|
597
|
+
CASE (1E-6, "231512183460469231731687303715884099591"),
|
598
|
+
CASE (1E-7, "231502183460469231731687303715884099592"),
|
599
|
+
CASE (1E-8, "231492183460469231731687303715884099593"),
|
600
|
+
CASE (1E-56, "231012183460469231731687303715884099641"),
|
601
|
+
CASE (1E-57, "231002183460469231731687303715884099642"),
|
602
|
+
CASE (1E-58, "230992183460469231731687303715884099643"),
|
603
|
+
|
604
|
+
// Smaller negative exponents map to smaller int128
|
605
|
+
CASE (-1E-6, "108770183460469231731687303715884111865"),
|
606
|
+
CASE (-1E-7, "108780183460469231731687303715884111864"),
|
607
|
+
CASE (-1E-8, "108790183460469231731687303715884111863"),
|
608
|
+
CASE (-1E-56, "109270183460469231731687303715884111815"),
|
609
|
+
CASE (-1E-57, "109280183460469231731687303715884111814"),
|
610
|
+
CASE (-1E-58, "109290183460469231731687303715884111813"),
|
611
|
+
|
612
|
+
// Larger exponents map to larger int128
|
613
|
+
CASE (-33E56, "108137883460469231731687303715884111928"),
|
614
|
+
CASE (-22E57, "108128983460469231731687303715884111929"),
|
615
|
+
CASE (-11E58, "108120083460469231731687303715884111930"),
|
616
|
+
|
617
|
+
(Decimal128Test){.value = MC_DEC128_LARGEST_POSITIVE,
|
618
|
+
.expect = mlib_int128_from_string (
|
619
|
+
"293021183460469231731687303715884093440", NULL)},
|
620
|
+
(Decimal128Test){.value = MC_DEC128_SMALLEST_POSITIVE,
|
621
|
+
.expect = mlib_int128_from_string (
|
622
|
+
"170141183460469231731687303715884105729", NULL)},
|
623
|
+
(Decimal128Test){.value = MC_DEC128_LARGEST_NEGATIVE,
|
624
|
+
.expect = mlib_int128_from_string (
|
625
|
+
"47261183460469231731687303715884118016", NULL)},
|
626
|
+
(Decimal128Test){.value = MC_DEC128_SMALLEST_NEGATIVE,
|
627
|
+
.expect = mlib_int128_from_string (
|
628
|
+
"170141183460469231731687303715884105727", NULL)},
|
629
|
+
(Decimal128Test){.value = MC_DEC128_NORMALIZED_ZERO,
|
630
|
+
.expect = mlib_int128_from_string (
|
631
|
+
"170141183460469231731687303715884105728", NULL)},
|
632
|
+
(Decimal128Test){.value = MC_DEC128_NEGATIVE_EXPONENT_ZERO,
|
633
|
+
.expect = mlib_int128_from_string (
|
634
|
+
"170141183460469231731687303715884105728", NULL)},
|
635
|
+
/* Test cases copied from server Decimal128_Bounds test ... end */
|
636
|
+
|
637
|
+
#define ERROR_CASE(Value, Min, Max, Precision, ErrorString) \
|
638
|
+
(Decimal128Test){ \
|
639
|
+
.value = Value, \
|
640
|
+
.min = Min, \
|
641
|
+
.max = Max, \
|
642
|
+
.precision = Precision, \
|
643
|
+
.expectError = ErrorString, \
|
644
|
+
}
|
645
|
+
|
646
|
+
ERROR_CASE (
|
647
|
+
MC_DEC128_C (1),
|
648
|
+
OPT_NULLOPT,
|
649
|
+
OPT_MC_DEC128 (MC_DEC128_C (2)),
|
650
|
+
OPT_U32 (5),
|
651
|
+
"min, max, and precision must all be set or must all be unset"),
|
652
|
+
ERROR_CASE (
|
653
|
+
MC_DEC128_C (1),
|
654
|
+
OPT_MC_DEC128 (MC_DEC128_C (0)),
|
655
|
+
OPT_NULLOPT,
|
656
|
+
OPT_U32 (5),
|
657
|
+
"min, max, and precision must all be set or must all be unset"),
|
658
|
+
ERROR_CASE (MC_DEC128_C (1),
|
659
|
+
OPT_MC_DEC128 (MC_DEC128_C (2)),
|
660
|
+
OPT_MC_DEC128 (MC_DEC128_C (1)),
|
661
|
+
OPT_U32 (5),
|
662
|
+
"The minimum value must be less than the maximum value"),
|
663
|
+
|
664
|
+
ERROR_CASE (MC_DEC128_C (1),
|
665
|
+
OPT_MC_DEC128 (MC_DEC128_C (2)),
|
666
|
+
OPT_MC_DEC128 (MC_DEC128_C (3)),
|
667
|
+
OPT_U32 (5),
|
668
|
+
"Value must be greater than or equal to the minimum value "
|
669
|
+
"and less than or equal to the maximum value"),
|
670
|
+
ERROR_CASE (MC_DEC128_C (4),
|
671
|
+
OPT_MC_DEC128 (MC_DEC128_C (2)),
|
672
|
+
OPT_MC_DEC128 (MC_DEC128_C (3)),
|
673
|
+
OPT_U32 (5),
|
674
|
+
"Value must be greater than or equal to the minimum value "
|
675
|
+
"and less than or equal to the maximum value"),
|
676
|
+
|
677
|
+
ERROR_CASE (MC_DEC128_POSITIVE_INFINITY,
|
678
|
+
OPT_NULLOPT,
|
679
|
+
OPT_NULLOPT,
|
680
|
+
OPT_NULLOPT,
|
681
|
+
"Infinity and Nan Decimal128 values are not supported."),
|
682
|
+
ERROR_CASE (MC_DEC128_NEGATIVE_INFINITY,
|
683
|
+
OPT_NULLOPT,
|
684
|
+
OPT_NULLOPT,
|
685
|
+
OPT_NULLOPT,
|
686
|
+
"Infinity and Nan Decimal128 values are not supported."),
|
687
|
+
|
688
|
+
ERROR_CASE (MC_DEC128_POSITIVE_NAN,
|
689
|
+
OPT_NULLOPT,
|
690
|
+
OPT_NULLOPT,
|
691
|
+
OPT_NULLOPT,
|
692
|
+
"Infinity and Nan Decimal128 values are not supported."),
|
693
|
+
|
694
|
+
ERROR_CASE (MC_DEC128_NEGATIVE_NAN,
|
695
|
+
OPT_NULLOPT,
|
696
|
+
OPT_NULLOPT,
|
697
|
+
OPT_NULLOPT,
|
698
|
+
"Infinity and Nan Decimal128 values are not supported."),
|
699
|
+
|
700
|
+
/* Test cases copied from Decimal128_Bounds_Precision ... begin */
|
701
|
+
#define ASSERT_EIBP(Value, Precision, Expect) \
|
702
|
+
(Decimal128Test){ \
|
703
|
+
.value = mc_dec128_from_string (Value), \
|
704
|
+
.min = OPT_MC_DEC128 (MC_DEC128_C (-100000)), \
|
705
|
+
.max = OPT_MC_DEC128 (MC_DEC128_C (100000)), \
|
706
|
+
.precision = OPT_U32 (Precision), \
|
707
|
+
.expect = MLIB_INT128 (Expect), \
|
708
|
+
}
|
709
|
+
ASSERT_EIBP ("3.141592653589E-1", 10, 1000003141592653),
|
710
|
+
ASSERT_EIBP ("31.41592653589E-2", 10, 1000003141592653),
|
711
|
+
ASSERT_EIBP ("314.1592653589E-3", 10, 1000003141592653),
|
712
|
+
ASSERT_EIBP ("3141.592653589E-4", 10, 1000003141592653),
|
713
|
+
ASSERT_EIBP ("31415.92653589E-5", 10, 1000003141592653),
|
714
|
+
ASSERT_EIBP ("314159.2653589E-6", 10, 1000003141592653),
|
715
|
+
ASSERT_EIBP ("3141592.653589E-7", 10, 1000003141592653),
|
716
|
+
ASSERT_EIBP ("31415926.53589E-8", 10, 1000003141592653),
|
717
|
+
#undef ASSERT_EIBP
|
718
|
+
|
719
|
+
#define ASSERT_EIBPL(Value, Precision, Expect) \
|
720
|
+
(Decimal128Test){ \
|
721
|
+
.value = mc_dec128_from_string (Value), \
|
722
|
+
.min = OPT_MC_DEC128 (MC_DEC128_C (-100000)), \
|
723
|
+
.max = OPT_MC_DEC128 (mc_dec128_from_string ("1E22")), \
|
724
|
+
.precision = OPT_U32 (Precision), \
|
725
|
+
.expect = mlib_int128_from_string (Expect, NULL), \
|
726
|
+
}
|
727
|
+
|
728
|
+
ASSERT_EIBPL ("3.1415926535897932384626433832795E20",
|
729
|
+
5,
|
730
|
+
"31415926535897942384626433"),
|
731
|
+
ASSERT_EIBPL ("3.1415926535897932384626433832795E20",
|
732
|
+
6,
|
733
|
+
"314159265358979423846264338"),
|
734
|
+
|
735
|
+
ASSERT_EIBPL ("3.1415926535897932384626433832795E20",
|
736
|
+
7,
|
737
|
+
"3141592653589794238462643383"),
|
738
|
+
|
739
|
+
ASSERT_EIBPL ("3.1415926535897932384626433832795E20",
|
740
|
+
8,
|
741
|
+
"31415926535897942384626433832"),
|
742
|
+
#undef ASSERT_EIBPL
|
743
|
+
|
744
|
+
#define ASSERT_EIBP(Value, Precision, Expect) \
|
745
|
+
(Decimal128Test){ \
|
746
|
+
.value = mc_dec128_from_string (#Value), \
|
747
|
+
.min = OPT_MC_DEC128 (MC_DEC128_C (-100000)), \
|
748
|
+
.max = OPT_MC_DEC128 (MC_DEC128_C (100000)), \
|
749
|
+
.precision = OPT_U32 (Precision), \
|
750
|
+
.expect = MLIB_INT128_CAST (Expect), \
|
751
|
+
}
|
752
|
+
ASSERT_EIBP (3.141592653589, 1, 1000031),
|
753
|
+
ASSERT_EIBP (3.141592653589, 2, 10000314),
|
754
|
+
ASSERT_EIBP (3.141592653589, 3, 100003141),
|
755
|
+
ASSERT_EIBP (3.141592653589, 4, 1000031415),
|
756
|
+
ASSERT_EIBP (3.141592653589, 5, 10000314159),
|
757
|
+
ASSERT_EIBP (3.141592653589, 6, 100003141592),
|
758
|
+
ASSERT_EIBP (3.141592653589, 7, 1000031415926),
|
759
|
+
#undef ASSERT_EIBP
|
760
|
+
|
761
|
+
#define ASSERT_EIBB(Val, Max, Min, Precision, Expect) \
|
762
|
+
(Decimal128Test){ \
|
763
|
+
.value = mc_dec128_from_string (#Val), \
|
764
|
+
.min = OPT_MC_DEC128 (mc_dec128_from_string (#Min)), \
|
765
|
+
.max = OPT_MC_DEC128 (mc_dec128_from_string (#Max)), \
|
766
|
+
.precision = OPT_U32 (Precision), \
|
767
|
+
.expect = MLIB_INT128_CAST (Expect), \
|
768
|
+
}
|
769
|
+
|
770
|
+
#define ASSERT_EIBB_OVERFLOW(Val, Max, Min, Precision, Expect) \
|
771
|
+
(Decimal128Test) \
|
772
|
+
{ \
|
773
|
+
.value = mc_dec128_from_string (#Val), \
|
774
|
+
.min = OPT_MC_DEC128 (mc_dec128_from_string (#Min)), \
|
775
|
+
.max = OPT_MC_DEC128 (mc_dec128_from_string (#Max)), \
|
776
|
+
.precision = OPT_U32 (Precision), .expect = Expect, \
|
777
|
+
}
|
778
|
+
|
779
|
+
ASSERT_EIBB (0, 1, -1, 3, 1000),
|
780
|
+
ASSERT_EIBB (0, 1, -1E5, 3, 100000000),
|
781
|
+
|
782
|
+
ASSERT_EIBB (-1E-33, 1, -1E5, 3, 100000000),
|
783
|
+
|
784
|
+
ASSERT_EIBB_OVERFLOW (
|
785
|
+
0,
|
786
|
+
MC_DEC128_LARGEST_POSITIVE,
|
787
|
+
MC_DEC128_LARGEST_NEGATIVE,
|
788
|
+
3,
|
789
|
+
mlib_int128_from_string ("170141183460469231731687303715884105728",
|
790
|
+
NULL)),
|
791
|
+
ASSERT_EIBB_OVERFLOW (
|
792
|
+
0,
|
793
|
+
DBL_MAX,
|
794
|
+
DBL_MIN,
|
795
|
+
3,
|
796
|
+
mlib_int128_from_string ("170141183460469231731687303715884105728",
|
797
|
+
NULL)),
|
798
|
+
|
799
|
+
ASSERT_EIBB (3.141592653589, 5, 0, 0, 3),
|
800
|
+
ASSERT_EIBB (3.141592653589, 5, 0, 1, 31),
|
801
|
+
|
802
|
+
ASSERT_EIBB (3.141592653589, 5, 0, 2, 314),
|
803
|
+
|
804
|
+
ASSERT_EIBB (3.141592653589, 5, 0, 3, 3141),
|
805
|
+
ASSERT_EIBB (3.141592653589, 5, 0, 16, 31415926535890000),
|
806
|
+
|
807
|
+
ASSERT_EIBB (-5, -1, -10, 3, 5000),
|
808
|
+
|
809
|
+
ASSERT_EIBB_OVERFLOW (
|
810
|
+
1E100,
|
811
|
+
DBL_MAX,
|
812
|
+
DBL_MIN,
|
813
|
+
3,
|
814
|
+
mlib_int128_from_string ("232572183460469231731687303715884099485",
|
815
|
+
NULL)),
|
816
|
+
|
817
|
+
ASSERT_EIBB (1E9, 1E10, 0, 3, 1000000000000),
|
818
|
+
ASSERT_EIBB (1E9, 1E10, 0, 0, 1000000000),
|
819
|
+
|
820
|
+
|
821
|
+
ASSERT_EIBB (-5, 10, -10, 0, 5),
|
822
|
+
ASSERT_EIBB (-5, 10, -10, 2, 500),
|
823
|
+
|
824
|
+
ASSERT_EIBB (5E-30, 10E-30, 1E-30, 35, 400000),
|
825
|
+
|
826
|
+
// Test a range that requires > 64 bits.
|
827
|
+
ASSERT_EIBB (5, 18446744073709551616, .1, 1, 49),
|
828
|
+
// Test a range that requires > 64 bits.
|
829
|
+
// min has more places after the decimal than precision.
|
830
|
+
ASSERT_EIBB (5, 18446744073709551616, .01, 1, 49),
|
831
|
+
|
832
|
+
#undef ASSERT_EIBB
|
833
|
+
#undef ASSERT_EIBB_OVERFLOW
|
834
|
+
|
835
|
+
/* Test cases copied from Decimal128_Bounds_Precision ... end */
|
836
|
+
};
|
837
|
+
|
838
|
+
for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++) {
|
839
|
+
Decimal128Test *test = tests + i;
|
840
|
+
mongocrypt_status_t *const status = mongocrypt_status_new ();
|
841
|
+
|
842
|
+
if (test->min.set && test->max.set && test->precision.set) {
|
843
|
+
printf ("_test_RangeTest_Encode_Decimal128: value=%s, min=%s, max=%s, "
|
844
|
+
"precision=%" PRIu32 "\n",
|
845
|
+
mc_dec128_to_string (test->value).str,
|
846
|
+
mc_dec128_to_string (test->min.value).str,
|
847
|
+
mc_dec128_to_string (test->max.value).str,
|
848
|
+
test->precision.value);
|
849
|
+
} else {
|
850
|
+
printf ("_test_RangeTest_Encode_Decimal128: value=%s\n",
|
851
|
+
mc_dec128_to_string (test->value).str);
|
852
|
+
}
|
853
|
+
fflush (stdout);
|
854
|
+
mc_OSTType_Decimal128 got;
|
855
|
+
const bool ok = mc_getTypeInfoDecimal128 (
|
856
|
+
(mc_getTypeInfoDecimal128_args_t){.value = test->value,
|
857
|
+
.min = test->min,
|
858
|
+
.max = test->max,
|
859
|
+
.precision = test->precision},
|
860
|
+
&got,
|
861
|
+
status);
|
862
|
+
if (test->expectError) {
|
863
|
+
ASSERT_OR_PRINT_MSG (!ok, "expected error, but got none");
|
864
|
+
ASSERT_STATUS_CONTAINS (status, test->expectError);
|
865
|
+
} else {
|
866
|
+
ASSERT_OK_STATUS (ok, status);
|
867
|
+
|
868
|
+
ASSERT_CMPINT128_EQ (got.value, test->expect);
|
869
|
+
ASSERT_CMPINT128_EQ (got.min, MLIB_INT128 (0));
|
870
|
+
}
|
871
|
+
mongocrypt_status_destroy (status);
|
872
|
+
}
|
873
|
+
}
|
874
|
+
|
875
|
+
#endif // MONGOCRYPT_HAVE_DECIMAL128_SUPPORT
|
876
|
+
|
877
|
+
void
|
878
|
+
_mongocrypt_tester_install_range_encoding (_mongocrypt_tester_t *tester)
|
879
|
+
{
|
880
|
+
INSTALL_TEST (_test_RangeTest_Encode_Int32);
|
881
|
+
INSTALL_TEST (_test_RangeTest_Encode_Int64);
|
882
|
+
INSTALL_TEST (_test_RangeTest_Encode_Double);
|
883
|
+
#if MONGOCRYPT_HAVE_DECIMAL128_SUPPORT
|
884
|
+
INSTALL_TEST (_test_RangeTest_Encode_Decimal128);
|
885
|
+
#endif
|
886
|
+
}
|