├── .clang-format ├── .clang-tidy ├── .earthlyignore ├── .evergreen ├── benchmark-python.sh ├── build_all.sh ├── clang-tidy.sh ├── cmake.sh ├── compile.sh ├── config.yml ├── create-packages-and-repos.sh ├── ctest.sh ├── debian_package_build.sh ├── earthly.sh ├── ensure-cmake.sh ├── ensure-ninja.sh ├── env-run.sh ├── init.sh ├── init.test.sh ├── linker-tests.sh ├── linker_tests_deps │ ├── app │ │ ├── CMakeLists.txt │ │ └── app.c │ └── bson_patches │ │ ├── libbson1.patch │ │ └── libbson2.patch ├── pkgconfig-tests.sh ├── prep_c_driver_source.sh ├── print-env-info.sh ├── requirements.txt ├── sbom.sh ├── setup-env.sh └── vs-env-run.ps1 ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── codeql-actions.yml │ ├── codeql-python.yml │ ├── dist-python.yml │ ├── release-python.yml │ ├── test-python.yml │ └── zizmor.yml ├── .gitignore ├── .lsan-suppressions ├── .pre-commit-config.yaml ├── CHANGELOG.md ├── CMakeLists.txt ├── CODEOWNERS ├── CONTRIBUTING.md ├── Earthfile ├── LICENSE ├── README.md ├── bindings ├── cs │ └── README.md ├── node │ └── README.md └── python │ ├── .evergreen │ ├── integ-setup.sh │ ├── integ-teardown.sh │ ├── integ-test.sh │ ├── test.sh │ └── utils.sh │ ├── .gitignore │ ├── CHANGELOG.rst │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.rst │ ├── RELEASE.rst │ ├── hatch_build.py │ ├── pymongocrypt │ ├── __init__.py │ ├── asynchronous │ │ ├── auto_encrypter.py │ │ ├── credentials.py │ │ ├── explicit_encrypter.py │ │ └── state_machine.py │ ├── auto_encrypter.py │ ├── binary.py │ ├── binding.py │ ├── compat.py │ ├── credentials.py │ ├── crypto.py │ ├── errors.py │ ├── explicit_encrypter.py │ ├── mongocrypt.py │ ├── options.py │ ├── state_machine.py │ ├── synchronous │ │ ├── auto_encrypter.py │ │ ├── credentials.py │ │ ├── explicit_encrypter.py │ │ └── state_machine.py │ └── version.py │ ├── pyproject.toml │ ├── requirements-test.txt │ ├── requirements.txt │ ├── sbom.json │ ├── scripts │ ├── build-manylinux-wheel.sh │ ├── libmongocrypt-version.txt │ ├── release.sh │ ├── synchro.py │ ├── synchro.sh │ ├── update-version.sh │ └── update_binding.py │ └── test │ ├── __init__.py │ ├── data │ ├── collection-info.json │ ├── command-reply.json │ ├── command.json │ ├── compact │ │ └── success │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-config-map.json │ │ │ └── encrypted-payload.json │ ├── encrypted-command-reply.json │ ├── encrypted-command.json │ ├── encrypted-field-config-map.json │ ├── encrypted-value.json │ ├── fle2-find-range-explicit-v2 │ │ └── int32 │ │ │ ├── encrypted-payload.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ ├── fle2-find-rangePreview-explicit │ │ └── int32 │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ ├── key-document-azure.json │ ├── key-document-gcp.json │ ├── key-document.json │ ├── key-filter.json │ ├── keys │ │ ├── 12345678123498761234123456789012-local-document.json │ │ ├── 12345678123498761234123456789013-local-document.json │ │ └── ABCDEFAB123498761234123456789012-local-document.json │ ├── kms-encrypt-reply.txt │ ├── kms-reply-azure.txt │ ├── kms-reply-gcp.txt │ ├── kms-reply.txt │ ├── list-collections-filter.json │ ├── mongocryptd-command.json │ ├── mongocryptd-reply.json │ └── schema-map.json │ ├── performance │ ├── keyDocument.json │ └── perf_test.py │ ├── test_binding.py │ ├── test_crypto.py │ └── test_mongocrypt.py ├── cmake ├── FetchMongoC.cmake ├── ImportBSON.cmake ├── ImportDFP.cmake ├── IntelDFP.cmake ├── LTO.cmake ├── MongoC-Warnings.cmake ├── Patch.cmake ├── Platform.cmake ├── libmongocrypt-hidden-symbols.map ├── libmongocrypt-hidden-symbols.txt ├── libmongocrypt-static.pc.in ├── libmongocrypt.pc.in ├── ltocheck-lib.c ├── ltocheck-main.c └── mongocrypt-config.cmake ├── doc ├── Doxygen ├── img │ ├── cli-icon.png │ └── reference-targets.png └── releasing.md ├── etc ├── c6-vault.repo ├── calc_release_version.py ├── calc_release_version_selftest.sh ├── cyclonedx.sbom.json ├── debian │ ├── control │ ├── rules │ └── source │ │ └── format ├── fle2_aead_generate_tests.py ├── fle2_crypto.py ├── fle2_crypto_selftest.py ├── fle2_generate_tests.py ├── fle2v2_aead_generate_tests.py ├── format-all.sh ├── format.sh ├── generate-kek-tests.py ├── generate-test-data.py ├── install-package.sh ├── libbson-remove-GCC-diagnostic-in-functions.patch ├── libbson-remove-GCC-diagnostic-pragma.patch ├── list-compile-files.py ├── mongo-inteldfp-MONGOCRYPT-571.patch ├── mongo-inteldfp-alpine-arm-fix.patch ├── mongo-inteldfp-libmongocrypt-pr-625.patch ├── mongo-inteldfp-s390x.patch ├── packager.py ├── print-marking.py ├── purls.txt ├── repo_config.yaml ├── requirements.txt ├── rewrite.py ├── rpm │ ├── libmongocrypt.spec │ └── tweak.awk ├── ssdlc_compliance_report.md └── third_party_vulnerabilities.md ├── integrating.md ├── kms-message ├── .gitattributes ├── CMakeLists.txt ├── COPYING ├── README.md ├── THIRD_PARTY_NOTICES ├── aws-sig-v4-test-suite │ ├── LICENSE │ ├── NOTICE │ ├── get-header-key-duplicate │ │ ├── get-header-key-duplicate.authz │ │ ├── get-header-key-duplicate.creq │ │ ├── get-header-key-duplicate.req │ │ ├── get-header-key-duplicate.sreq │ │ └── get-header-key-duplicate.sts │ ├── get-header-value-multiline │ │ ├── get-header-value-multiline.authz │ │ ├── get-header-value-multiline.creq │ │ ├── get-header-value-multiline.req │ │ ├── get-header-value-multiline.sreq │ │ └── get-header-value-multiline.sts │ ├── get-header-value-order │ │ ├── get-header-value-order.authz │ │ ├── get-header-value-order.creq │ │ ├── get-header-value-order.req │ │ ├── get-header-value-order.sreq │ │ └── get-header-value-order.sts │ ├── get-header-value-trim │ │ ├── get-header-value-trim.authz │ │ ├── get-header-value-trim.creq │ │ ├── get-header-value-trim.req │ │ ├── get-header-value-trim.sreq │ │ └── get-header-value-trim.sts │ ├── get-unreserved │ │ ├── get-unreserved.authz │ │ ├── get-unreserved.creq │ │ ├── get-unreserved.req │ │ ├── get-unreserved.sreq │ │ └── get-unreserved.sts │ ├── get-utf8 │ │ ├── get-utf8.authz │ │ ├── get-utf8.creq │ │ ├── get-utf8.req │ │ ├── get-utf8.sreq │ │ └── get-utf8.sts │ ├── get-vanilla-empty-query-key │ │ ├── get-vanilla-empty-query-key.authz │ │ ├── get-vanilla-empty-query-key.creq │ │ ├── get-vanilla-empty-query-key.req │ │ ├── get-vanilla-empty-query-key.sreq │ │ └── get-vanilla-empty-query-key.sts │ ├── get-vanilla-query-order-key-case │ │ ├── get-vanilla-query-order-key-case.authz │ │ ├── get-vanilla-query-order-key-case.creq │ │ ├── get-vanilla-query-order-key-case.req │ │ ├── get-vanilla-query-order-key-case.sreq │ │ └── get-vanilla-query-order-key-case.sts │ ├── get-vanilla-query-order-key │ │ ├── get-vanilla-query-order-key.authz │ │ ├── get-vanilla-query-order-key.creq │ │ ├── get-vanilla-query-order-key.req │ │ ├── get-vanilla-query-order-key.sreq │ │ └── get-vanilla-query-order-key.sts │ ├── get-vanilla-query-order-value │ │ ├── get-vanilla-query-order-value.authz │ │ ├── get-vanilla-query-order-value.creq │ │ ├── get-vanilla-query-order-value.req │ │ ├── get-vanilla-query-order-value.sreq │ │ └── get-vanilla-query-order-value.sts │ ├── get-vanilla-query-unreserved │ │ ├── get-vanilla-query-unreserved.authz │ │ ├── get-vanilla-query-unreserved.creq │ │ ├── get-vanilla-query-unreserved.req │ │ ├── get-vanilla-query-unreserved.sreq │ │ └── get-vanilla-query-unreserved.sts │ ├── get-vanilla-query │ │ ├── get-vanilla-query.authz │ │ ├── get-vanilla-query.creq │ │ ├── get-vanilla-query.req │ │ ├── get-vanilla-query.sreq │ │ └── get-vanilla-query.sts │ ├── get-vanilla-utf8-query │ │ ├── get-vanilla-utf8-query.authz │ │ ├── get-vanilla-utf8-query.creq │ │ ├── get-vanilla-utf8-query.req │ │ ├── get-vanilla-utf8-query.sreq │ │ └── get-vanilla-utf8-query.sts │ ├── get-vanilla │ │ ├── get-vanilla.authz │ │ ├── get-vanilla.creq │ │ ├── get-vanilla.req │ │ ├── get-vanilla.sreq │ │ └── get-vanilla.sts │ ├── normalize-path │ │ ├── get-relative-relative │ │ │ ├── get-relative-relative.authz │ │ │ ├── get-relative-relative.creq │ │ │ ├── get-relative-relative.req │ │ │ ├── get-relative-relative.sreq │ │ │ └── get-relative-relative.sts │ │ ├── get-relative │ │ │ ├── get-relative.authz │ │ │ ├── get-relative.creq │ │ │ ├── get-relative.req │ │ │ ├── get-relative.sreq │ │ │ └── get-relative.sts │ │ ├── get-slash-dot-slash │ │ │ ├── get-slash-dot-slash.authz │ │ │ ├── get-slash-dot-slash.creq │ │ │ ├── get-slash-dot-slash.req │ │ │ ├── get-slash-dot-slash.sreq │ │ │ └── get-slash-dot-slash.sts │ │ ├── get-slash-pointless-dot │ │ │ ├── get-slash-pointless-dot.authz │ │ │ ├── get-slash-pointless-dot.creq │ │ │ ├── get-slash-pointless-dot.req │ │ │ ├── get-slash-pointless-dot.sreq │ │ │ └── get-slash-pointless-dot.sts │ │ ├── get-slash │ │ │ ├── get-slash.authz │ │ │ ├── get-slash.creq │ │ │ ├── get-slash.req │ │ │ ├── get-slash.sreq │ │ │ └── get-slash.sts │ │ ├── get-slashes │ │ │ ├── get-slashes.authz │ │ │ ├── get-slashes.creq │ │ │ ├── get-slashes.req │ │ │ ├── get-slashes.sreq │ │ │ └── get-slashes.sts │ │ ├── get-space │ │ │ ├── get-space.authz │ │ │ ├── get-space.creq │ │ │ ├── get-space.req │ │ │ ├── get-space.sreq │ │ │ └── get-space.sts │ │ └── normalize-path.txt │ ├── post-header-key-case │ │ ├── post-header-key-case.authz │ │ ├── post-header-key-case.creq │ │ ├── post-header-key-case.req │ │ ├── post-header-key-case.sreq │ │ └── post-header-key-case.sts │ ├── post-header-key-sort │ │ ├── post-header-key-sort.authz │ │ ├── post-header-key-sort.creq │ │ ├── post-header-key-sort.req │ │ ├── post-header-key-sort.sreq │ │ └── post-header-key-sort.sts │ ├── post-header-value-case │ │ ├── post-header-value-case.authz │ │ ├── post-header-value-case.creq │ │ ├── post-header-value-case.req │ │ ├── post-header-value-case.sreq │ │ └── post-header-value-case.sts │ ├── post-sts-token │ │ ├── post-sts-header-after │ │ │ ├── post-sts-header-after.authz │ │ │ ├── post-sts-header-after.creq │ │ │ ├── post-sts-header-after.req │ │ │ ├── post-sts-header-after.sreq │ │ │ └── post-sts-header-after.sts │ │ ├── post-sts-header-before │ │ │ ├── post-sts-header-before.authz │ │ │ ├── post-sts-header-before.creq │ │ │ ├── post-sts-header-before.req │ │ │ ├── post-sts-header-before.sreq │ │ │ └── post-sts-header-before.sts │ │ └── readme.txt │ ├── post-vanilla-empty-query-value │ │ ├── post-vanilla-empty-query-value.authz │ │ ├── post-vanilla-empty-query-value.creq │ │ ├── post-vanilla-empty-query-value.req │ │ ├── post-vanilla-empty-query-value.sreq │ │ └── post-vanilla-empty-query-value.sts │ ├── post-vanilla-query │ │ ├── post-vanilla-query.authz │ │ ├── post-vanilla-query.creq │ │ ├── post-vanilla-query.req │ │ ├── post-vanilla-query.sreq │ │ └── post-vanilla-query.sts │ ├── post-vanilla │ │ ├── post-vanilla.authz │ │ ├── post-vanilla.creq │ │ ├── post-vanilla.req │ │ ├── post-vanilla.sreq │ │ └── post-vanilla.sts │ ├── post-x-www-form-urlencoded-parameters │ │ ├── post-x-www-form-urlencoded-parameters.authz │ │ ├── post-x-www-form-urlencoded-parameters.creq │ │ ├── post-x-www-form-urlencoded-parameters.req │ │ ├── post-x-www-form-urlencoded-parameters.sreq │ │ └── post-x-www-form-urlencoded-parameters.sts │ └── post-x-www-form-urlencoded │ │ ├── post-x-www-form-urlencoded.authz │ │ ├── post-x-www-form-urlencoded.creq │ │ ├── post-x-www-form-urlencoded.req │ │ ├── post-x-www-form-urlencoded.sreq │ │ └── post-x-www-form-urlencoded.sts ├── cmake │ ├── kms_message-config.cmake │ └── libkms_message.pc.in ├── src │ ├── hexlify.c │ ├── hexlify.h │ ├── kms_azure_request.c │ ├── kms_b64.c │ ├── kms_caller_identity_request.c │ ├── kms_crypto.h │ ├── kms_crypto_apple.c │ ├── kms_crypto_libcrypto.c │ ├── kms_crypto_none.c │ ├── kms_crypto_windows.c │ ├── kms_decrypt_request.c │ ├── kms_encrypt_request.c │ ├── kms_endian_private.h │ ├── kms_gcp_request.c │ ├── kms_kmip_item_type_private.h │ ├── kms_kmip_reader_writer.c │ ├── kms_kmip_reader_writer_private.h │ ├── kms_kmip_request.c │ ├── kms_kmip_response.c │ ├── kms_kmip_response_parser.c │ ├── kms_kmip_response_parser_private.h │ ├── kms_kmip_result_reason_private.h │ ├── kms_kmip_result_status_private.h │ ├── kms_kmip_tag_type_private.h │ ├── kms_kv_list.c │ ├── kms_kv_list.h │ ├── kms_message.c │ ├── kms_message │ │ ├── kms_azure_request.h │ │ ├── kms_b64.h │ │ ├── kms_caller_identity_request.h │ │ ├── kms_decrypt_request.h │ │ ├── kms_encrypt_request.h │ │ ├── kms_gcp_request.h │ │ ├── kms_kmip_request.h │ │ ├── kms_kmip_response.h │ │ ├── kms_kmip_response_parser.h │ │ ├── kms_message.h │ │ ├── kms_message_defines.h │ │ ├── kms_request.h │ │ ├── kms_request_opt.h │ │ ├── kms_response.h │ │ └── kms_response_parser.h │ ├── kms_message_private.h │ ├── kms_port.c │ ├── kms_port.h │ ├── kms_request.c │ ├── kms_request_opt.c │ ├── kms_request_opt_private.h │ ├── kms_request_str.c │ ├── kms_request_str.h │ ├── kms_response.c │ ├── kms_response_parser.c │ ├── sort.c │ └── sort.h └── test │ ├── connection_close │ └── connection_close.sreq │ ├── content_length │ └── content_length.sreq │ ├── decrypt │ ├── decrypt.creq │ └── decrypt.sreq │ ├── encrypt │ ├── encrypt.creq │ └── encrypt.sreq │ ├── example-chunked-response.bin │ ├── example-multi-chunked-response.bin │ ├── example-response.bin │ ├── host │ └── host.sreq │ ├── multibyte │ ├── multibyte.creq │ └── multibyte.sreq │ ├── test_kmip_reader_writer.c │ ├── test_kms_assert.h │ ├── test_kms_azure_online.c │ ├── test_kms_gcp_online.c │ ├── test_kms_kmip_request.c │ ├── test_kms_kmip_response.c │ ├── test_kms_kmip_response_parser.c │ ├── test_kms_online_util.c │ ├── test_kms_online_util.h │ ├── test_kms_request.c │ ├── test_kms_util.c │ ├── test_kms_util.h │ └── windows │ └── dirent.h ├── src ├── crypto │ ├── cng.c │ ├── commoncrypto.c │ ├── libcrypto.c │ └── none.c ├── csfle-markup.cpp ├── mc-array-private.h ├── mc-array.c ├── mc-check-conversions-private.h ├── mc-cmp-private.h ├── mc-dec128.h ├── mc-dec128.test.cpp ├── mc-efc-private.h ├── mc-efc.c ├── mc-fle-blob-subtype-private.h ├── mc-fle2-encryption-placeholder-private.h ├── mc-fle2-encryption-placeholder.c ├── mc-fle2-find-equality-payload-private-v2.h ├── mc-fle2-find-equality-payload-private.h ├── mc-fle2-find-equality-payload-v2.c ├── mc-fle2-find-equality-payload.c ├── mc-fle2-find-range-payload-private-v2.h ├── mc-fle2-find-range-payload-private.h ├── mc-fle2-find-range-payload-v2.c ├── mc-fle2-find-range-payload.c ├── mc-fle2-find-text-payload-private.h ├── mc-fle2-find-text-payload.c ├── mc-fle2-insert-update-payload-private-v2.h ├── mc-fle2-insert-update-payload-private.h ├── mc-fle2-insert-update-payload-v2.c ├── mc-fle2-insert-update-payload.c ├── mc-fle2-payload-iev-private-v2.h ├── mc-fle2-payload-iev-private.h ├── mc-fle2-payload-iev-v2.c ├── mc-fle2-payload-iev.c ├── mc-fle2-payload-uev-common-private.h ├── mc-fle2-payload-uev-common.c ├── mc-fle2-payload-uev-private.h ├── mc-fle2-payload-uev-v2-private.h ├── mc-fle2-payload-uev-v2.c ├── mc-fle2-payload-uev.c ├── mc-fle2-range-operator-private.h ├── mc-fle2-rfds-private.h ├── mc-fle2-rfds.c ├── mc-fle2-tag-and-encrypted-metadata-block-private.h ├── mc-fle2-tag-and-encrypted-metadata-block.c ├── mc-optional-private.h ├── mc-parse-utils-private.h ├── mc-parse-utils.c ├── mc-range-edge-generation-private.h ├── mc-range-edge-generation.c ├── mc-range-encoding-private.h ├── mc-range-encoding.c ├── mc-range-mincover-generator.template.h ├── mc-range-mincover-private.h ├── mc-range-mincover.c ├── mc-rangeopts-private.h ├── mc-rangeopts.c ├── mc-reader-private.h ├── mc-reader.c ├── mc-schema-broker-private.h ├── mc-schema-broker.c ├── mc-str-encode-string-sets-private.h ├── mc-str-encode-string-sets.c ├── mc-text-search-str-encode-private.h ├── mc-text-search-str-encode.c ├── mc-tokens-private.h ├── mc-tokens.c ├── mc-writer-private.h ├── mc-writer.c ├── mlib │ ├── check.hpp │ ├── endian.h │ ├── error.h │ ├── int128.h │ ├── int128.test.c │ ├── int128.test.cpp │ ├── macros.h │ ├── path.h │ ├── path.test.c │ ├── str.h │ ├── str.test.c │ ├── thread.h │ ├── user-check.h │ └── windows-lean.h ├── mongo_crypt-v1.h ├── mongocrypt-binary-private.h ├── mongocrypt-binary.c ├── mongocrypt-buffer-private.h ├── mongocrypt-buffer.c ├── mongocrypt-cache-collinfo-private.h ├── mongocrypt-cache-collinfo.c ├── mongocrypt-cache-key-private.h ├── mongocrypt-cache-key.c ├── mongocrypt-cache-oauth-private.h ├── mongocrypt-cache-oauth.c ├── mongocrypt-cache-private.h ├── mongocrypt-cache.c ├── mongocrypt-ciphertext-private.h ├── mongocrypt-ciphertext.c ├── mongocrypt-compat.h ├── mongocrypt-config.h.in ├── mongocrypt-crypto-private.h ├── mongocrypt-crypto.c ├── mongocrypt-ctx-datakey.c ├── mongocrypt-ctx-decrypt.c ├── mongocrypt-ctx-encrypt.c ├── mongocrypt-ctx-private.h ├── mongocrypt-ctx-rewrap-many-datakey.c ├── mongocrypt-ctx.c ├── mongocrypt-dll-private.h ├── mongocrypt-endian-private.h ├── mongocrypt-endpoint-private.h ├── mongocrypt-endpoint.c ├── mongocrypt-kek-private.h ├── mongocrypt-kek.c ├── mongocrypt-key-broker-private.h ├── mongocrypt-key-broker.c ├── mongocrypt-key-private.h ├── mongocrypt-key.c ├── mongocrypt-kms-ctx-private.h ├── mongocrypt-kms-ctx.c ├── mongocrypt-log-private.h ├── mongocrypt-log.c ├── mongocrypt-marking-private.h ├── mongocrypt-marking.c ├── mongocrypt-mutex-private.h ├── mongocrypt-opts-private.h ├── mongocrypt-opts.c ├── mongocrypt-private.h ├── mongocrypt-status-private.h ├── mongocrypt-status.c ├── mongocrypt-traverse-util-private.h ├── mongocrypt-traverse-util.c ├── mongocrypt-util-private.h ├── mongocrypt-util.c ├── mongocrypt.c ├── mongocrypt.h ├── os_posix │ ├── os_dll.c │ └── os_mutex.c ├── os_win │ ├── os_dll.c │ └── os_mutex.c └── unicode │ ├── case-fold-map.c │ ├── diacritic-fold-map.c │ ├── fold.c │ └── fold.h ├── test ├── crypt_shared-stub.cpp ├── data │ ├── NIST-CAVP.cstructs │ ├── bulkWrite │ │ ├── bypassQueryAnalysis │ │ │ └── payload.json │ │ ├── jsonSchema │ │ │ └── cmd-to-mongocryptd.json │ │ ├── simple │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload-pattern.json │ │ │ └── mongocryptd-reply.json │ │ └── unencrypted │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── mongocryptd-reply.json │ │ │ └── payload.json │ ├── cache-tests.json │ ├── cleanup │ │ ├── missing-key-id │ │ │ └── collinfo.json │ │ ├── no-fields │ │ │ ├── collinfo.json │ │ │ └── encrypted-payload.json │ │ └── success │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-field-config-map.json │ │ │ └── encrypted-payload-range-v2.json │ ├── collection-info-no-validator.json │ ├── collection-info-view.json │ ├── collinfo-siblings.json │ ├── compact │ │ ├── anchor-pad │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload-range-v2.json │ │ │ └── encrypted-payload.json │ │ ├── missing-key-id │ │ │ └── collinfo.json │ │ ├── no-fields │ │ │ ├── collinfo.json │ │ │ └── encrypted-payload.json │ │ ├── no-range │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ └── encrypted-payload.json │ │ └── success │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-field-config-map.json │ │ │ └── encrypted-payload-range-v2.json │ ├── dollardb │ │ ├── omitted │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── preserved │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── preserved_empty │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ └── preserved_fle1 │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ ├── efc │ │ ├── efc-extraField.json │ │ ├── efc-missingKeyId.json │ │ ├── efc-oneField-badVersionSet.json │ │ ├── efc-oneField-goodVersionSet.json │ │ ├── efc-oneField.json │ │ ├── efc-textSearchFields-badVersionSet.json │ │ ├── efc-textSearchFields-goodVersionSet.json │ │ ├── efc-textSearchFields.json │ │ └── efc-twoFields.json │ ├── encrypted-cmd.json │ ├── encrypted-field-config-map.json │ ├── explicit-decrypt │ │ ├── FLE1DeterministicEncryptedValue.json │ │ ├── FLE1EncryptionPlaceholder.json │ │ ├── FLE1RandomEncryptedValue.json │ │ ├── FLE2EncryptionPlaceholder.json │ │ ├── FLE2FindEqualityPayload.json │ │ ├── FLE2FindEqualityPayloadV2.json │ │ ├── FLE2IndexedEqualityEncryptedValue.json │ │ ├── FLE2IndexedEqualityEncryptedValueV2.json │ │ ├── FLE2IndexedRangeEncryptedValue.json │ │ ├── FLE2IndexedRangeEncryptedValueV2.json │ │ ├── FLE2InsertUpdatePayload-RangeV1.json │ │ ├── FLE2InsertUpdatePayload.json │ │ ├── FLE2InsertUpdatePayloadV2-RangeV1.json │ │ ├── FLE2InsertUpdatePayloadV2-RangeV2.json │ │ ├── FLE2InsertUpdatePayloadV2.json │ │ ├── FLE2UnindexedEncryptedValue.json │ │ └── FLE2UnindexedEncryptedValueV2.json │ ├── explicit-decryption-input.json │ ├── find-with-encryptionInformation.json │ ├── fle1-collMod │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ └── mongocryptd-reply.json │ ├── fle1-create │ │ ├── old-mongocryptd │ │ │ ├── cmd.json │ │ │ ├── encrypted-payload.json │ │ │ ├── ismaster-to-mongocryptd.json │ │ │ └── mongocryptd-ismaster.json │ │ ├── with-cmd-schema │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── encrypted-payload.json │ │ │ ├── ismaster-to-mongocryptd.json │ │ │ ├── mongocryptd-ismaster.json │ │ │ └── mongocryptd-reply.json │ │ ├── with-schema │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── encrypted-payload.json │ │ │ ├── ismaster-to-mongocryptd.json │ │ │ ├── mongocryptd-ismaster.json │ │ │ ├── mongocryptd-reply.json │ │ │ └── schema-map.json │ │ └── without-schema │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── encrypted-payload.json │ │ │ ├── ismaster-to-mongocryptd.json │ │ │ ├── mongocryptd-ismaster.json │ │ │ └── mongocryptd-reply.json │ ├── fle1-explain │ │ ├── with-csfle │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ └── encrypted-payload.json │ │ └── with-mongocryptd │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ ├── fle2-bad-str-encode-version │ │ ├── bad-collinfo.json │ │ ├── bad-create-cmd-mongocryptd-reply.json │ │ ├── bad-create-cmd-to-mongocryptd.json │ │ ├── bad-create-cmd.json │ │ ├── bad-encrypted-field-config-map.json │ │ └── encrypted-payload.json │ ├── fle2-create-encrypted-collection-encrypted-fields-unset-str-encode-version │ │ ├── cmd-to-mongocryptd.json │ │ └── mongocryptd-reply.json │ ├── fle2-create-encrypted-collection-with-str-encode-version │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ ├── encrypted-field-config-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-create-encrypted-collection │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ ├── encrypted-field-config-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-create │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ ├── encrypted-field-config-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-decrypt-ieev │ │ ├── first-filter.json │ │ └── second-filter.json │ ├── fle2-delete │ │ ├── empty │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-field-config-map.json │ │ │ ├── encrypted-payload-v2.json │ │ │ └── mongocryptd-reply.json │ │ └── success │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-field-config-map.json │ │ │ ├── encrypted-payload-v2.json │ │ │ └── mongocryptd-reply.json │ ├── fle2-explain │ │ ├── with-csfle │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ └── encrypted-payload.json │ │ └── with-mongocryptd │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collinfo.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ ├── fle2-explicit │ │ ├── find-indexed-contentionFactor1-v2.json │ │ ├── find-indexed-v2.json │ │ ├── insert-indexed-contentionFactor1-v2.json │ │ ├── insert-indexed-same-user-and-index-key-v2.json │ │ └── insert-indexed-v2.json │ ├── fle2-find-equality-v2 │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-find-explicit │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd-to-mongod.json │ │ ├── cmd.json │ │ └── reply-from-mongocryptd.json │ ├── fle2-find-range-explicit │ │ ├── double-precision │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ ├── double │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ ├── int32-openinterval │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ └── int32 │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ ├── fle2-find-range │ │ ├── README.md │ │ ├── date-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── decimal128-precision-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── decimal128-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── double-precision-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── double-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── int32-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ └── int64-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ ├── fle2-insert-range-explicit │ │ ├── double-precision │ │ │ ├── RNG_DATA.h │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ ├── double │ │ │ ├── RNG_DATA.h │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ ├── int32 │ │ │ ├── RNG_DATA.h │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── encrypted-payload.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ │ └── sparsity-2 │ │ │ ├── RNG_DATA.h │ │ │ ├── encrypted-payload-v2.json │ │ │ ├── rangeopts.json │ │ │ └── value-to-encrypt.json │ ├── fle2-insert-range │ │ ├── README.md │ │ ├── date-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── date │ │ │ └── RNG_DATA.h │ │ ├── decimal128-precision-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── decimal128-precision │ │ │ └── RNG_DATA.h │ │ ├── decimal128-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── decimal128 │ │ │ └── RNG_DATA.h │ │ ├── double-precision-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── double-precision │ │ │ └── RNG_DATA.h │ │ ├── double-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── double │ │ │ └── RNG_DATA.h │ │ ├── int32-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── int32 │ │ │ ├── RNG_DATA.h │ │ │ ├── cmd.json │ │ │ └── encrypted-field-map.json │ │ ├── int64-v2 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ └── int64 │ │ │ └── RNG_DATA.h │ ├── fle2-insert-text-search-with-str-encode-version │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-insert-text-search │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-insert-unindexed-v2 │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-insert-v2-with-str-encode-version │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-insert-v2 │ │ ├── cmd.json │ │ ├── encrypted-field-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-text-search-create-encrypted-collection-with-str-encode-version │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ ├── encrypted-field-config-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── fle2-text-search-create-encrypted-collection │ │ ├── cmd-to-mongocryptd.json │ │ ├── cmd.json │ │ ├── encrypted-field-config-map.json │ │ ├── encrypted-payload.json │ │ └── mongocryptd-reply.json │ ├── iev-v2 │ │ ├── FLECrudTest-insertOneRangeV2.json │ │ ├── FLECrudTest-insertOneText.json │ │ ├── FLECrudTest-insertOneTextLarge.json │ │ └── FLECrudTest-insertOneV2.json │ ├── kek-tests.json │ ├── key-document-azure.json │ ├── key-document-full.json │ ├── key-document-gcp.json │ ├── key-document-kmip.json │ ├── key-document-local.json │ ├── key-document-no-region.json │ ├── key-document-with-alt-name-duplicate-id.json │ ├── key-document-with-alt-name.json │ ├── key-document-with-alt-name2.json │ ├── keys │ │ ├── 12345678123498761234123456789012-aws-decrypt-reply.txt │ │ ├── 12345678123498761234123456789012-aws-document.json │ │ ├── 12345678123498761234123456789012-key-material.txt │ │ ├── 12345678123498761234123456789012-local-document.json │ │ ├── 12345678123498761234123456789013-aws-decrypt-reply.txt │ │ ├── 12345678123498761234123456789013-aws-document.json │ │ ├── 12345678123498761234123456789013-key-material.txt │ │ ├── 12345678123498761234123456789013-local-document.json │ │ ├── 12345678123498761234123456789014-key-material.txt │ │ ├── 12345678123498761234123456789014-local-document.json │ │ ├── ABCDEFAB123498761234123456789012-aws-decrypt-reply.txt │ │ ├── ABCDEFAB123498761234123456789012-aws-document.json │ │ ├── ABCDEFAB123498761234123456789012-key-material.txt │ │ ├── ABCDEFAB123498761234123456789012-local-document.json │ │ └── README.md │ ├── kms-aws │ │ ├── decrypt-response.txt │ │ └── encrypt-response.txt │ ├── kms-azure │ │ ├── decrypt-response.txt │ │ ├── encrypt-response.txt │ │ └── oauth-response.txt │ ├── kms-encrypt-reply.txt │ ├── kms-gcp │ │ ├── decrypt-response.txt │ │ ├── encrypt-response.txt │ │ └── oauth-response.txt │ ├── kms-tests.json │ ├── lookup │ │ ├── csfle-facet │ │ │ └── cmd.json │ │ ├── csfle-mismatch │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ └── collInfo-c3.json │ │ ├── csfle-nested │ │ │ └── cmd.json │ │ ├── csfle-only-schemaMap │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ └── schemaMap.json │ │ ├── csfle-schemaMap │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ └── schemaMap.json │ │ ├── csfle-self │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ └── collInfo-c1.json │ │ ├── csfle-sibling │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ ├── collInfo-c2.json │ │ │ └── reply-from-mongocryptd.json │ │ ├── csfle-unionWith │ │ │ └── cmd.json │ │ ├── csfle-view │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ └── collInfo-v1.json │ │ ├── csfle │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ └── collInfo-c2.json │ │ ├── mixed │ │ │ ├── csfle │ │ │ │ ├── csfle │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ ├── collInfo-c2.json │ │ │ │ │ ├── key-doc.json │ │ │ │ │ └── reply-from-mongocryptd.json │ │ │ │ ├── no-schema │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ ├── collInfo-c2.json │ │ │ │ │ ├── key-doc.json │ │ │ │ │ └── reply-from-mongocryptd.json │ │ │ │ └── qe │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ └── collInfo-c2.json │ │ │ ├── no-schema │ │ │ │ ├── csfle │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ ├── collInfo-c2.json │ │ │ │ │ ├── key-doc.json │ │ │ │ │ └── reply-from-mongocryptd.json │ │ │ │ ├── no-schema │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ ├── collInfo-c2.json │ │ │ │ │ └── reply-from-mongocryptd.json │ │ │ │ └── qe │ │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ │ ├── cmd.json │ │ │ │ │ ├── collInfo-c1.json │ │ │ │ │ ├── collInfo-c2.json │ │ │ │ │ ├── key-doc.json │ │ │ │ │ └── reply-from-mongocryptd.json │ │ │ └── qe │ │ │ │ ├── csfle │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ ├── cmd.json │ │ │ │ ├── collInfo-c1.json │ │ │ │ └── collInfo-c2.json │ │ │ │ ├── no-schema │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ ├── cmd.json │ │ │ │ ├── collInfo-c1.json │ │ │ │ ├── collInfo-c2.json │ │ │ │ ├── key-doc.json │ │ │ │ └── reply-from-mongocryptd.json │ │ │ │ └── qe │ │ │ │ ├── cmd-to-mongocryptd.json │ │ │ │ ├── cmd-to-mongod.json │ │ │ │ ├── cmd.json │ │ │ │ ├── collInfo-c1.json │ │ │ │ ├── collInfo-c2.json │ │ │ │ ├── key-doc.json │ │ │ │ └── reply-from-mongocryptd.json │ │ ├── qe-encryptedFieldsMap │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd-to-mongod.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ ├── encryptedFieldsMap.json │ │ │ ├── key-doc.json │ │ │ └── reply-from-mongocryptd.json │ │ ├── qe-self │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd-to-mongod.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ ├── key-doc.json │ │ │ └── reply-from-mongocryptd.json │ │ ├── qe-with-payload │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd-to-mongod.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ ├── collInfo-c2.json │ │ │ ├── key-doc.json │ │ │ └── reply-from-mongocryptd.json │ │ └── qe │ │ │ ├── cmd-to-mongocryptd.json │ │ │ ├── cmd-to-mongod.json │ │ │ ├── cmd.json │ │ │ ├── collInfo-c1.json │ │ │ ├── collInfo-c2.json │ │ │ └── reply-from-mongocryptd.json │ ├── mongocryptd-cmd.json │ ├── mongocryptd-ismaster-17.json │ ├── mongocryptd-ismaster-26.json │ ├── mongocryptd-reply-existing-ciphertext.json │ ├── mongocryptd-reply-invalid.json │ ├── mongocryptd-reply-key-alt-name.json │ ├── mongocryptd-reply-key-alt-name2.json │ ├── mongocryptd-reply-no-encryption-needed.json │ ├── mongocryptd-reply-no-markings.json │ ├── mongocryptd-reply-random.json │ ├── multikey │ │ ├── command.json │ │ ├── key-document-a.json │ │ ├── key-document-b.json │ │ ├── mongocryptd_reply.json │ │ └── schema_map.json │ ├── no-trimFactor │ │ ├── find │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ └── insert │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ ├── range-edge-generation │ │ ├── edges_decimal128.cstruct │ │ ├── edges_double.cstruct │ │ ├── edges_int32.cstruct │ │ └── edges_int64.cstruct │ ├── range-min-cover │ │ ├── mincover_decimal128.cstruct │ │ ├── mincover_decimal128_precision.cstruct │ │ ├── mincover_double.cstruct │ │ ├── mincover_double_precision.cstruct │ │ ├── mincover_int32.cstruct │ │ └── mincover_int64.cstruct │ ├── range-sends-cryptoParams │ │ ├── auto-find-int32 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── auto-insert-int32 │ │ │ ├── cmd.json │ │ │ ├── encrypted-field-map.json │ │ │ ├── encrypted-payload.json │ │ │ └── mongocryptd-reply.json │ │ ├── explicit-find-int32-defaults │ │ │ ├── expected.json │ │ │ └── to-encrypt.json │ │ ├── explicit-find-int32 │ │ │ ├── expected.json │ │ │ └── to-encrypt.json │ │ ├── explicit-insert-double │ │ │ └── expected.json │ │ ├── explicit-insert-int32-defaults │ │ │ └── expected.json │ │ └── explicit-insert-int32 │ │ │ └── expected.json │ ├── rmd │ │ ├── key-document-a.json │ │ ├── key-document-b.json │ │ ├── key-document-local.json │ │ ├── kms-decrypt-reply-429.txt │ │ ├── kms-decrypt-reply-a.txt │ │ ├── kms-decrypt-reply-b.txt │ │ ├── kms-encrypt-reply-a.txt │ │ └── kms-encrypt-reply-b.txt │ ├── roundtrip │ │ ├── README.md │ │ ├── aes-ctr.json │ │ ├── fle2-fixed.json │ │ ├── fle2-generated.json │ │ ├── fle2aead-decrypt.json │ │ ├── fle2aead-fixed.json │ │ ├── fle2aead-generated.json │ │ ├── fle2v2-aead-fixed.json │ │ ├── fle2v2-aead-generated.json │ │ ├── mcgrew.json │ │ └── nist.json │ ├── schema-broker │ │ ├── collinfo-encryptedFields.json │ │ ├── collinfo-encryptedFields2.json │ │ ├── collinfo-jsonSchema.json │ │ ├── collinfo-noSchema.json │ │ ├── create-with-jsonSchema.json │ │ ├── encryptedFields.json │ │ ├── encryptedFields2.json │ │ ├── encryptedFieldsMap.json │ │ ├── jsonSchema.json │ │ ├── jsonSchema2.json │ │ └── schemaMap.json │ ├── schema-map.json │ └── tokens │ │ ├── README.md │ │ ├── mc.json │ │ └── server.json ├── example-no-bson.c ├── example-state-machine.c ├── example │ ├── README.md │ ├── cmd.json │ ├── collection-info.json │ ├── encrypted-command.json │ ├── key-document-custom-endpoint.json │ ├── key-document.json │ ├── kms-decrypt-reply.txt │ └── mongocryptd-reply.json ├── fuzz_kms.c ├── test-dll.cpp ├── test-gcp-auth.c ├── test-mc-cmp.c ├── test-mc-efc.c ├── test-mc-fle2-encryption-placeholder.c ├── test-mc-fle2-find-equality-payload-v2.c ├── test-mc-fle2-find-range-payload-v2.c ├── test-mc-fle2-find-text-payload.c ├── test-mc-fle2-payload-iev-v2.c ├── test-mc-fle2-payload-iev.c ├── test-mc-fle2-payload-iup-v2.c ├── test-mc-fle2-payload-iup.c ├── test-mc-fle2-payload-uev-v2.c ├── test-mc-fle2-payload-uev.c ├── test-mc-fle2-rfds.c ├── test-mc-fle2-tag-and-encrypted-metadata-block.c ├── test-mc-range-edge-generation.c ├── test-mc-range-encoding.c ├── test-mc-range-mincover.c ├── test-mc-rangeopts.c ├── test-mc-reader.c ├── test-mc-schema-broker.c ├── test-mc-text-search-str-encode.c ├── test-mc-tokens.c ├── test-mc-writer.c ├── test-mongocrypt-assert-match-bson.c ├── test-mongocrypt-assert-match-bson.h ├── test-mongocrypt-assert.h ├── test-mongocrypt-buffer.c ├── test-mongocrypt-cache-oauth.c ├── test-mongocrypt-cache.c ├── test-mongocrypt-ciphertext.c ├── test-mongocrypt-cleanup.c ├── test-mongocrypt-compact.c ├── test-mongocrypt-crypto-hooks.c ├── test-mongocrypt-crypto-std-hooks.c ├── test-mongocrypt-crypto-std-hooks.h ├── test-mongocrypt-crypto.c ├── test-mongocrypt-csfle-lib.c ├── test-mongocrypt-ctx-decrypt.c ├── test-mongocrypt-ctx-encrypt.c ├── test-mongocrypt-ctx-rewrap-many-datakey.c ├── test-mongocrypt-ctx-setopt.c ├── test-mongocrypt-datakey.c ├── test-mongocrypt-dll.c ├── test-mongocrypt-endpoint.c ├── test-mongocrypt-kek.c ├── test-mongocrypt-key-broker.c ├── test-mongocrypt-key-cache.c ├── test-mongocrypt-key.c ├── test-mongocrypt-kms-ctx.c ├── test-mongocrypt-kms-responses.c ├── test-mongocrypt-local-kms.c ├── test-mongocrypt-log.c ├── test-mongocrypt-marking.c ├── test-mongocrypt-opts.c ├── test-mongocrypt-status.c ├── test-mongocrypt-traverse-util.c ├── test-mongocrypt-util.c ├── test-mongocrypt-util.h ├── test-mongocrypt.c ├── test-mongocrypt.h ├── test-named-kms-providers.c ├── test-unicode-fold.c └── util │ ├── HELP.autogen │ ├── README.md │ ├── csfle.c │ ├── helpgen.py │ ├── make_includes.py │ ├── util.c │ └── util.h └── third-party └── IntelRDFPMathLib20U2.tar.xz /.clang-tidy: -------------------------------------------------------------------------------- 1 | # Older clang-tidy gives a warning for an uninitialized va_args, 2 | # even on the test case that they assert should not produce that warning: 3 | # https://github.com/llvm-mirror/clang/blob/59207d134acb8a1c6cb9974c32c1c04bd31f8f7b/test/Analysis/valist-uninitialized.c#L30 4 | Checks: "-clang-analyzer-valist.Uninitialized" 5 | WarningsAsErrors: "*" 6 | -------------------------------------------------------------------------------- /.earthlyignore: -------------------------------------------------------------------------------- 1 | cmake-build/ 2 | cmake-build-deb/ 3 | _build/ 4 | -------------------------------------------------------------------------------- /.evergreen/clang-tidy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Run after running "CONFIGURE_ONLY=ON compile.sh" to run the clang-tidy 3 | # static analyzer. 4 | # 5 | 6 | . "$(dirname "${BASH_SOURCE[0]}")/setup-env.sh" 7 | 8 | CLANG_TIDY=/opt/mongodbtoolchain/v3/bin/clang-tidy 9 | 10 | $CLANG_TIDY --version 11 | 12 | python "$LIBMONGOCRYPT_DIR/etc/list-compile-files.py" \ 13 | "$LIBMONGOCRYPT_DIR/cmake-build/" \ 14 | | xargs $CLANG_TIDY -p "$LIBMONGOCRYPT_DIR/cmake-build/" 15 | -------------------------------------------------------------------------------- /.evergreen/cmake.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . "$(dirname "${BASH_SOURCE[0]}")/init.sh" 4 | 5 | . "$EVG_DIR/ensure-cmake.sh" 6 | 7 | # Execute CMake: 8 | command "$CMAKE_EXE" "$@" 9 | -------------------------------------------------------------------------------- /.evergreen/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Downloads and prepares the C driver source, then compiles libmongocrypt's 3 | # dependencies and targets. 4 | # 5 | # NOTE: This script is not meant to be invoked for Evergreen builds. It is a 6 | # convenience script for users of libmongocrypt 7 | 8 | . "$(dirname "${BASH_SOURCE[0]}")/init.sh" 9 | 10 | bash "$EVG_DIR/setup-env.sh" 11 | bash "$EVG_DIR/build_all.sh" 12 | 13 | -------------------------------------------------------------------------------- /.evergreen/ctest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . "$(dirname "${BASH_SOURCE[0]}")/init.sh" 4 | 5 | . "$EVG_DIR/ensure-cmake.sh" 6 | 7 | # Execute CTest: 8 | command "$CTEST_EXE" "$@" 9 | -------------------------------------------------------------------------------- /.evergreen/linker_tests_deps/app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5) 2 | project (app C) 3 | add_executable (app app.c) 4 | find_package (bson-1.0 1.11 REQUIRED) 5 | message ("-- libbson found version \"${bson-1.0_VERSION}\"") 6 | target_link_libraries (app PRIVATE mongo::bson_static) 7 | 8 | find_package (mongocrypt REQUIRED) 9 | target_link_libraries (app PRIVATE mongo::mongocrypt) -------------------------------------------------------------------------------- /.evergreen/linker_tests_deps/app/app.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main () { 5 | char *a; 6 | mongocrypt_binary_t *b; 7 | 8 | printf(".calling bson_malloc0."); 9 | a = bson_malloc0 (1); 10 | printf(".calling mongocrypt_binary_new."); 11 | b = mongocrypt_binary_new (); 12 | bson_free (a); 13 | mongocrypt_binary_destroy (b); 14 | return 0; 15 | } -------------------------------------------------------------------------------- /.evergreen/prep_c_driver_source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euxo pipefail 4 | 5 | # Clone mongo-c-driver and check out to a tagged version. 6 | MONGO_C_DRIVER_VERSION=1.30.3 7 | 8 | # Force checkout with lf endings since .sh must have lf, not crlf on Windows 9 | git clone https://github.com/mongodb/mongo-c-driver.git --config core.eol=lf --config core.autocrlf=false --depth=1 --branch $MONGO_C_DRIVER_VERSION 10 | -------------------------------------------------------------------------------- /.evergreen/print-env-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Print information about the environment. 3 | # 4 | 5 | set -o xtrace 6 | 7 | evergreen_root=$(pwd) 8 | 9 | git --version 10 | openssl version 11 | python --version 12 | 13 | if which gcc; then 14 | gcc --version 15 | fi 16 | 17 | if which clang; then 18 | clang --version 19 | fi -------------------------------------------------------------------------------- /.evergreen/requirements.txt: -------------------------------------------------------------------------------- 1 | virtualenv -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Mass reformat: 2 | d60041a1a863c27bb08c43fe56c2e9588f56d920 3 | 4 | # Python pre-commit formatting 5 | c03df9ecc60b9d26aa67b72378f0945c1b577b72 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Shell scripts require lf endings 2 | *.sh text eol=lf 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | groups: 9 | actions: 10 | patterns: 11 | - "*" 12 | assignees: 13 | - "@mongodb/dbx-python" 14 | # Python 15 | - package-ecosystem: "pip" 16 | directory: "/bindings/python" 17 | schedule: 18 | interval: "weekly" 19 | assignees: 20 | - "@mongodb/dbx-python" -------------------------------------------------------------------------------- /.lsan-suppressions: -------------------------------------------------------------------------------- 1 | leak:ccrng_cryptographic_init_once 2 | leak:ccrng_cryptographic_generate 3 | leak:CRYPTO_zalloc 4 | # Ignore leak reported in dlopen error. 5 | leak:_dlerror_run 6 | leak:_dlerror 7 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Code Owners will automatically be added as reviewers on PRs 2 | 3 | # Listing code owners is required by DRIVERS-3098 4 | * @mongodb/dbx-c-cxx 5 | 6 | # Python Bindings 7 | bindings/python @mongodb/dbx-python 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Formatting 2 | 3 | To format, install `pipx` and run: 4 | ```bash 5 | ./etc/format-all.sh 6 | ``` 7 | 8 | To use a specified python install, set `MONGOCRYPT_PYTHON`: 9 | 10 | ```bash 11 | # Set MONGOCRYPT_PYTHON to a python install with pipx installed. 12 | export MONGOCRYPT_PYTHON=python 13 | ./etc/format-all.sh 14 | ``` 15 | -------------------------------------------------------------------------------- /bindings/cs/README.md: -------------------------------------------------------------------------------- 1 | ### The C# bindings have been moved! 2 | 3 | #### https://github.com/mongodb/mongo-csharp-driver/tree/main/src/MongoDB.Driver.Encryption 4 | 5 | They have been renamed from ```MongoDB.Libmongocrypt``` to ```MongoDB.Driver.Encryption``` 6 | and can be found on nuget here: https://www.nuget.org/packages/MongoDB.Driver.Encryption/ 7 | -------------------------------------------------------------------------------- /bindings/node/README.md: -------------------------------------------------------------------------------- 1 | ### The Node.js Bindings Have Moved! 2 | 3 | #### https://github.com/mongodb-js/mongodb-client-encryption 4 | 5 | They can still be found at the same npm package: 6 | - https://www.npmjs.com/package/mongodb-client-encryption 7 | -------------------------------------------------------------------------------- /bindings/python/.evergreen/integ-teardown.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | set -o xtrace # Write all commands first to stderr 3 | set -o errexit # Exit the script with error if any of the commands fail 4 | 5 | bash ${DRIVERS_TOOLS}/.evergreen/csfle/teardown.sh 6 | bash ${DRIVERS_TOOLS}/.evergreen/teardown.sh 7 | -------------------------------------------------------------------------------- /bindings/python/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *#* 3 | .DS* 4 | *.cm 5 | *.class 6 | *.pyc 7 | *.pyd 8 | build/ 9 | doc/_build/ 10 | dist/ 11 | *.so 12 | *.egg 13 | .tox 14 | .eggs/ 15 | .idea/ 16 | *.egg-info/ 17 | -------------------------------------------------------------------------------- /bindings/python/pymongocrypt/version.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019-present MongoDB, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | __version__ = "1.14.2.dev0" 16 | 17 | _MIN_LIBMONGOCRYPT_VERSION = "1.8.0" 18 | -------------------------------------------------------------------------------- /bindings/python/requirements-test.txt: -------------------------------------------------------------------------------- 1 | pymongo[aws]>=4 2 | cffi>=1.12.0,<2 3 | cryptography>=2 4 | pytest>=7.0 5 | unasync 6 | respx 7 | setuptools 8 | -------------------------------------------------------------------------------- /bindings/python/requirements.txt: -------------------------------------------------------------------------------- 1 | cffi>=1.12.0,<2 2 | cryptography>=40 3 | packaging>=21.0 4 | httpx>=0.25.0 5 | -------------------------------------------------------------------------------- /bindings/python/scripts/build-manylinux-wheel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | cd /python 3 | 4 | mkdir /tmp/wheelhouse 5 | /opt/python/cp38-cp38/bin/python -m build --wheel --outdir /tmp/wheelhouse 6 | # Audit wheels and repair manylinux tags 7 | auditwheel repair /tmp/wheelhouse/*.whl -w dist 8 | -------------------------------------------------------------------------------- /bindings/python/scripts/libmongocrypt-version.txt: -------------------------------------------------------------------------------- 1 | 1.14.1 2 | -------------------------------------------------------------------------------- /bindings/python/scripts/synchro.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) 6 | 7 | python $SCRIPT_DIR/synchro.py "$@" 8 | python -m ruff check $SCRIPT_DIR/../pymongocrypt/synchronous --fix --silent 9 | -------------------------------------------------------------------------------- /bindings/python/test/data/command-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "cursor": { 3 | "firstBatch": [ 4 | { 5 | "_id": 1, 6 | "ssn": "457-55-5462" 7 | } 8 | ], 9 | "id": 0, 10 | "ns": "test.test" 11 | }, 12 | "ok": 1 13 | } 14 | -------------------------------------------------------------------------------- /bindings/python/test/data/command.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": "457-55-5462" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /bindings/python/test/data/compact/success/cmd.json: -------------------------------------------------------------------------------- 1 | { "compactStructuredEncryptionData": "test" } 2 | -------------------------------------------------------------------------------- /bindings/python/test/data/compact/success/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "compactStructuredEncryptionData": "test", 3 | "compactionTokens": { 4 | "nested.notindexed": { 5 | "$binary": { 6 | "base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=", 7 | "subType": "00" 8 | } 9 | }, 10 | "nested.encrypted": { 11 | "$binary": { 12 | "base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=", 13 | "subType": "00" 14 | } 15 | }, 16 | "encrypted": { 17 | "$binary": { 18 | "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", 19 | "subType": "00" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bindings/python/test/data/encrypted-command-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "cursor" : { 3 | "firstBatch" : [ 4 | { 5 | "_id": 1, 6 | "ssn": { 7 | "$binary": "AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=", 8 | "$type": "06" 9 | } 10 | } 11 | ], 12 | "id" : 0, 13 | "ns" : "test.test" 14 | }, 15 | "ok" : 1 16 | } 17 | -------------------------------------------------------------------------------- /bindings/python/test/data/encrypted-command.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": { 5 | "$eq": { 6 | "$binary": { 7 | "base64": "AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=", 8 | "subType": "06" 9 | } 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /bindings/python/test/data/encrypted-value.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": "AWFhYWFhYWFhYWFhYWFhYWECW+zDjR/69eS6VtuMD5+O2lZw6JyiWOw3avI7mnUkdpKzPfvy8F/nlZrgZa2cGmQsb0TmLZuk5trldosnGKD91w==", 4 | "$type": "06" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /bindings/python/test/data/fle2-find-range-explicit-v2/int32/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "200" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | }, 11 | "trimFactor": { 12 | "$numberInt": "0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /bindings/python/test/data/fle2-find-range-explicit-v2/int32/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberInt": "35" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /bindings/python/test/data/fle2-find-rangePreview-explicit/int32/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "200" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /bindings/python/test/data/fle2-find-rangePreview-explicit/int32/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberInt": "35" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /bindings/python/test/data/key-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "$or": [ 3 | { 4 | "_id": { 5 | "$in": [ 6 | { 7 | "$binary": "YWFhYWFhYWFhYWFhYWFhYQ==", 8 | "$type": "04" 9 | } 10 | ] 11 | } 12 | }, 13 | { 14 | "keyAltNames": { 15 | "$in": [] 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /bindings/python/test/data/kms-encrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 446 5 | Connection: close 6 | 7 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "CiphertextBlob": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gHCPOT4UQIpMTvAVABLqnXlAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLxAm0nO3rccdoWA6AIBEIB7HUe6+aPvgNu/4sLEXBQVDIJVBueI3q7zdOMBSkRKkgZWqEuQgA6iDuEZbhHhOVCUXPBaLX6QWRwyMmjvIy/2Bg5q+TmwnfRo6QKdw2vee1W32/FdPWIoQy1yKOoIhNy6XMWldS3JuWK8ffQOYkssEqx0V4LW6PKuFv7D"} -------------------------------------------------------------------------------- /bindings/python/test/data/kms-reply-azure.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 374 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR", "value": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /bindings/python/test/data/kms-reply-gcp.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /bindings/python/test/data/kms-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "Plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /bindings/python/test/data/list-collections-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test" 3 | } 4 | -------------------------------------------------------------------------------- /bindings/python/test/data/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "find": "test", 8 | "filter": { 9 | "ssn": { 10 | "$eq": { 11 | "$binary": { 12 | "base64": "ADgAAAAQYQABAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQJ2AAwAAAA0NTctNTUtNTQ2MgAA", 13 | "subType": "06" 14 | } 15 | } 16 | } 17 | } 18 | }, 19 | "hasEncryptedPlaceholders": true 20 | } 21 | -------------------------------------------------------------------------------- /bindings/python/test/performance/keyDocument.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": { 3 | "$binary": { 4 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 5 | "subType": "04" 6 | } 7 | }, 8 | "keyMaterial": { 9 | "$binary": { 10 | "base64": "ACR7Hm33dDOAAD7l2ubZhSpSUWK8BkALUY+qW3UgBAEcTV8sBwZnaAWnzDsmrX55dgmYHWfynDlJogC/e33u6pbhyXvFTs5ow9OLCuCWBJ39T/Ivm3kMaZJybkejY0V+uc4UEdHvVVz/SbitVnzs2WXdMGmo1/HmDRrxGYZjewFslquv8wtUHF5pyB+QDlQBd/al9M444/8bJZFbMSmtIg==", 11 | "subType": "00" 12 | } 13 | }, 14 | "creationDate": { 15 | "$date": "2023-08-21T14:28:20.875Z" 16 | }, 17 | "updateDate": { 18 | "$date": "2023-08-21T14:28:20.875Z" 19 | }, 20 | "status": 0, 21 | "masterKey": { 22 | "provider": "local" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cmake/libmongocrypt-hidden-symbols.map: -------------------------------------------------------------------------------- 1 | mongocrypt { 2 | local: 3 | bson*; 4 | bcon*; 5 | jsonsl*; 6 | _*; 7 | kms*; 8 | }; -------------------------------------------------------------------------------- /cmake/libmongocrypt-hidden-symbols.txt: -------------------------------------------------------------------------------- 1 | _bson* 2 | _bcon* 3 | _jsonsl* 4 | __* 5 | _kms* -------------------------------------------------------------------------------- /cmake/libmongocrypt-static.pc.in: -------------------------------------------------------------------------------- 1 | Name: ${PROJECT_NAME} 2 | Description: ${PROJECT_DESCRIPTION} 3 | Version: ${PROJECT_VERSION} 4 | Requires: ${PKG_CONFIG_STATIC_REQUIRES} 5 | prefix=${CMAKE_INSTALL_PREFIX} 6 | includedir=${PKG_CONFIG_INCLUDEDIR} 7 | libdir=${PKG_CONFIG_LIBDIR} 8 | Libs: ${PKG_CONFIG_STATIC_LIBS} 9 | Cflags: ${PKG_CONFIG_STATIC_CFLAGS} 10 | -------------------------------------------------------------------------------- /cmake/libmongocrypt.pc.in: -------------------------------------------------------------------------------- 1 | Name: ${PROJECT_NAME} 2 | Description: ${PROJECT_DESCRIPTION} 3 | Version: ${PROJECT_VERSION} 4 | Requires: ${PKG_CONFIG_REQUIRES} 5 | Requires.private: ${PKG_CONFIG_REQUIRES_PRIVATE} 6 | prefix=${CMAKE_INSTALL_PREFIX} 7 | includedir=${PKG_CONFIG_INCLUDEDIR} 8 | libdir=${PKG_CONFIG_LIBDIR} 9 | Libs: ${PKG_CONFIG_LIBS} 10 | Cflags: ${PKG_CONFIG_CFLAGS} 11 | -------------------------------------------------------------------------------- /cmake/ltocheck-lib.c: -------------------------------------------------------------------------------- 1 | 2 | extern int 3 | answer (int a, int b) 4 | { 5 | return a + b; 6 | } -------------------------------------------------------------------------------- /cmake/ltocheck-main.c: -------------------------------------------------------------------------------- 1 | extern int 2 | answer (int, int); 3 | 4 | int 5 | main () 6 | { 7 | int a = answer (3, 4); 8 | return a != 7; 9 | } 10 | -------------------------------------------------------------------------------- /doc/img/cli-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/libmongocrypt/3d8e3be669b013b9d159d3de753f0c0de66d5602/doc/img/cli-icon.png -------------------------------------------------------------------------------- /doc/img/reference-targets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/libmongocrypt/3d8e3be669b013b9d159d3de753f0c0de66d5602/doc/img/reference-targets.png -------------------------------------------------------------------------------- /etc/debian/source/format: -------------------------------------------------------------------------------- 1 | 1.0 2 | -------------------------------------------------------------------------------- /etc/format-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . "$(dirname "${BASH_SOURCE[0]}")/../.evergreen/init.sh" 4 | 5 | files="$(find "$LIBMONGOCRYPT_DIR/src" "$LIBMONGOCRYPT_DIR/test" -type f -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp')" 6 | # shellcheck disable=SC2206 7 | IFS=$'\n' files=($files) 8 | bash "$LIBMONGOCRYPT_DIR/etc/format.sh" \ 9 | --style="file:$LIBMONGOCRYPT_DIR/.clang-format" \ 10 | -i \ 11 | "$@" \ 12 | -- "${files[@]:?}" 13 | -------------------------------------------------------------------------------- /etc/format.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . "$(dirname "${BASH_SOURCE[0]}")/../.evergreen/init.sh" 4 | 5 | : "${CLANG_FORMAT_VERSION:=15.0.7}" 6 | export PIPX_HOME="${BUILD_CACHE_DIR}/pipx" 7 | 8 | if ! run_python -c ''; then 9 | fail "No Python found?" 10 | fi 11 | 12 | 13 | # Give default clang-format an empty string on stdin if there are no inputs files 14 | printf '' | run_python -m pipx run "clang-format==${CLANG_FORMAT_VERSION:?}" "$@" 15 | -------------------------------------------------------------------------------- /etc/list-compile-files.py: -------------------------------------------------------------------------------- 1 | description = """Prints the list of files in a compilation database. 2 | Run with python ./list-compile-files.py 3 | """ 4 | 5 | from fnmatch import fnmatch 6 | import sys 7 | import json 8 | import os 9 | 10 | if len(sys.argv) != 2: 11 | print(description) 12 | sys.exit(1) 13 | 14 | compile_db = json.load(open(sys.argv[1] + "compile_commands.json", "r")) 15 | for entry in compile_db: 16 | fpath = entry['file'] 17 | fname = os.path.basename(fpath) 18 | if fnmatch(fname, 'mc-*') or fnmatch(fname, 'mongocrypt-*'): 19 | print(fpath) 20 | print("") 21 | -------------------------------------------------------------------------------- /etc/mongo-inteldfp-libmongocrypt-pr-625.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h 2 | index ef8a5b7..98d86c1 100644 3 | --- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h 4 | +++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h 5 | @@ -39,7 +39,7 @@ 6 | # define merced 7 | #endif 8 | 9 | -#if defined(ct) || defined(efi2) 10 | +#if defined(ct) || defined(efi2) || defined(__x86_64__) 11 | # undef _M_AMD64 12 | # define _M_AMD64 13 | #endif 14 | -------------------------------------------------------------------------------- /etc/requirements.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | pymongo -------------------------------------------------------------------------------- /etc/rewrite.py: -------------------------------------------------------------------------------- 1 | help = """ 2 | Script to rewrite \n to \r\n 3 | Usage: python3 rewrite.py file-in.txt file-out.txt 4 | file-in.txt will be rewritten to have \n replaced with \r\n. 5 | """ 6 | import sys 7 | if len(sys.argv) != 3: 8 | print (help) 9 | sys.exit(1) 10 | 11 | src = open (sys.argv[1], "r") 12 | dst = open (sys.argv[2], "w") 13 | for line in src: 14 | print (line) 15 | dst.write(line.strip() + "\r\n") 16 | dst.close() -------------------------------------------------------------------------------- /etc/rpm/tweak.awk: -------------------------------------------------------------------------------- 1 | # This script is used to tweak the upstream libmongocrypt.spec file such that 2 | # the rpm build will build from a copy of the source tree instead of by 3 | # unpacking an archive of the sources 4 | 5 | # Drop the gcc-13 patch. 6 | /Patch.*gcc-13/ { next } 7 | 8 | # Drop the source. We're bringing our own 9 | /Source0/ { next } 10 | 11 | # Replace the autosetup with one that copies the source tree into place 12 | /%autosetup/ { 13 | print "cp -rf %{_sourcedir}/. %{_builddir}/\n" \ 14 | "%autopatch 0 -p1" 15 | next 16 | } 17 | 18 | # Print every other line as-is 19 | { print } 20 | -------------------------------------------------------------------------------- /kms-message/.gitattributes: -------------------------------------------------------------------------------- 1 | *.bin binary 2 | -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/NOTICE: -------------------------------------------------------------------------------- 1 | AWS Signature Version 4 Test Suite 2 | Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:value2,value2,value1 6 | x-amz-date:20150830T123600Z 7 | 8 | host;my-header1;x-amz-date 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value2 4 | My-Header1:value2 5 | My-Header1:value1 6 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value2 4 | My-Header1:value2 5 | My-Header1:value1 6 | X-Amz-Date:20150830T123600Z 7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c9d5ea9f3f72853aea855b47ea873832890dbdd183b4468f858259531a5138ea -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-key-duplicate/get-header-key-duplicate.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | dc7f04a3abfde8d472b0ab1a418b741b7c67174dad1551b4117b15527fbe966c -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:value1,value2,value3 6 | x-amz-date:20150830T123600Z 7 | 8 | host;my-header1;x-amz-date 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value1 4 | value2 5 | value3 6 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value1 4 | value2 5 | value3 6 | X-Amz-Date:20150830T123600Z 7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=ba17b383a53190154eb5fa66a1b836cc297cc0a3d70a5d00705980573d8ff790 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-multiline/get-header-value-multiline.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | b7b6cbfd8a0430b78891e986784da2630c8a135a8595cec25b26ea94f926ee55 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:value4,value1,value3,value2 6 | x-amz-date:20150830T123600Z 7 | 8 | host;my-header1;x-amz-date 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value4 4 | My-Header1:value1 5 | My-Header1:value3 6 | My-Header1:value2 7 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value4 4 | My-Header1:value1 5 | My-Header1:value3 6 | My-Header1:value2 7 | X-Amz-Date:20150830T123600Z 8 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=08c7e5a9acfcfeb3ab6b2185e75ce8b1deb5e634ec47601a50643f830c755c01 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-order/get-header-value-order.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 31ce73cd3f3d9f66977ad3dd957dc47af14df92fcd8509f59b349e9137c58b86 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:value1 6 | my-header2:"a b c" 7 | x-amz-date:20150830T123600Z 8 | 9 | host;my-header1;my-header2;x-amz-date 10 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1: value1 4 | My-Header2: "a b c" 5 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1: value1 4 | My-Header2: "a b c" 5 | X-Amz-Date:20150830T123600Z 6 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;my-header2;x-amz-date, Signature=acc3ed3afb60bb290fc8d2dd0098b9911fcaa05412b367055dee359757a9c736 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-header-value-trim/get-header-value-trim.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | a726db9b0df21c14f559d0a978e563112acb1b9e05476f0a6a1c7d68f28605c7 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.req: -------------------------------------------------------------------------------- 1 | GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sreq: -------------------------------------------------------------------------------- 1 | GET /-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=07ef7494c76fa4850883e2b006601f940f8a34d404d0cfa977f52a65bbf5f24f -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-unreserved/get-unreserved.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 6a968768eefaa713e2a6b16b589a8ea192661f098f37349f4e2c0082757446f9 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /%E1%88%B4 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.req: -------------------------------------------------------------------------------- 1 | GET /ሴ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sreq: -------------------------------------------------------------------------------- 1 | GET /ሴ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8318018e0b0f223aa2bbf98705b62bb787dc9c0e678f255a891fd03141be5d85 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-utf8/get-utf8.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 2a0a97d02205e45ce2e994789806b19270cfbbb0921b278ccf58f5249ac42102 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | Param1=value1 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.req: -------------------------------------------------------------------------------- 1 | GET /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sreq: -------------------------------------------------------------------------------- 1 | GET /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=a67d582fa61cc504c4bae71f336f98b97f1ea3c7a6bfe1b6e45aec72011b9aeb -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-empty-query-key/get-vanilla-empty-query-key.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 1e24db194ed7d0eec2de28d7369675a243488e08526e8c1c73571282f7c517ab -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | Param1=value1&Param2=value2 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.req: -------------------------------------------------------------------------------- 1 | GET /?Param2=value2&Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sreq: -------------------------------------------------------------------------------- 1 | GET /?Param2=value2&Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=b97d918cfa904a5beff61c982a1b6f458b799221646efd99d3219ec94cdf2500 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key-case/get-vanilla-query-order-key-case.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | Param1=Value1&Param1=value2 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.req: -------------------------------------------------------------------------------- 1 | GET /?Param1=value2&Param1=Value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sreq: -------------------------------------------------------------------------------- 1 | GET /?Param1=value2&Param1=Value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=eedbc4e291e521cf13422ffca22be7d2eb8146eecf653089df300a15b2382bd1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-key/get-vanilla-query-order-key.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 704b4cef673542d84cdff252633f065e8daeba5f168b77116f8b1bcaf3d38f89 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | Param1=value1&Param1=value2 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.req: -------------------------------------------------------------------------------- 1 | GET /?Param1=value2&Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sreq: -------------------------------------------------------------------------------- 1 | GET /?Param1=value2&Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5772eed61e12b33fae39ee5e7012498b51d56abc0abb7c60486157bd471c4694 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-order-value/get-vanilla-query-order-value.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | c968629d70850097a2d8781c9bf7edcb988b04cac14cca9be4acc3595f884606 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | -._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.req: -------------------------------------------------------------------------------- 1 | GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sreq: -------------------------------------------------------------------------------- 1 | GET /?-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz=-._~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9c3e54bfcdf0b19771a7f523ee5669cdf59bc7cc0884027167c21bb143a40197 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query-unreserved/get-vanilla-query-unreserved.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | c30d4703d9f799439be92736156d47ccfb2d879ddf56f5befa6d1d6aab979177 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-query/get-vanilla-query.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | %E1%88%B4=bar 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.req: -------------------------------------------------------------------------------- 1 | GET /?ሴ=bar HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sreq: -------------------------------------------------------------------------------- 1 | GET /?ሴ=bar HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=2cdec8eed098649ff3a119c94853b13c643bcf08f8b0a1d91e12c9027818dd04 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla-utf8-query/get-vanilla-utf8-query.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | eb30c5bed55734080471a834cc727ae56beb50e5f39d1bff6d0d38cb192a7073 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.req: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sreq: -------------------------------------------------------------------------------- 1 | GET / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/get-vanilla/get-vanilla.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.req: -------------------------------------------------------------------------------- 1 | GET /example1/example2/../.. HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sreq: -------------------------------------------------------------------------------- 1 | GET /example1/example2/../.. HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative-relative/get-relative-relative.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.req: -------------------------------------------------------------------------------- 1 | GET /example/.. HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sreq: -------------------------------------------------------------------------------- 1 | GET /example/.. HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-relative/get-relative.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.req: -------------------------------------------------------------------------------- 1 | GET /./ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sreq: -------------------------------------------------------------------------------- 1 | GET /./ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-dot-slash/get-slash-dot-slash.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /example 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.req: -------------------------------------------------------------------------------- 1 | GET /./example HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sreq: -------------------------------------------------------------------------------- 1 | GET /./example HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=ef75d96142cf21edca26f06005da7988e4f8dc83a165a80865db7089db637ec5 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash-pointless-dot/get-slash-pointless-dot.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 214d50c111a8edc4819da6a636336472c916b5240f51e9a51b5c3305180cf702 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.creq: -------------------------------------------------------------------------------- 1 | GET 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.req: -------------------------------------------------------------------------------- 1 | GET // HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sreq: -------------------------------------------------------------------------------- 1 | GET // HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5fa00fa31553b73ebf1942676e86291e8372ff2a2260956d9b8aae1d763fbf31 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slash/get-slash.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | bb579772317eb040ac9ed261061d46c1f17a8133879d6129b6e1c25292927e63 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /example/ 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.req: -------------------------------------------------------------------------------- 1 | GET //example// HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sreq: -------------------------------------------------------------------------------- 1 | GET //example// HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=9a624bd73a37c9a373b5312afbebe7a714a789de108f0bdfe846570885f57e84 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-slashes/get-slashes.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | cb96b4ac96d501f7c5c15bc6d67b3035061cfced4af6585ad927f7e6c985c015 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /example%20space/ 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.req: -------------------------------------------------------------------------------- 1 | GET /example space/ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sreq: -------------------------------------------------------------------------------- 1 | GET /example space/ HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=652487583200325589f1fba4c7e578f72c47cb61beeca81406b39ddec1366741 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/get-space/get-space.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 63ee75631ed7234ae61b5f736dfc7754cdccfedbff4b5128a915706ee9390d86 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/normalize-path/normalize-path.txt: -------------------------------------------------------------------------------- 1 | A note about signing requests to Amazon S3: 2 | 3 | In exception to this, you do not normalize URI paths for requests to Amazon S3. For example, if you have a bucket with an object named my-object//example//photo.user, use that path. Normalizing the path to my-object/example/photo.user will cause the request to fail. For more information, see Task 1: Create a Canonical Request in the Amazon Simple Storage Service API Reference: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html#canonical-request -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-case/post-header-key-case.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:value1 6 | x-amz-date:20150830T123600Z 7 | 8 | host;my-header1;x-amz-date 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value1 4 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:value1 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=c5410059b04c1ee005303aed430f6e6645f61f4dc9e1461ec8f8916fdf18852c -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-key-sort/post-header-key-sort.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 9368318c2967cf6de74404b30c65a91e8f6253e0a8659d6d5319f1a812f87d65 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | my-header1:VALUE1 6 | x-amz-date:20150830T123600Z 7 | 8 | host;my-header1;x-amz-date 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:VALUE1 4 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | My-Header1:VALUE1 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;my-header1;x-amz-date, Signature=cdbc9802e29d2942e5e10b5bccfdd67c5f22c7c4e8ae67b53629efa58b974b7d -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-header-value-case/post-header-value-case.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | d51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-after/post-sts-header-after.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | x-amz-security-token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== 7 | 8 | host;x-amz-date;x-amz-security-token 9 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | X-Amz-Security-Token:AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA== 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=85d96828115b5dc0cfc3bd16ad9e210dd772bbebba041836c64533a82be05ead -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-sts-token/post-sts-header-before/post-sts-header-before.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | c237e1b440d4c63c32ca95b5b99481081cb7b13c7e40434868e71567c1a882f6 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | Param1=value1 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.req: -------------------------------------------------------------------------------- 1 | POST /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sreq: -------------------------------------------------------------------------------- 1 | POST /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-empty-query-value/post-vanilla-empty-query-value.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | Param1=value1 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.req: -------------------------------------------------------------------------------- 1 | POST /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sreq: -------------------------------------------------------------------------------- 1 | POST /?Param1=value1 HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=28038455d6de14eafc1f9222cf5aa6f1a96197d7deb8263271d420d138af7f11 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla-query/post-vanilla-query.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 9d659678c1756bb3113e2ce898845a0a79dbbc57b740555917687f1b3340fbbd -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | host:example.amazonaws.com 5 | x-amz-date:20150830T123600Z 6 | 7 | host;x-amz-date 8 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:example.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=host;x-amz-date, Signature=5da7c1a2acd57cee7505fc6676e4e544621c30862966e37dddb68e92efbe5d6b -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-vanilla/post-vanilla.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 553f88c9e4d10fc9e109e2aeb65f030801b70c2f6468faca261d401ae622fc87 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | content-type:application/x-www-form-urlencoded; charset=utf8 5 | host:example.amazonaws.com 6 | x-amz-date:20150830T123600Z 7 | 8 | content-type;host;x-amz-date 9 | 9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Type:application/x-www-form-urlencoded; charset=utf8 3 | Host:example.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | 6 | Param1=value1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Type:application/x-www-form-urlencoded; charset=utf8 3 | Host:example.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=1a72ec8f64bd914b0e42e42607c7fbce7fb2c7465f63e3092b3b0d39fa77a6fe 6 | 7 | Param1=value1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded-parameters/post-x-www-form-urlencoded-parameters.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 2e1cf7ed91881a30569e46552437e4156c823447bf1781b921b5d486c568dd1c -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.authz: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | content-type:application/x-www-form-urlencoded 5 | host:example.amazonaws.com 6 | x-amz-date:20150830T123600Z 7 | 8 | content-type;host;x-amz-date 9 | 9095672bbd1f56dfc5b65f3e153adc8731a4a654192329106275f4c7b24d0b6e -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.req: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Type:application/x-www-form-urlencoded 3 | Host:example.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | 6 | Param1=value1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Type:application/x-www-form-urlencoded 3 | Host:example.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ff11897932ad3f4e8b18135d722051e5ac45fc38421b1da7b9d196a0fe09473a 6 | 7 | Param1=value1 -------------------------------------------------------------------------------- /kms-message/aws-sig-v4-test-suite/post-x-www-form-urlencoded/post-x-www-form-urlencoded.sts: -------------------------------------------------------------------------------- 1 | AWS4-HMAC-SHA256 2 | 20150830T123600Z 3 | 20150830/us-east-1/service/aws4_request 4 | 42a5e5bb34198acb3e84da4f085bb7927f2bc277ca766e6d19c73c2154021281 -------------------------------------------------------------------------------- /kms-message/cmake/kms_message-config.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/kms_message_targets.cmake") 2 | -------------------------------------------------------------------------------- /kms-message/cmake/libkms_message.pc.in: -------------------------------------------------------------------------------- 1 | Name: ${PROJECT_NAME} 2 | Description: ${PROJECT_DESCRIPTION} 3 | Version: ${PROJECT_VERSION} 4 | Requires: ${PKG_CONFIG_REQUIRES} 5 | prefix=${CMAKE_INSTALL_PREFIX} 6 | includedir=${PKG_CONFIG_INCLUDEDIR} 7 | libdir=${PKG_CONFIG_LIBDIR} 8 | Libs: ${PKG_CONFIG_LIBS} 9 | Cflags: ${PKG_CONFIG_CFLAGS} 10 | -------------------------------------------------------------------------------- /kms-message/test/connection_close/connection_close.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Connection:close 3 | Host:foo-service.foo-region.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=foo-akid/20150830/foo-region/foo-service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8b264695a2fd7fe28b309c611e0770da5a4c5ca0c040209941f78d773d9297b2 -------------------------------------------------------------------------------- /kms-message/test/content_length/content_length.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Length:11 3 | Host:foo-service.foo-region.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | Authorization: AWS4-HMAC-SHA256 Credential=foo-akid/20150830/foo-region/foo-service/aws4_request, SignedHeaders=content-length;host;x-amz-date, Signature=9025f1937fb114f77158a8bf0170e1ec1a9aa29806bc7800ca850966cd32920b 6 | 7 | foo-payload -------------------------------------------------------------------------------- /kms-message/test/decrypt/decrypt.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | content-length:234 5 | content-type:application/x-amz-json-1.1 6 | host:service.us-east-1.amazonaws.com 7 | x-amz-date:20150830T123600Z 8 | x-amz-target:TrentService.Decrypt 9 | 10 | content-length;content-type;host;x-amz-date;x-amz-target 11 | 48384de310621c850968f3948bddd004ecf5cae592a24530f778e4d190bd9dbc -------------------------------------------------------------------------------- /kms-message/test/decrypt/decrypt.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Length:234 3 | Content-Type:application/x-amz-json-1.1 4 | Host:service.us-east-1.amazonaws.com 5 | X-Amz-Date:20150830T123600Z 6 | X-Amz-Target:TrentService.Decrypt 7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=977a49f82aa74b38944cbd299880dcc3ec2bbcd953c36b1a19a3cde56f415f31 8 | 9 | {"CiphertextBlob": "AQICAHjzjtjUxrr7oc/BHmjyoZGeNk10osSeMGcIUzMNzeDJGwFgMNRznpAfp0NVhCb51fCxAAAAZDBiBgkqhkiG9w0BBwagVTBTAgEAME4GCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMoscSHCU4DuwIHyMJAgEQgCFhA83L4qw2T3PbG3MuM9pFUfTNwP/S4bnEwg6/U5BGGEI="} -------------------------------------------------------------------------------- /kms-message/test/encrypt/encrypt.creq: -------------------------------------------------------------------------------- 1 | POST 2 | / 3 | 4 | content-length:45 5 | content-type:application/x-amz-json-1.1 6 | host:service.us-east-1.amazonaws.com 7 | x-amz-date:20150830T123600Z 8 | x-amz-target:TrentService.Encrypt 9 | 10 | content-length;content-type;host;x-amz-date;x-amz-target 11 | 5fc6e5b49ee8c6926b9eeefb69e108be4c8e1cf81d8af8f51c7d5b992afd029c -------------------------------------------------------------------------------- /kms-message/test/encrypt/encrypt.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Content-Length:45 3 | Content-Type:application/x-amz-json-1.1 4 | Host:service.us-east-1.amazonaws.com 5 | X-Amz-Date:20150830T123600Z 6 | X-Amz-Target:TrentService.Encrypt 7 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/service/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=28d8a139a4a7da0bd7082979fa938ce20514e0500cdd441fd46f702ae3d3cfd2 8 | 9 | {"Plaintext": "Zm9vYmFy", "KeyId": "alias/1"} -------------------------------------------------------------------------------- /kms-message/test/example-response.bin: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 319 5 | 6 | {"CiphertextBlob":"AQICAHifzrL6n/3uqZyz+z1bJj80DhqPcSAibAaIoYc+HOVP6QEplwbM0wpvU5zsQG/1SBKvAAAAZDBiBgkqhkiG9w0BBwagVTBTAgEAME4GCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM5syMJE7RodxDaqYqAgEQgCHMFCnFso4Lih0CNbLT1kiET0hQyzjgoa9733353GQkGlM=","KeyId":"arn:aws:kms:us-east-1:524754917239:key/bd05530b-0a7f-4fbd-8362-ab3667370db0"} -------------------------------------------------------------------------------- /kms-message/test/host/host.sreq: -------------------------------------------------------------------------------- 1 | POST / HTTP/1.1 2 | Host:foo-service.foo-region.amazonaws.com 3 | X-Amz-Date:20150830T123600Z 4 | Authorization: AWS4-HMAC-SHA256 Credential=foo-akid/20150830/foo-region/foo-service/aws4_request, SignedHeaders=host;x-amz-date, Signature=8b264695a2fd7fe28b309c611e0770da5a4c5ca0c040209941f78d773d9297b2 -------------------------------------------------------------------------------- /kms-message/test/multibyte/multibyte.creq: -------------------------------------------------------------------------------- 1 | GET 2 | /%E2%82%AC/ 3 | euro=%E2%82%AC 4 | content-length:4 5 | host:€.€.amazonaws.com 6 | x-amz-date:20150830T123600Z 7 | €:€asdf€ 8 | 9 | content-length;host;x-amz-date;€ 10 | 5bf858e4b892817978d798623768af7080d99ded72501cf15374e12861725f12 -------------------------------------------------------------------------------- /kms-message/test/multibyte/multibyte.sreq: -------------------------------------------------------------------------------- 1 | GET /€/?euro=€ HTTP/1.1 2 | Content-Length:4 3 | Host:€.€.amazonaws.com 4 | X-Amz-Date:20150830T123600Z 5 | €:€asdf€ 6 | Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/€/€/aws4_request, SignedHeaders=content-length;host;x-amz-date;€, Signature=88d2d4b0639c6b6db1ce366d2578b8407562caa905fc375fdf1ddb7f0b789f5b 7 | 8 | € -------------------------------------------------------------------------------- /src/mlib/int128.test.c: -------------------------------------------------------------------------------- 1 | #include "./int128.h" 2 | 3 | // This file checks for C compilability. Other tests are defined in .test.cpp 4 | -------------------------------------------------------------------------------- /src/mlib/user-check.h: -------------------------------------------------------------------------------- 1 | #ifndef MLIB_USER 2 | #error \ 3 | "The file being compiled transitively #include'd a mongo-mlib header, but is not a direct consumer of mlib, which is a private library for MongoDB C driver libraries" 4 | #endif 5 | -------------------------------------------------------------------------------- /src/mlib/windows-lean.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is simply a wrapper around and ensures that 3 | * WIN32_LEAN_AND_MEAN is defined before including it. 4 | */ 5 | #ifndef MLIB_WINDOWS_LEAN_H 6 | #define MLIB_WINDOWS_LEAN_H 7 | 8 | #ifdef __has_include 9 | #if !__has_include() 10 | #error " is only available when in available." 11 | #endif 12 | #endif 13 | 14 | #pragma push_macro("WIN32_LEAN_AND_MEAN") 15 | // Disable macro redefinition warning 16 | #undef WIN32_LEAN_AND_MEAN 17 | #define WIN32_LEAN_AND_MEAN 1 18 | #include 19 | #pragma pop_macro("WIN32_LEAN_AND_MEAN") 20 | 21 | #endif // MLIB_WINDOWS_LEAN_H 22 | -------------------------------------------------------------------------------- /test/data/bulkWrite/jsonSchema/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "bulkWrite": { 3 | "$numberInt": "1" 4 | }, 5 | "ops": [ 6 | { 7 | "insert": 0, 8 | "document": { 9 | "plainText": "sample", 10 | "encrypted": { 11 | "$numberInt": "123" 12 | } 13 | } 14 | } 15 | ], 16 | "nsInfo": [ 17 | { 18 | "ns": "db.test" 19 | } 20 | ], 21 | "jsonSchema": {}, 22 | "isRemoteSchema": false 23 | } 24 | -------------------------------------------------------------------------------- /test/data/bulkWrite/simple/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "bulkWrite": 1, 3 | "ops": [ 4 | { 5 | "insert": 0, 6 | "document": { 7 | "plainText": "sample", 8 | "encrypted": { 9 | "$numberInt": "123" 10 | } 11 | } 12 | } 13 | ], 14 | "nsInfo": [ 15 | { 16 | "ns": "db.test" 17 | } 18 | ], 19 | "$db": "admin" 20 | } 21 | -------------------------------------------------------------------------------- /test/data/bulkWrite/simple/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "enxcol_.test.esc", 4 | "ecocCollection": "enxcol_.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "encrypted", 14 | "bsonType": "int", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": { 18 | "$numberLong": "0" 19 | } 20 | } 21 | } 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/data/bulkWrite/unencrypted/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "bulkWrite": 1, 3 | "ops": [ 4 | { 5 | "insert": 0, 6 | "document": { 7 | "plainText": "sample" 8 | } 9 | } 10 | ], 11 | "nsInfo": [ 12 | { 13 | "ns": "db.test" 14 | } 15 | ], 16 | "$db": "admin" 17 | } 18 | -------------------------------------------------------------------------------- /test/data/bulkWrite/unencrypted/payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "bulkWrite": { 3 | "$numberInt": "1" 4 | }, 5 | "ops": [ 6 | { 7 | "insert": { 8 | "$numberInt": "0" 9 | }, 10 | "document": { 11 | "plainText": "sample" 12 | } 13 | } 14 | ], 15 | "nsInfo": [ 16 | { 17 | "ns": "db.test" 18 | } 19 | ], 20 | "$db": "admin" 21 | } 22 | -------------------------------------------------------------------------------- /test/data/cleanup/missing-key-id/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "encryptedFields": { 5 | "escCollection": "fle2.basic.esc", 6 | "ecocCollection": "fle2.basic.ecoc", 7 | "fields": [ 8 | { 9 | "path": "missingKeyId", 10 | "bsonType": "string", 11 | "queries": { 12 | "queryType": "equality", 13 | "contention": { 14 | "$numberLong": "0" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/data/cleanup/no-fields/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "encryptedFields": { 5 | "escCollection": "esc", 6 | "ecocCollection": "ecoc", 7 | "fields": [] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/data/cleanup/no-fields/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "cleanupStructuredEncryptionData": "test", 3 | "cleanupTokens": {} 4 | } -------------------------------------------------------------------------------- /test/data/cleanup/success/cmd.json: -------------------------------------------------------------------------------- 1 | { "cleanupStructuredEncryptionData": "test" } 2 | -------------------------------------------------------------------------------- /test/data/collection-info-no-validator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "test", 3 | "type" : "collection", 4 | "options" : {}, 5 | "info" : {}, 6 | "idIndex" : { 7 | "v" : 2, 8 | "key" : { 9 | "_id" : 1 10 | }, 11 | "name" : "_id_" 12 | } 13 | } -------------------------------------------------------------------------------- /test/data/collection-info-view.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "v", 3 | "type": "view", 4 | "options": { 5 | "viewOn": "coll", 6 | "pipeline": [] 7 | }, 8 | "info": { 9 | "readOnly": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/compact/anchor-pad/cmd.json: -------------------------------------------------------------------------------- 1 | { "compactStructuredEncryptionData": "test", "anchorPaddingFactor": 0.47 } 2 | -------------------------------------------------------------------------------- /test/data/compact/missing-key-id/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "encryptedFields": { 5 | "escCollection": "fle2.basic.esc", 6 | "ecocCollection": "fle2.basic.ecoc", 7 | "fields": [ 8 | { 9 | "path": "missingKeyId", 10 | "bsonType": "string", 11 | "queries": { 12 | "queryType": "equality", 13 | "contention": { 14 | "$numberLong": "0" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/data/compact/no-fields/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "encryptedFields": { 5 | "escCollection": "esc", 6 | "ecocCollection": "ecoc", 7 | "fields": [] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/data/compact/no-fields/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "compactStructuredEncryptionData": "test", 3 | "compactionTokens": {} 4 | } -------------------------------------------------------------------------------- /test/data/compact/no-range/cmd.json: -------------------------------------------------------------------------------- 1 | { "compactStructuredEncryptionData": "test" } 2 | -------------------------------------------------------------------------------- /test/data/compact/no-range/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "compactStructuredEncryptionData": "test", 3 | "compactionTokens": { 4 | "nested.notindexed": { 5 | "$binary": { 6 | "base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=", 7 | "subType": "00" 8 | } 9 | }, 10 | "nested.encrypted": { 11 | "$binary": { 12 | "base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=", 13 | "subType": "00" 14 | } 15 | }, 16 | "encrypted": { 17 | "$binary": { 18 | "base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=", 19 | "subType": "00" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/data/compact/success/cmd.json: -------------------------------------------------------------------------------- 1 | { "compactStructuredEncryptionData": "test" } 2 | -------------------------------------------------------------------------------- /test/data/dollardb/omitted/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | } 6 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | }, 6 | "$db": "db" 7 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved_empty/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | }, 6 | "encryptionInformation": { 7 | "type": 1, 8 | "schema": { 9 | "db.test": { 10 | "escCollection": "esc", 11 | "ecocCollection": "ecoc", 12 | "fields": [] 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/data/dollardb/preserved_empty/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | }, 6 | "$db": "db" 7 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved_empty/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "encryptedFields": { 5 | "escCollection": "esc", 6 | "ecocCollection": "ecoc", 7 | "fields": [] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/data/dollardb/preserved_empty/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | }, 6 | "$db": "db" 7 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved_empty/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "find": "test", 7 | "filter": { 8 | "value": 123456 9 | }, 10 | "encryptionInformation": { 11 | "type": 1, 12 | "schema": { 13 | "db.test": { 14 | "escCollection": "esc", 15 | "ecocCollection": "ecoc", 16 | "fields": [] 17 | } 18 | } 19 | } 20 | }, 21 | "hasEncryptedPlaceholders": false 22 | } 23 | -------------------------------------------------------------------------------- /test/data/dollardb/preserved_fle1/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | }, 6 | "$db": "db" 7 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved_fle1/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": { 5 | "$eq": { 6 | "$binary": { 7 | "base64": "ARI0VngSNJh2EjQSNFZ4kBIQl2bQhMRGH/FbUJH1jGuUSHGQS6UYOSv5kqZrzd4hKx1erD8rDjS/c50CQ6nQb1S2WKlgWL3SeoyT23g//BNWfA==", 8 | "subType": "06" 9 | } 10 | } 11 | } 12 | }, 13 | "$db": "db" 14 | } -------------------------------------------------------------------------------- /test/data/dollardb/preserved_fle1/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "hasEncryptionPlaceholders": true, 3 | "schemaRequiresEncryption": true, 4 | "result": { 5 | "find": "test", 6 | "filter": { 7 | "value": { 8 | "$eq": { 9 | "$binary": "ACwAAAAQYQABAAAABWtpABAAAAAEEjRWeBI0mHYSNBI0VniQEhB2AEDiAQAA", 10 | "$type": "06" 11 | } 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /test/data/efc/efc-extraField.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "fle2.basic.esc", 3 | "ecocCollection": "fle2.basic.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "firstName", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": { 17 | "$numberLong": "0" 18 | } 19 | }, 20 | "extraField": "ignoreMe" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /test/data/efc/efc-missingKeyId.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "fle2.basic.esc", 3 | "ecocCollection": "fle2.basic.ecoc", 4 | "fields": [ 5 | { 6 | "path": "missingKeyId", 7 | "bsonType": "string", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /test/data/efc/efc-oneField-badVersionSet.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "fle2.basic.esc", 3 | "ecocCollection": "fle2.basic.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "firstName", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": { 17 | "$numberLong": "0" 18 | } 19 | } 20 | } 21 | ], 22 | "strEncodeVersion": 99 23 | } 24 | -------------------------------------------------------------------------------- /test/data/efc/efc-oneField-goodVersionSet.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "fle2.basic.esc", 3 | "ecocCollection": "fle2.basic.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "firstName", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": { 17 | "$numberLong": "0" 18 | } 19 | } 20 | } 21 | ], 22 | "strEncodeVersion": 1 23 | } 24 | -------------------------------------------------------------------------------- /test/data/efc/efc-oneField.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "fle2.basic.esc", 3 | "ecocCollection": "fle2.basic.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "firstName", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": { 17 | "$numberLong": "0" 18 | } 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /test/data/encrypted-cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "filter": { 3 | "ssn": { 4 | "$binary": { 5 | "base64": "AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=", 6 | "subType": "06" 7 | } 8 | } 9 | }, 10 | "find": "test" 11 | } 12 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE1DeterministicEncryptedValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "AavN76sSNJh2EjQSNFZ4kBICWqrPwniNou6js6HYziih7aohQYE5RKpYxnRtdQ6in5s3qv9mG/5lkEDIPRGcEPNKXwBz+iYB1mB1rgGZEQHikg==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE1EncryptionPlaceholder.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "ADgAAAAQYQABAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQJ2AAwAAAA0NTctNTUtNTQ2MgAA", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE1RandomEncryptedValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "AqvN76sSNJh2EjQSNFZ4kBIC6BSCq8jmrdY68Q0LB4ZVCxehoOHbyehgjllrluoTz0kOjm+6ppKu5a7XG0mMcZFRxZ6yZK/6GhSCQFN1H/Bp7A==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2EncryptionPlaceholder.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "A2EAAAAQdAABAAAAEGEAAgAAAAVraQAQAAAABBI0VngSNJh2EjQSNFZ4kBIFa3UAEAAAAASrze+rEjSYdhI0EjRWeJASAnYACQAAAHZhbHVlMTIzABJjbQAAAAAAAAAAAAA=", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2FindEqualityPayload.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "BbEAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefIFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsEmNtAAAAAAAAAAAAAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2FindEqualityPayloadV2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "DIkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVsACAAAAAAlO36MaVLVRDFW6xrI+0UTkyQdFfSCEBPkZg8sFzuTJYSY20AAAAAAAAAAAAA", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2IndexedEqualityEncryptedValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "BxI0VngSNJh2EjQSNFZ4kBICQ7uhTd9C2oI8M1afRon0ZaYG0s6oTmt0aBZ9kO4S4mm5vId01BsW7tBHytA8pDJ2IiWBCmah3OGH2M4ET7PSqekQD4gkUCo4JeEttx4yj05Ou4D6yZUmYfVKmEljge16NCxKm7Ir9gvmQsp8x1wqGBzpndA6gkqFxsxfvQ/cIqOwMW9dGTTWsfKge+jYkCUIFMfms+XyC/8evQhjjA+qR6eEmV+N/kwpR7Q7TJe0lwU5kw2kSe3/KiPKRZZTbn8znadvycfJ0cCWGad9SQ==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2IndexedEqualityEncryptedValueV2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "DqvN76sSNJh2EjQSNFZ4kBICjqZv6Pljqv2xNVm5MLXcKSRYXy+Q5frRjpTAPx0hCr+daRXntN5pv6qMh0MXY+IPnH8XOG3xXZcllswF0N3EfyZsHii2am4GdIAkxsqu6MmuAIT5x+7BZqcHIu0n7hG3mxZKPQvs8MjoBQZ2lC/dgj15+bR9OT2rLi4XHwi7kjrhV1BtSk560yuV7W1RPVQtZfW7uibsXigZQduDro7IgXoJXDTGekdyZYTZVQZlZwHAJZCdr+1sLPRS9PtkKSAE", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2InsertUpdatePayload.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "BHEBAAAFZAAgAAAAAHb62aV7+mqmaGcotPLdG3KP7S8diFwWMLM/5rYtqLrEBXMAIAAAAAAVJ6OWHRv3OtCozHpt3ZzfBhaxZirLv3B+G8PuaaO4EgVjACAAAAAAsZXWOWA+UiCBbrJNB6bHflB/cn7pWSvwWN2jw4FPeIUFcABQAAAAAMdD1nV2nqeI1eXEQNskDflCy8I7/HvvqDKJ6XxjhrPQWdLqjz+8GosGUsB7A8ee/uG9/guENuL25XD+Fxxkv1LLXtavHOlLF7iW0u9yabqqBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AE0AAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSFtVvkUcnHWj/rfPW7iJ0G3UJ8zpuBmUM/VjOMJCY4+eDqdTiPIwX+/vNXegc8FZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2InsertUpdatePayloadV2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "C18BAAAFZAAgAAAAAHb62aV7+mqmaGcotPLdG3KP7S8diFwWMLM/5rYtqLrEBXMAIAAAAAAVJ6OWHRv3OtCozHpt3ZzfBhaxZirLv3B+G8PuaaO4EgVwADAAAAAAx0PWdXaep4jV5cRA2yQN+ULLwjv8e++oMonpfGOGs9BZ0uqPP7waiwZSwHsDx57+BXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSHYikH9u4e644rfZY9N9UQR4h76qKAmcbo43utRcXMQy+FXXIxSuNntFHZHTcNJhJoFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAABpn2zcb7jOd/FK3F45nBxnLU6HOMwZzmGOZ0w35v/DqRJrAAAAAAAAAAAAAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2UnindexedEncryptedValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "BqvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFTtw1tXzjcdSEyxpKKqujlko5TeizkB9hHQ009dVY1+fgIiDcefh+eQrm3CkhQ==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decrypt/FLE2UnindexedEncryptedValueV2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "EKvN76sSNJh2EjQSNFZ4kBICUH8j3oVCIjE3koejjIwxHF/nVP95ymiPNUPKskdjx55vK0SasqFyS4LxjZ6fQbzZSoMHPwdmR5otQl9HcMjAcg==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/explicit-decryption-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "AQAAAAAAAAAAAAAAAAAAAAACaWlpaWlpaWlpaWlpaWlpabxsgJndMBCMERBAi/fCAOAQu6/LKU2mu5X7FLmEJlhkHsRr7TxMoz/2akbqBBzCVn1FXiIe9esJCgNhan6EY8g=", 5 | "subType": "06" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/find-with-encryptionInformation.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "coll", 3 | "encryptionInformation": { 4 | "type": { 5 | "$numberInt": "1" 6 | }, 7 | "schema": { 8 | "db.coll": { 9 | "fields": [], 10 | "escCollection": "enxcol_.coll.esc", 11 | "ecocCollection": "enxcol_.coll.ecoc" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/data/fle1-collMod/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "collMod": "encryptedCollection", 3 | "validator": { 4 | "$jsonSchema": { 5 | "bsonType": "object" 6 | } 7 | }, 8 | "jsonSchema": { 9 | "bsonType": "object" 10 | }, 11 | "isRemoteSchema": true 12 | } -------------------------------------------------------------------------------- /test/data/fle1-collMod/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "collMod": "encryptedCollection", 3 | "validator": { 4 | "$jsonSchema": { 5 | "bsonType": "object" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle1-collMod/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "collMod": "encryptedCollection", 7 | "validator": { 8 | "$jsonSchema": { 9 | "bsonType": "object" 10 | } 11 | } 12 | }, 13 | "hasEncryptedPlaceholders": false 14 | } -------------------------------------------------------------------------------- /test/data/fle1-create/old-mongocryptd/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/old-mongocryptd/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/old-mongocryptd/ismaster-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "isMaster": 1 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/old-mongocryptd/mongocryptd-ismaster.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1653058237588 8 | }, 9 | "maxWireVersion": 13, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "validator": { 4 | "$jsonSchema": { 5 | "properties": { 6 | "a": { 7 | "bsonType": "number" 8 | } 9 | } 10 | } 11 | }, 12 | "jsonSchema": { 13 | "properties": { 14 | "a": { 15 | "bsonType": "number" 16 | } 17 | } 18 | }, 19 | "isRemoteSchema": true 20 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "validator": { 4 | "$jsonSchema": { 5 | "properties": { 6 | "a": { 7 | "bsonType": "number" 8 | } 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "validator": { 4 | "$jsonSchema": { 5 | "properties": { 6 | "a": { 7 | "bsonType": "number" 8 | } 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/ismaster-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "isMaster": 1 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/mongocryptd-ismaster.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1653058237588 8 | }, 9 | "maxWireVersion": 17, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-cmd-schema/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "create": "coll" 7 | }, 8 | "hasEncryptedPlaceholders": false 9 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "jsonSchema": { 4 | "bsonType": "object" 5 | }, 6 | "isRemoteSchema": false 7 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/ismaster-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "isMaster": 1 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/mongocryptd-ismaster.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1653058237588 8 | }, 9 | "maxWireVersion": 17, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "create": "coll" 7 | }, 8 | "hasEncryptedPlaceholders": false 9 | } -------------------------------------------------------------------------------- /test/data/fle1-create/with-schema/schema-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.coll": { 3 | "bsonType": "object" 4 | } 5 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "jsonSchema": {}, 4 | "isRemoteSchema": true 5 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/ismaster-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "isMaster": 1 3 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/mongocryptd-ismaster.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1653058237588 8 | }, 9 | "maxWireVersion": 17, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } -------------------------------------------------------------------------------- /test/data/fle1-create/without-schema/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "create": "coll" 7 | }, 8 | "hasEncryptedPlaceholders": false 9 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-csfle/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "validator": { 5 | "$jsonSchema": {} 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle1-explain/with-csfle/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-mongocryptd/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | }, 8 | "jsonSchema": {}, 9 | "isRemoteSchema": true 10 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-mongocryptd/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-mongocryptd/collinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "options": { 4 | "validator": { 5 | "$jsonSchema": {} 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle1-explain/with-mongocryptd/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle1-explain/with-mongocryptd/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "explain": { 7 | "find": "test", 8 | "filter": { 9 | "value": 123456 10 | } 11 | } 12 | }, 13 | "hasEncryptedPlaceholders": false 14 | } -------------------------------------------------------------------------------- /test/data/fle2-bad-str-encode-version/bad-create-cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "int", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ], 16 | "strEncodeVersion": 99 17 | } 18 | } -------------------------------------------------------------------------------- /test/data/fle2-bad-str-encode-version/bad-encrypted-field-config-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "fle2.test.esc", 4 | "ecocCollection": "fle2.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "ssn", 14 | "bsonType": "string", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": 0 18 | } 19 | } 20 | ], 21 | "strEncodeVersion": 99 22 | } 23 | } -------------------------------------------------------------------------------- /test/data/fle2-create-encrypted-collection-with-str-encode-version/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "int", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ], 16 | "strEncodeVersion": 1 17 | } 18 | } -------------------------------------------------------------------------------- /test/data/fle2-create-encrypted-collection-with-str-encode-version/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "int", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ], 16 | "strEncodeVersion": 1 17 | } 18 | } -------------------------------------------------------------------------------- /test/data/fle2-create-encrypted-collection/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "int", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /test/data/fle2-create-encrypted-collection/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "int", 8 | "queries": { 9 | "queryType": "equality", 10 | "contention": { 11 | "$numberLong": "0" 12 | } 13 | } 14 | } 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /test/data/fle2-create/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptionInformation": { 4 | "type": 1, 5 | "schema": { 6 | "db.coll": { 7 | "escCollection": "esc", 8 | "ecocCollection": "ecoc", 9 | "fields": [] 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/data/fle2-create/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle2-create/encrypted-field-config-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.coll": { 3 | "escCollection": "esc", 4 | "ecocCollection": "ecoc", 5 | "fields": [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/data/fle2-create/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll" 3 | } -------------------------------------------------------------------------------- /test/data/fle2-create/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "create": "coll" 7 | }, 8 | "hasEncryptedPlaceholders": false 9 | } -------------------------------------------------------------------------------- /test/data/fle2-decrypt-ieev/first-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "$or": [ 3 | { 4 | "_id": { 5 | "$in": [ 6 | { 7 | "$binary": { 8 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | } 12 | ] 13 | } 14 | }, 15 | { 16 | "keyAltNames": { 17 | "$in": [] 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /test/data/fle2-decrypt-ieev/second-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "$or": [ 3 | { 4 | "_id": { 5 | "$in": [ 6 | { 7 | "$binary": { 8 | "base64": "q83vqxI0mHYSNBI0VniQEg==", 9 | "subType": "04" 10 | } 11 | } 12 | ] 13 | } 14 | }, 15 | { 16 | "keyAltNames": { 17 | "$in": [] 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /test/data/fle2-delete/empty/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete": "test", 3 | "deletes": [ 4 | { "q": { }, "limit": 1} 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/data/fle2-delete/success/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete": "test", 3 | "deletes": [ 4 | { "q": { "value": 123456 }, "limit": 1} 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /test/data/fle2-explain/with-csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle2-explain/with-mongocryptd/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "explain": { 3 | "find": "test", 4 | "filter": { 5 | "value": 123456 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /test/data/fle2-explicit/find-indexed-contentionFactor1-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "DIkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVsACAAAAAAlO36MaVLVRDFW6xrI+0UTkyQdFfSCEBPkZg8sFzuTJYSY20AAQAAAAAAAAAA", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-explicit/find-indexed-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "DIkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVsACAAAAAAlO36MaVLVRDFW6xrI+0UTkyQdFfSCEBPkZg8sFzuTJYSY20AAAAAAAAAAAAA", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-explicit/insert-indexed-contentionFactor1-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "C18BAAAFZAAgAAAAAK8vKf5uqsCsWXfVhVEn9Jg0vWDIh4wtGqtUkG5wKE/CBXMAIAAAAACckqDJyQ9Po3BPcRqUNT2F2wlvLVpSmQrIeIF/PhJC5QVwADAAAAAAx0PWdXaep4jV5cRA2yQN+ct+wWQob1cxkm5UHJpuEoqEzTTETyU88bAxgupUdmQJBXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSHYikH9u4e644rfZY9N9UQR4h76qKAmcbo43utRcXMQy+FXXIxSuNntFHZHTcNJhJoFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAABpn2zcb7jOd/FK3F45nBxnLU6HOMwZzmGOZ0w35v/DqRJrAAEAAAAAAAAAAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-explicit/insert-indexed-same-user-and-index-key-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "C18BAAAFZAAgAAAAAPgBTEb6RugdmNK6uwbgw/F3XW/QIeohkfnfSNx9sxt2BXMAIAAAAABaOvNbHZrQIOc3iClKudHruW80XUvQNJL/wmI0My6S1gVwADAAAAAAx0PWdXaep4jV5cRA2yQN+cXcTw/4UdiqCRfvw4gIGS29ZXCDmYfJX4aT3XrZ8bq0BXUAEAAAAASrze+rEjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSHYikH9u4e644rfZY9N9UQR4h76qKAmcbo43utRcXMQy+FXXIxSuNntFHZHTcNJhJoFZQAgAAAAAL7iv5ju6p02+CadotQZUkgqtSIYD2HaywGsizUpIBYMBWwAIAAAAACfXTZ61xxjHKYYkkdPgPUKv/oyVTfiLGwIOHysMDZPjBJrAAAAAAAAAAAAAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-explicit/insert-indexed-v2.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": { 4 | "base64": "C18BAAAFZAAgAAAAAHb62aV7+mqmaGcotPLdG3KP7S8diFwWMLM/5rYtqLrEBXMAIAAAAAAVJ6OWHRv3OtCozHpt3ZzfBhaxZirLv3B+G8PuaaO4EgVwADAAAAAAx0PWdXaep4jV5cRA2yQN+ULLwjv8e++oMonpfGOGs9BZ0uqPP7waiwZSwHsDx57+BXUAEAAAAAQSNFZ4EjSYdhI0EjRWeJASEHQAAgAAAAV2AFAAAAAAq83vqxI0mHYSNBI0VniQEkzZZBBDgeZh+h+gXEmOrSHYikH9u4e644rfZY9N9UQR4h76qKAmcbo43utRcXMQy+FXXIxSuNntFHZHTcNJhJoFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsBWwAIAAAAABpn2zcb7jOd/FK3F45nBxnLU6HOMwZzmGOZ0w35v/DqRJrAAAAAAAAAAAAAA==", 5 | "subType": "06" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-find-equality-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "value": 123456 5 | } 6 | } -------------------------------------------------------------------------------- /test/data/fle2-find-equality-v2/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "fle2.test.esc", 4 | "ecocCollection": "fle2.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "value", 14 | "bsonType": "int32", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": 0 18 | } 19 | } 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/data/fle2-find-equality-v2/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "result": { 6 | "documents": [{ 7 | "_id": 1, 8 | "value": { 9 | "$binary": { 10 | "base64": "A1gAAAAQdAACAAAAEGEAAgAAAAVraQAQAAAABBI0VngSNJh2EjQSNFZ4kBIFa3UAEAAAAASrze+rEjSYdhI0EjRWeJASEHYAQOIBABJjbQAAAAAAAAAAAAA=", 11 | "subType": "06" 12 | } 13 | } 14 | }], 15 | "find": "test", 16 | "$db": "test" 17 | }, 18 | "hasEncryptedPlaceholders": true 19 | } -------------------------------------------------------------------------------- /test/data/fle2-find-explicit/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "coll", 3 | "filter": { 4 | "encryptedIndexed": { 5 | "$binary": { 6 | "base64": "BYkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefISY20AAAAAAAAAAAAA", 7 | "subType": "06" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/double-precision/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberDouble": "0.0" 4 | }, 5 | "max": { 6 | "$numberDouble": "200.0" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | }, 11 | "precision": { 12 | "$numberInt": "2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/double-precision/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberDouble": "123.456" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberDouble": "130.0" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/double/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "sparsity": { 3 | "$numberLong": "1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/double/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberDouble": "123.456" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberDouble": "130.0" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/int32-openinterval/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "200" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/int32-openinterval/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/int32/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "200" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-find-range-explicit/int32/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberInt": "35" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/README.md: -------------------------------------------------------------------------------- 1 | The expected payloads in fle2-insert-range were obtained by printing data from the Range_Allowed_Types test: 2 | https://github.com/mongodb/mongo/blob/ad4a7ae485fd0189542e59b3350e798b42b42d1b/src/mongo/crypto/fle_crypto_test.cpp#L1003-L1021 3 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/date-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$date": { 6 | "$numberLong": "12345" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/decimal128-precision-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": {"$numberDecimal":"4.56000000000000"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/decimal128-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": {"$numberDecimal":"1.23000000000000"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/double-precision-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$numberDouble": "123.456" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/double-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$numberDouble": "123.456" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/int32-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$numberInt": "123456" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-find-range/int64-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$numberLong": "12345678901234567" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/double-precision/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberDouble": "0.0" 4 | }, 5 | "max": { 6 | "$numberDouble": "200.0" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | }, 11 | "precision": { 12 | "$numberInt": "2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/double-precision/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$numberDouble": "123.456" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/double/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "sparsity": { 3 | "$numberLong": "1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/double/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$numberDouble": "123.456" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/int32/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "1234567" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "1" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/int32/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$numberInt": "123456" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/sparsity-2/rangeopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "min": { 3 | "$numberInt": "0" 4 | }, 5 | "max": { 6 | "$numberInt": "1234567" 7 | }, 8 | "sparsity": { 9 | "$numberLong": "2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range-explicit/sparsity-2/value-to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$numberInt": "123456" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/README.md: -------------------------------------------------------------------------------- 1 | The expected payloads in fle2-insert-range were obtained by printing data from the Range_Allowed_Types test: 2 | https://github.com/mongodb/mongo/blob/ad4a7ae485fd0189542e59b3350e798b42b42d1b/src/mongo/crypto/fle_crypto_test.cpp#L1003-L1021 -------------------------------------------------------------------------------- /test/data/fle2-insert-range/date-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$date": { 8 | "$numberLong": "12345" 9 | } 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/decimal128-precision-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": {"$numberDecimal":"4.56000000000000"} 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/decimal128-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": {"$numberDecimal":"1.23000000000000"} 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/double-precision-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberDouble": "123.456" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/double-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberDouble": "123.456" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/data/fle2-insert-range/int32-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberInt": "123456" 8 | } 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-range/int32/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberInt": "123456" 8 | } 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-range/int64-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberLong": "12345678901234567" 8 | } 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-text-search-with-str-encode-version/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "_id": 1, 6 | "ssn": "value123" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-text-search/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "_id": 1, 6 | "ssn": "value123" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-unindexed-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText":"sample", 6 | "encrypted":"value123" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /test/data/fle2-insert-unindexed-v2/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "fle2.test.esc", 4 | "ecocCollection": "fle2.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "encrypted", 14 | "bsonType": "string" 15 | } 16 | ] 17 | } 18 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-unindexed-v2/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$binary": { 8 | "base64": "EKvN76sSNJh2EjQSNFZ4kBICTQaVZPWgXp41I7mPV1rLFVl3jjP90PgD4T+Mtubn/mm4CKsKGaV1yxlic9Dty1Adef4Y+bsLGKhBbCa5eojM/A==", 9 | "subType": "06" 10 | } 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-v2-with-str-encode-version/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "_id": 1, 6 | "ssn": "value123" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-v2-with-str-encode-version/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "fle2.test.esc", 4 | "ecocCollection": "fle2.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "ssn", 14 | "bsonType": "string", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": 0 18 | } 19 | } 20 | ], 21 | "strEncodeVersion": 1 22 | } 23 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-v2/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "_id": 1, 6 | "ssn": "value123" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /test/data/fle2-insert-v2/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "escCollection": "fle2.test.esc", 4 | "ecocCollection": "fle2.test.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "ssn", 14 | "bsonType": "string", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": 0 18 | } 19 | } 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "string", 8 | "queries": { 9 | "queryType": "substringPreview", 10 | "contention": { 11 | "$numberLong": "0" 12 | }, 13 | "strMaxLength": 100, 14 | "strMinQueryLength": 5, 15 | "strMaxQueryLength": 20, 16 | "caseSensitive": false, 17 | "diacriticSensitive": true 18 | } 19 | } 20 | ], 21 | "strEncodeVersion": 1 22 | } 23 | } -------------------------------------------------------------------------------- /test/data/fle2-text-search-create-encrypted-collection-with-str-encode-version/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "string", 8 | "queries": { 9 | "queryType": "substringPreview", 10 | "contention": { 11 | "$numberLong": "0" 12 | }, 13 | "strMaxLength": 100, 14 | "strMinQueryLength": 5, 15 | "strMaxQueryLength": 20, 16 | "caseSensitive": false, 17 | "diacriticSensitive": true 18 | } 19 | } 20 | ], 21 | "strEncodeVersion": 1 22 | } 23 | } -------------------------------------------------------------------------------- /test/data/fle2-text-search-create-encrypted-collection/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "string", 8 | "queries": { 9 | "queryType": "substringPreview", 10 | "contention": { 11 | "$numberLong": "0" 12 | }, 13 | "strMaxLength": 100, 14 | "strMinQueryLength": 5, 15 | "strMaxQueryLength": 20, 16 | "caseSensitive": false, 17 | "diacriticSensitive": true 18 | } 19 | } 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /test/data/fle2-text-search-create-encrypted-collection/encrypted-payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "coll", 3 | "encryptedFields": { 4 | "fields": [ 5 | { 6 | "path": "encrypted", 7 | "bsonType": "string", 8 | "queries": { 9 | "queryType": "substringPreview", 10 | "contention": { 11 | "$numberLong": "0" 12 | }, 13 | "strMaxLength": 100, 14 | "strMinQueryLength": 5, 15 | "strMaxQueryLength": 20, 16 | "caseSensitive": false, 17 | "diacriticSensitive": true 18 | } 19 | } 20 | ], 21 | "strEncodeVersion": 1 22 | } 23 | } -------------------------------------------------------------------------------- /test/data/key-document-local.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": { 3 | "$binary": { 4 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 5 | "subType": "04" 6 | } 7 | }, 8 | "keyMaterial": { 9 | "$binary": { 10 | "base64": "db27rshiqK4Jqhb2xnwK4RfdFb9JuKeUe6xt5aYQF4o62tS75b7B4wxVN499gND9UVLUbpVKoyUoaZAeA895OENP335b8n8OwchcTFqS44t+P3zmhteYUQLIWQXaIgon7gEgLeJbaDHmSXS6/7NbfDDFlB37N7BP/2hx1yCOTN6NG/8M1ppw3LYT3CfP6EfXVEttDYtPbJpbb7nBVlxD7w==", 11 | "subType": "00" 12 | } 13 | }, 14 | "creationDate": { "$date": { "$numberLong": "1232739599082000" } }, 15 | "updateDate": { "$date": { "$numberLong": "1232739599082000" } }, 16 | "status": { "$numberInt": "0" }, 17 | "masterKey": { "provider": "local" } 18 | } 19 | -------------------------------------------------------------------------------- /test/data/keys/12345678123498761234123456789012-aws-decrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: 4d58d836-9a21-4ce8-a222-d90f89bac7dd 3 | Cache-Control: no-cache, no-store, must-revalidate, private 4 | Expires: 0 5 | Pragma: no-cache 6 | Date: Sat, 02 Apr 2022 15:45:27 GMT 7 | Content-Type: application/x-amz-json-1.1 8 | Content-Length: 272 9 | Connection: close 10 | 11 | {"EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0","Plaintext":"fb/rxhmqaKZZ9kuOI8zSFkSsMmy3SiaEDD0kIBdsQK4IgpTQCtbK6WhCN7IbdUz1A/CFwlzTIL8DXDQXQW4eb+PZIZ95WGWCESdAsq3YjhAw2Rkmror8E+5XXPuLuWW3"} -------------------------------------------------------------------------------- /test/data/keys/12345678123498761234123456789012-key-material.txt: -------------------------------------------------------------------------------- 1 | 7dbfebc619aa68a659f64b8e23ccd21644ac326cb74a26840c3d2420176c40ae088294d00ad6cae9684237b21b754cf503f085c25cd320bf035c3417416e1e6fe3d9219f79586582112740b2add88e1030d91926ae8afc13ee575cfb8bb965b7 2 | -------------------------------------------------------------------------------- /test/data/keys/12345678123498761234123456789013-aws-decrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: 61524068-10fc-458d-8c85-aa23fd58ff56 3 | Cache-Control: no-cache, no-store, must-revalidate, private 4 | Expires: 0 5 | Pragma: no-cache 6 | Date: Fri, 29 Apr 2022 13:21:22 GMT 7 | Content-Type: application/x-amz-json-1.1 8 | Content-Length: 294 9 | Connection: close 10 | 11 | {"EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0","KeyOrigin":"AWS_KMS","Plaintext":"H2XDIj1WU829c8Eaj4VYeq/L1b5+TDCNNXsvAbvPdqmAKTDl8jOSO7w/Xr0L4duYB/BKqHDIlgkhgN2LBYFrj3Vo/3YqGk79NbvAKCY5TrMPNs2ODGRq4vQ99CDlChnr"} -------------------------------------------------------------------------------- /test/data/keys/12345678123498761234123456789013-key-material.txt: -------------------------------------------------------------------------------- 1 | 1f65c3223d5653cdbd73c11a8f85587aafcbd5be7e4c308d357b2f01bbcf76a9802930e5f233923bbc3f5ebd0be1db9807f04aa870c896092180dd8b05816b8f7568ff762a1a4efd35bbc02826394eb30f36cd8e0c646ae2f43df420e50a19eb 2 | -------------------------------------------------------------------------------- /test/data/keys/12345678123498761234123456789014-key-material.txt: -------------------------------------------------------------------------------- 1 | 1f65c3223d5653cdbd73c11a8f85587aafcbd5be7e4c308d357b2f01bbcf76a9802930e5f233923bbc3f5ebd0be1db9807f04aa870c896092180dd8b05816b8f7568ff762a1a4efd35bbc02826394eb30f36cd8e0c646ae2f43df420e50a19eb 2 | -------------------------------------------------------------------------------- /test/data/keys/ABCDEFAB123498761234123456789012-aws-decrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: adcfdbde-7213-4fcf-a312-370e1d0ccaf0 3 | Cache-Control: no-cache, no-store, must-revalidate, private 4 | Expires: 0 5 | Pragma: no-cache 6 | Date: Sat, 02 Apr 2022 16:00:00 GMT 7 | Content-Type: application/x-amz-json-1.1 8 | Content-Length: 272 9 | Connection: close 10 | 11 | {"EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0","Plaintext":"p928TIvgDVH2jZ2OSF81HI7cjSIGsk2ODhgW0AX75SDkiRJQR9ZHsNhoS/vb8JwwQIXtCGq6bCsrFnfMyRztiEenM79eVoLISz7nlp5KX+Dgwh5ePuGQWVpV+DFH2N4q"} -------------------------------------------------------------------------------- /test/data/keys/ABCDEFAB123498761234123456789012-key-material.txt: -------------------------------------------------------------------------------- 1 | a7ddbc4c8be00d51f68d9d8e485f351c8edc8d2206b24d8e0e1816d005fbe520e489125047d647b0d8684bfbdbf09c304085ed086aba6c2b2b1677ccc91ced8847a733bf5e5682c84b3ee7969e4a5fe0e0c21e5e3ee190595a55f83147d8de2a 2 | -------------------------------------------------------------------------------- /test/data/kms-aws/decrypt-response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "Plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /test/data/kms-aws/encrypt-response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 446 5 | Connection: close 6 | 7 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "CiphertextBlob": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gHCPOT4UQIpMTvAVABLqnXlAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLxAm0nO3rccdoWA6AIBEIB7HUe6+aPvgNu/4sLEXBQVDIJVBueI3q7zdOMBSkRKkgZWqEuQgA6iDuEZbhHhOVCUXPBaLX6QWRwyMmjvIy/2Bg5q+TmwnfRo6QKdw2vee1W32/FdPWIoQy1yKOoIhNy6XMWldS3JuWK8ffQOYkssEqx0V4LW6PKuFv7D"} -------------------------------------------------------------------------------- /test/data/kms-encrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 446 5 | Connection: close 6 | 7 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "CiphertextBlob": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gHCPOT4UQIpMTvAVABLqnXlAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLxAm0nO3rccdoWA6AIBEIB7HUe6+aPvgNu/4sLEXBQVDIJVBueI3q7zdOMBSkRKkgZWqEuQgA6iDuEZbhHhOVCUXPBaLX6QWRwyMmjvIy/2Bg5q+TmwnfRo6QKdw2vee1W32/FdPWIoQy1yKOoIhNy6XMWldS3JuWK8ffQOYkssEqx0V4LW6PKuFv7D"} -------------------------------------------------------------------------------- /test/data/kms-gcp/decrypt-response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json; charset=UTF-8 3 | Content-Length: 145 4 | 5 | {"plaintext": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5f"} -------------------------------------------------------------------------------- /test/data/kms-gcp/encrypt-response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json; charset=UTF-8 3 | Content-Length: 258 4 | 5 | {"ciphertext": "CiQAg4LDqo6XZ3CbRYdQkQhuUyeJIah2hBIBc90q1ViWx1G+HMkSiQEAkWNo/U0dCh7GuWaRAK8NK00/VUDpHJDEJ6VxS07AiVUkYRsvLqYNSw8rLZ9hb646nCB8spXd5GQIIQyaTbcGWytZOQT2v9aVXl8UmSK5jTXwhFGwH/kZFjM6cJBfpwnK5C8q3GLBJ4xqJVk42WKKsA25gdZTFQXrYQBNLVEmhw6q30X6bCy0VQ=="} -------------------------------------------------------------------------------- /test/data/kms-gcp/oauth-response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json; charset=UTF-8 3 | Content-Length: 76 4 | 5 | {"access_token":"test-access-token","expires_in":3599,"token_type":"Bearer"} -------------------------------------------------------------------------------- /test/data/lookup/csfle-facet/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$facet": { 6 | "output": [ 7 | { 8 | "$lookup": { 9 | "from": "c2", 10 | "localField": "joinme", 11 | "foreignField": "joinme", 12 | "as": "matched" 13 | } 14 | } 15 | ] 16 | } 17 | } 18 | ], 19 | "cursor": {} 20 | } 21 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-mismatch/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-nested/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched", 10 | "pipeline": [ 11 | { 12 | "$lookup": { 13 | "from": "c3", 14 | "localField": "joinme", 15 | "foreignField": "joinme", 16 | "as": "matched" 17 | } 18 | } 19 | ] 20 | } 21 | } 22 | ], 23 | "cursor": {} 24 | } 25 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-only-schemaMap/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-schemaMap/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-schemaMap/schemaMap.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.c2": { 3 | "properties": { 4 | "e2": { 5 | "encrypt": { 6 | "keyId": [ 7 | { 8 | "$binary": { 9 | "base64": "uJ2Njy8YQDuYKbzu2vEKQg==", 10 | "subType": "04" 11 | } 12 | } 13 | ], 14 | "bsonType": "string", 15 | "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" 16 | } 17 | } 18 | }, 19 | "bsonType": "object" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-self/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c1", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-sibling/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-sibling/collInfo-c2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c2", 4 | "idIndex": { 5 | "ns": "db.c2", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": { 17 | "validator": { 18 | "$jsonSchema": { 19 | "properties": { 20 | "unencrypted": { 21 | "bsonType": "string" 22 | } 23 | }, 24 | "bsonType": "object" 25 | }, 26 | "foo": "bar" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-sibling/reply-from-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": { 3 | "aggregate": "c1", 4 | "pipeline": [ 5 | { 6 | "$lookup": { 7 | "from": "c2", 8 | "localField": "joinme", 9 | "foreignField": "joinme", 10 | "as": "matched" 11 | } 12 | } 13 | ], 14 | "cursor": {} 15 | }, 16 | "hasEncryptionPlaceholders": false, 17 | "schemaRequiresEncryption": true 18 | } 19 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-unionWith/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$unionWith": { 6 | "coll": "c2", 7 | "pipeline": [ 8 | { 9 | "$lookup": { 10 | "from": "c3", 11 | "localField": "joinme", 12 | "foreignField": "joinme", 13 | "as": "matched" 14 | } 15 | } 16 | ] 17 | } 18 | } 19 | ], 20 | "cursor": {} 21 | } 22 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-view/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "v1", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/csfle-view/collInfo-v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "v1", 3 | "type": "view", 4 | "options": { 5 | "viewOn": "c1", 6 | "pipeline": [] 7 | }, 8 | "info": { 9 | "readOnly": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/data/lookup/csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/csfle/csfle/cmd-to-mongod.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": { 15 | "$eq": { 16 | "$binary": { 17 | "base64": "AbidjY8vGEA7mCm87trxCkIC8kZKVHsnE5QVf4xhKcl5AesA5UowxrXhd2IOU6/bQ5EjCTRjLABgU4qpPkwCtbkZX4COgHCmiyzOenkRVBV7NQ==", 18 | "subType": "06" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | ], 25 | "cursor": {} 26 | } 27 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/csfle/csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/csfle/no-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/csfle/no-schema/collInfo-c2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c2", 4 | "idIndex": { 5 | "ns": "db.c2", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/csfle/qe/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "matched.e2": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/csfle/collInfo-c1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c1", 4 | "idIndex": { 5 | "ns": "db.c1", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/cmd-to-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {}, 19 | "csfleEncryptionSchemas": { 20 | "db.c1": { 21 | "jsonSchema": {}, 22 | "isRemoteSchema": false 23 | }, 24 | "db.c2": { 25 | "jsonSchema": {}, 26 | "isRemoteSchema": false 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/cmd-to-mongod.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/collInfo-c1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c1", 4 | "idIndex": { 5 | "ns": "db.c1", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/collInfo-c2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c2", 4 | "idIndex": { 5 | "ns": "db.c2", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/no-schema/reply-from-mongocryptd.json: -------------------------------------------------------------------------------- 1 | { 2 | "hasEncryptionPlaceholders": false, 3 | "schemaRequiresEncryption": true, 4 | "result": { 5 | "aggregate": "c1", 6 | "pipeline": [ 7 | { 8 | "$lookup": { 9 | "from": "c2", 10 | "localField": "joinme", 11 | "foreignField": "joinme", 12 | "as": "matched" 13 | } 14 | }, 15 | { 16 | "$match": { 17 | "e1": "foo" 18 | } 19 | } 20 | ], 21 | "cursor": {} 22 | }, 23 | "ok": { 24 | "$numberDouble": "1.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/qe/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "matched.e2": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/no-schema/qe/collInfo-c1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c1", 4 | "idIndex": { 5 | "ns": "db.c1", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/qe/csfle/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/qe/no-schema/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/qe/no-schema/collInfo-c2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "collection", 3 | "name": "c2", 4 | "idIndex": { 5 | "ns": "db.c2", 6 | "name": "_id_", 7 | "key": { 8 | "_id": { 9 | "$numberInt": "1" 10 | } 11 | }, 12 | "v": { 13 | "$numberInt": "2" 14 | } 15 | }, 16 | "options": {} 17 | } 18 | -------------------------------------------------------------------------------- /test/data/lookup/mixed/qe/qe/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/qe-encryptedFieldsMap/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/qe-encryptedFieldsMap/encryptedFieldsMap.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.c2": { 3 | "escCollection": "enxcol_.c2.esc", 4 | "ecocCollection": "enxcol_.c2.ecoc", 5 | "fields": [ 6 | { 7 | "keyId": { 8 | "$binary": { 9 | "base64": "uJ2Njy8YQDuYKbzu2vEKQg==", 10 | "subType": "04" 11 | } 12 | }, 13 | "path": "e2", 14 | "bsonType": "string", 15 | "queries": { 16 | "queryType": "equality", 17 | "contention": 0 18 | } 19 | } 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/data/lookup/qe-self/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c1", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/qe-with-payload/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | }, 12 | { 13 | "$match": { 14 | "e1": "foo" 15 | } 16 | } 17 | ], 18 | "cursor": {} 19 | } 20 | -------------------------------------------------------------------------------- /test/data/lookup/qe/cmd-to-mongod.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "as": "matched", 8 | "localField": "joinme", 9 | "foreignField": "joinme" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/lookup/qe/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "aggregate": "c1", 3 | "pipeline": [ 4 | { 5 | "$lookup": { 6 | "from": "c2", 7 | "localField": "joinme", 8 | "foreignField": "joinme", 9 | "as": "matched" 10 | } 11 | } 12 | ], 13 | "cursor": {} 14 | } 15 | -------------------------------------------------------------------------------- /test/data/mongocryptd-ismaster-17.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1653058237588 8 | }, 9 | "maxWireVersion": 17, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } 13 | -------------------------------------------------------------------------------- /test/data/mongocryptd-ismaster-26.json: -------------------------------------------------------------------------------- 1 | { 2 | "ismaster": true, 3 | "iscryptd": true, 4 | "maxBsonObjectSize": 16777216, 5 | "maxMessageSizeBytes": 48000000, 6 | "localTime": { 7 | "$date": 1739534884679 8 | }, 9 | "maxWireVersion": 26, 10 | "minWireVersion": 0, 11 | "ok": 1.0 12 | } 13 | -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-invalid.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ACUAAAAQYQABAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQA=", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-key-alt-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ADAAAAAQYQABAAAAAmthAAkAAABTaGFybGVuZQACdgAMAAAANDU3LTU1LTU0NjIAAA==", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-key-alt-name2.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ADgAAAAQYQABAAAAAmthABEAAABBbm90aGVyIGFsdCBuYW1lAAJ2AAwAAAA0NTctNTUtNTQ2MgAA", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-no-encryption-needed.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "schemaRequiresEncryption": false, 6 | "hasEncryptedPlaceholders": false 7 | } -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-no-markings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": { 3 | "$numberInt": "1" 4 | }, 5 | "schemaRequiresEncryption": true, 6 | "hasEncryptedPlaceholders": false 7 | } -------------------------------------------------------------------------------- /test/data/mongocryptd-reply-random.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ADgAAAAQYQACAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQJ2AAwAAAA0NTctNTUtNTQ2MgAA", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /test/data/multikey/command.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "coll", 3 | "filter": { 4 | "uses_key_a": "foo", 5 | "uses_key_b": "bar" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/data/no-trimFactor/find/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "plainText": "sample", 5 | "encrypted": { 6 | "$numberInt": "123456" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/data/no-trimFactor/find/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "fields": [ 4 | { 5 | "keyId": { 6 | "$binary": { 7 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 8 | "subType": "04" 9 | } 10 | }, 11 | "path": "encrypted", 12 | "bsonType": "int", 13 | "queries": { 14 | "queryType": "range" 15 | } 16 | } 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/data/no-trimFactor/insert/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberInt": "123456" 8 | } 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /test/data/no-trimFactor/insert/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "fields": [ 4 | { 5 | "keyId": { 6 | "$binary": { 7 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 8 | "subType": "04" 9 | } 10 | }, 11 | "path": "encrypted", 12 | "bsonType": "int", 13 | "queries": { 14 | "queryType": "range" 15 | } 16 | } 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/auto-find-int32/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "encrypted": { 5 | "$numberInt": "123456" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/auto-find-int32/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "fields": [ 4 | { 5 | "keyId": { 6 | "$binary": { 7 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 8 | "subType": "04" 9 | } 10 | }, 11 | "path": "encrypted", 12 | "bsonType": "int", 13 | "queries": { 14 | "queryType": "range" 15 | } 16 | } 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/auto-insert-int32/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "insert": "test", 3 | "documents": [ 4 | { 5 | "plainText": "sample", 6 | "encrypted": { 7 | "$numberInt": "123456" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/auto-insert-int32/encrypted-field-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "db.test": { 3 | "fields": [ 4 | { 5 | "keyId": { 6 | "$binary": { 7 | "base64": "EjRWeBI0mHYSNBI0VniQEg==", 8 | "subType": "04" 9 | } 10 | }, 11 | "path": "encrypted", 12 | "bsonType": "int", 13 | "queries": { 14 | "queryType": "range" 15 | } 16 | } 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/explicit-find-int32-defaults/to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberInt": "35" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/data/range-sends-cryptoParams/explicit-find-int32/to-encrypt.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$and": [ 4 | { 5 | "age": { 6 | "$gte": { 7 | "$numberInt": "23" 8 | } 9 | } 10 | }, 11 | { 12 | "age": { 13 | "$lte": { 14 | "$numberInt": "35" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/data/rmd/kms-decrypt-reply-429.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 429 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "Plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /test/data/rmd/kms-decrypt-reply-a.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 274 5 | 6 | {"EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0","Plaintext":"YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh"} 7 | -------------------------------------------------------------------------------- /test/data/rmd/kms-decrypt-reply-b.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 274 5 | 6 | {"EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0","Plaintext":"YmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJi"} 7 | -------------------------------------------------------------------------------- /test/data/rmd/kms-encrypt-reply-a.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: 29f5ed0e-6362-408f-8b80-7400a6c6fdab 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 487 5 | Connection: close 6 | 7 | {"CiphertextBlob":"AQICAHjEc7oVE9nX494vQ37Y6VBvgh0L7Bjm5QzbH0Tf04D6bwEfH1MXhs2uh+eRM5zK/CA8AAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDEv7o1A3VumZBUj7VgIBEIB7TKZcxPSasdzzAVme1Rn7DYTee+cCmhiUVQCQS4/Ae9Z870S+MhyiX8Ud1v9TAUbIGkeKahZoqq7UXpXsL7pvIghQPRxppkSNfKmT9kJhDy+u4pOOVmmvkCKueTW4FlBu2jik8vTO8/wp7tlRSA5BUcaqdEv5KWXAjgdt","EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d"} 8 | -------------------------------------------------------------------------------- /test/data/rmd/kms-encrypt-reply-b.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: 9ff3f25e-5ae5-49c9-93eb-152ead31b5a7 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 487 5 | Connection: close 6 | 7 | {"CiphertextBlob":"AQICAHjEc7oVE9nX494vQ37Y6VBvgh0L7Bjm5QzbH0Tf04D6bwGbFDkmaxct2y/JL65t8FGKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDIhcdknWoFRHzSiAAwIBEIB7ubV6iGGWNjd/MeQT6QYTaJBZcmMUBLf/pvnjQFN/UzDZBFKNWpfSlHo4P5tGw/PoZPr4+wLMMoF2VvQCr6xWccngkd7mS7txQ4gbCx6rqI/UlRZ94IreLxJyb2kwrN62/jmlcnD1ERGItwmagzaVU42bzyocqlXt9c2r","EncryptionAlgorithm":"SYMMETRIC_DEFAULT","KeyId":"arn:aws:kms:us-east-1:579766882180:key/061334ae-07a8-4ceb-a813-8135540e837d"} 8 | -------------------------------------------------------------------------------- /test/data/roundtrip/fle2-fixed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Plaintext is 'test1'", 4 | "algo": "AES-256-CTR/NONE", 5 | "iv": "918ab83c8966995dfb528a0020d9bb10", 6 | "key": "c0b091fd93dfbb2422e53553f971d8127f3731058ba67f32b1549c53fce4120e", 7 | "plaintext": "7465737431", 8 | "ciphertext": "918ab83c8966995dfb528a0020d9bb1070cead40b0" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /test/data/schema-broker/collinfo-noSchema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "coll", 3 | "type": "collection", 4 | "options": {}, 5 | "info": { 6 | "readOnly": false, 7 | "uuid": { 8 | "$binary": { 9 | "base64": "e5Xykq4/RBatC025ofA2yQ==", 10 | "subType": "04" 11 | } 12 | } 13 | }, 14 | "idIndex": { 15 | "v": 2, 16 | "key": { 17 | "_id": 1 18 | }, 19 | "name": "_id_" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/data/schema-broker/encryptedFields.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "enxcol_.coll.esc", 3 | "ecocCollection": "enxcol_.coll.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "encryptedIndexed", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": 8 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /test/data/schema-broker/encryptedFields2.json: -------------------------------------------------------------------------------- 1 | { 2 | "escCollection": "enxcol_.coll2.esc", 3 | "ecocCollection": "enxcol_.coll2.ecoc", 4 | "fields": [ 5 | { 6 | "keyId": { 7 | "$binary": { 8 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 9 | "subType": "04" 10 | } 11 | }, 12 | "path": "encryptedIndexed2", 13 | "bsonType": "string", 14 | "queries": { 15 | "queryType": "equality", 16 | "contention": 8 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /test/data/schema-broker/jsonSchema.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "encrypted": { 4 | "encrypt": { 5 | "keyId": [ 6 | { 7 | "$binary": { 8 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 9 | "subType": "04" 10 | } 11 | } 12 | ], 13 | "bsonType": "string", 14 | "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" 15 | } 16 | } 17 | }, 18 | "bsonType": "object" 19 | } 20 | -------------------------------------------------------------------------------- /test/data/schema-broker/jsonSchema2.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "encrypted2": { 4 | "encrypt": { 5 | "keyId": [ 6 | { 7 | "$binary": { 8 | "base64": "YWFhYWFhYWFhYWFhYWFhYQ==", 9 | "subType": "04" 10 | } 11 | } 12 | ], 13 | "bsonType": "string", 14 | "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" 15 | } 16 | } 17 | }, 18 | "bsonType": "object" 19 | } 20 | -------------------------------------------------------------------------------- /test/example/README.md: -------------------------------------------------------------------------------- 1 | # libmongocrypt example data # 2 | 3 | This directory contains a simple example of mocked responses to test libmongocrypt and driver wrappers. Data for other scenarios and edge cases is in the `data` directory. 4 | 5 | The HTTP reply file, kms-decrypt-reply.txt, has regular newline endings \n that MUST be replaced by \r\n endings when reading the file for testing. -------------------------------------------------------------------------------- /test/example/cmd.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": "457-55-5462" 5 | } 6 | } -------------------------------------------------------------------------------- /test/example/encrypted-command.json: -------------------------------------------------------------------------------- 1 | { 2 | "filter": { 3 | "ssn": { 4 | "$binary": "AQAAAAAAAAAAAAAAAAAAAAACaWlpaWlpaWlpaWlpaWlpaSZ395PIDuuYBFAnTRUHO7xoDP9En3VnnXEo5HXgKNlAKsp9WCMnoR6Zn0y0HoR+q4T8XzjyuzN7t77qxYHM1zY=", 5 | "$type": "06" 6 | } 7 | }, 8 | "find": "test" 9 | } 10 | -------------------------------------------------------------------------------- /test/example/kms-decrypt-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "Plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /test/example/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ADgAAAAQYQABAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQJ2AAwAAAA0NTctNTUtNTQ2MgAA", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /test/test-dll.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is not a test case. This file is to generate a dynamic library for 3 | * testing the dll loading code. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | static std::string global_str; 10 | 11 | #if defined(_MSC_VER) 12 | #define SAY_HELLO_EXPORT __declspec(dllexport) 13 | #else 14 | #define SAY_HELLO_EXPORT __attribute__((visibility("default"))) 15 | #endif 16 | 17 | extern "C" { 18 | 19 | SAY_HELLO_EXPORT int say_hello(); // -Wmissing-prototypes: for testing only. 20 | 21 | int say_hello() { 22 | global_str = "Hello, DLL!"; 23 | std::cout << global_str << "\n"; 24 | return 42; 25 | } 26 | 27 | } // extern "C" 28 | -------------------------------------------------------------------------------- /test/util/helpgen.py: -------------------------------------------------------------------------------- 1 | lines = [] 2 | for line in open ("README.md", "r"): 3 | line = line.replace("\"", "'") 4 | lines.append("\"" + line[:-1] + "\\n\"") 5 | 6 | with open ("HELP.autogen", "w") as out: 7 | out.write ("\n".join(lines)) 8 | -------------------------------------------------------------------------------- /third-party/IntelRDFPMathLib20U2.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mongodb/libmongocrypt/3d8e3be669b013b9d159d3de753f0c0de66d5602/third-party/IntelRDFPMathLib20U2.tar.xz --------------------------------------------------------------------------------