libmongocrypt-helper 1.13.2.0.1001 → 1.14.0.0.1001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. checksums.yaml +4 -4
  2. data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +8 -0
  3. data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +5 -1
  4. data/ext/libmongocrypt/libmongocrypt/CODEOWNERS +4 -1
  5. data/ext/libmongocrypt/libmongocrypt/Earthfile +18 -17
  6. data/ext/libmongocrypt/libmongocrypt/README.md +8 -8
  7. data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +7 -0
  8. data/ext/libmongocrypt/libmongocrypt/bindings/python/CONTRIBUTING.md +34 -0
  9. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/asynchronous/state_machine.py +6 -2
  10. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +18 -2
  11. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +9 -1
  12. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/options.py +14 -0
  13. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/synchronous/state_machine.py +6 -2
  14. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +1 -1
  15. data/ext/libmongocrypt/libmongocrypt/bindings/python/sbom.json +8 -8
  16. data/ext/libmongocrypt/libmongocrypt/bindings/python/scripts/libmongocrypt-version.txt +1 -0
  17. data/ext/libmongocrypt/libmongocrypt/bindings/python/{release.sh → scripts/release.sh} +9 -3
  18. data/ext/libmongocrypt/libmongocrypt/bindings/python/{synchro.py → scripts/synchro.py} +16 -9
  19. data/ext/libmongocrypt/libmongocrypt/bindings/python/scripts/synchro.sh +8 -0
  20. data/ext/libmongocrypt/libmongocrypt/bindings/python/scripts/update-version.sh +27 -0
  21. data/ext/libmongocrypt/libmongocrypt/bindings/python/scripts/update_binding.py +78 -0
  22. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +15 -0
  23. data/ext/libmongocrypt/libmongocrypt/doc/releasing.md +25 -18
  24. data/ext/libmongocrypt/libmongocrypt/etc/calc_release_version.py +39 -13
  25. data/ext/libmongocrypt/libmongocrypt/etc/calc_release_version_selftest.sh +1 -1
  26. data/ext/libmongocrypt/libmongocrypt/etc/cyclonedx.sbom.json +2 -2
  27. data/ext/libmongocrypt/libmongocrypt/kms-message/CMakeLists.txt +1 -1
  28. data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.c +5 -0
  29. data/ext/libmongocrypt/libmongocrypt/kms-message/src/hexlify.h +1 -1
  30. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_azure_request.c +1 -1
  31. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_gcp_request.c +1 -1
  32. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_reader_writer.c +4 -2
  33. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_kmip_request.c +1 -2
  34. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_message_private.h +5 -1
  35. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request.c +1 -1
  36. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_opt.c +1 -1
  37. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.c +2 -8
  38. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_request_str.h +9 -0
  39. data/ext/libmongocrypt/libmongocrypt/kms-message/src/kms_response_parser.c +0 -1
  40. data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.c +7 -3
  41. data/ext/libmongocrypt/libmongocrypt/kms-message/src/sort.h +2 -0
  42. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kmip_reader_writer.c +8 -1
  43. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_assert.h +5 -4
  44. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_azure_online.c +1 -1
  45. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_gcp_online.c +1 -1
  46. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_request.c +4 -0
  47. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response.c +3 -0
  48. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_kmip_response_parser.c +4 -0
  49. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.c +1 -1
  50. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_online_util.h +1 -1
  51. data/ext/libmongocrypt/libmongocrypt/kms-message/test/test_kms_request.c +39 -39
  52. data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +235 -65
  53. data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +1 -1
  54. data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +4 -2
  55. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +2 -2
  56. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +2 -2
  57. data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +1 -4
  58. data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +9 -11
  59. data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +1 -0
  60. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +10 -8
  61. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +167 -176
  62. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-v2.c +6 -17
  63. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +6 -17
  64. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private-v2.h +1 -1
  65. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-v2.c +25 -26
  66. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +2 -1
  67. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-text-payload-private.h +122 -0
  68. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-text-payload.c +477 -0
  69. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private-v2.h +1 -3
  70. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-v2.c +28 -43
  71. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +6 -17
  72. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-v2.c +6 -5
  73. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +13 -10
  74. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common.c +3 -2
  75. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +7 -6
  76. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-tag-and-encrypted-metadata-block.c +4 -3
  77. data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +1 -1
  78. data/ext/libmongocrypt/libmongocrypt/src/mc-parse-utils-private.h +27 -0
  79. data/ext/libmongocrypt/libmongocrypt/src/mc-parse-utils.c +48 -0
  80. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +5 -5
  81. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +15 -20
  82. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +4 -6
  83. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +9 -18
  84. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +4 -5
  85. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +5 -9
  86. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +14 -19
  87. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +2 -4
  88. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +109 -119
  89. data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +2 -2
  90. data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +4 -2
  91. data/ext/libmongocrypt/libmongocrypt/src/mc-schema-broker-private.h +0 -3
  92. data/ext/libmongocrypt/libmongocrypt/src/mc-schema-broker.c +4 -14
  93. data/ext/libmongocrypt/libmongocrypt/src/mc-str-encode-string-sets-private.h +1 -1
  94. data/ext/libmongocrypt/libmongocrypt/src/mc-str-encode-string-sets.c +3 -3
  95. data/ext/libmongocrypt/libmongocrypt/src/mc-text-search-str-encode-private.h +8 -1
  96. data/ext/libmongocrypt/libmongocrypt/src/mc-text-search-str-encode.c +78 -2
  97. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +34 -16
  98. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +66 -74
  99. data/ext/libmongocrypt/libmongocrypt/src/mc-writer-private.h +1 -1
  100. data/ext/libmongocrypt/libmongocrypt/src/mc-writer.c +4 -2
  101. data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +1 -1
  102. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +12 -1
  103. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +5 -0
  104. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +5 -5
  105. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +2 -5
  106. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +65 -58
  107. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +3 -3
  108. data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +1 -1
  109. data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +1 -1
  110. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +1 -1
  111. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +4 -0
  112. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +1 -1
  113. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +4 -4
  114. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +29 -25
  115. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +3 -2
  116. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +6 -3
  117. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +48 -58
  118. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +12 -0
  119. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +5 -13
  120. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +19 -2
  121. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +9 -9
  122. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +3 -4
  123. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +285 -89
  124. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +0 -2
  125. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +0 -1
  126. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +1 -1
  127. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +4 -1
  128. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +47 -31
  129. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +2 -0
  130. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +1 -1
  131. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +3 -1
  132. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +1 -1
  133. data/ext/libmongocrypt/libmongocrypt/src/unicode/case-fold-map.c +1 -1
  134. data/ext/libmongocrypt/libmongocrypt/src/unicode/diacritic-fold-map.c +1 -1
  135. data/ext/libmongocrypt/libmongocrypt/src/unicode/fold.c +1 -1
  136. data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +0 -14
  137. data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-field-config-map.json +6 -1
  138. data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2InsertUpdatePayloadV2-RangeV2.json +8 -0
  139. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-field-map.json +1 -1
  140. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-payload.json +6 -4
  141. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/mongocryptd-reply.json +1 -1
  142. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-field-map.json +1 -1
  143. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-payload.json +6 -4
  144. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/mongocryptd-reply.json +2 -2
  145. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-field-map.json +1 -1
  146. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-payload.json +6 -4
  147. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/mongocryptd-reply.json +1 -1
  148. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-payload.json +14 -6
  149. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-field-map.json +1 -1
  150. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-payload.json +6 -4
  151. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/mongocryptd-reply.json +1 -1
  152. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-field-map.json +1 -1
  153. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-payload.json +6 -4
  154. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/mongocryptd-reply.json +1 -1
  155. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-field-map.json +1 -1
  156. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-payload.json +6 -4
  157. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/mongocryptd-reply.json +1 -1
  158. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload-v2.json +1 -1
  159. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload-v2.json +1 -1
  160. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload-v2.json +1 -1
  161. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload-v2.json +1 -1
  162. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-field-map.json +1 -1
  163. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-payload.json +6 -4
  164. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/mongocryptd-reply.json +1 -1
  165. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-field-map.json +1 -1
  166. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-payload.json +6 -4
  167. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/mongocryptd-reply.json +1 -1
  168. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-field-map.json +1 -1
  169. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-payload.json +6 -4
  170. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/mongocryptd-reply.json +1 -1
  171. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-payload.json +14 -6
  172. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-field-map.json +1 -1
  173. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-payload.json +6 -4
  174. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/mongocryptd-reply.json +1 -1
  175. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-field-map.json +1 -1
  176. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-payload.json +3 -3
  177. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/mongocryptd-reply.json +1 -1
  178. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-field-map.json +1 -1
  179. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-payload.json +6 -4
  180. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/mongocryptd-reply.json +1 -1
  181. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload-v2.json +1 -1
  182. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload-v2.json +1 -1
  183. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload-v2.json +1 -1
  184. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload-v2.json +1 -1
  185. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/mc.json +8 -0
  186. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/server.json +8 -0
  187. data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +5 -5
  188. data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +11 -5
  189. data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +2 -2
  190. data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +9 -11
  191. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-encryption-placeholder.c +18 -29
  192. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-equality-payload-v2.c +1 -1
  193. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-range-payload-v2.c +2 -18
  194. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-text-payload.c +320 -0
  195. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup-v2.c +2 -17
  196. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +1 -1
  197. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +8 -5
  198. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +6 -10
  199. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +29 -33
  200. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +12 -20
  201. data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +5 -20
  202. data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +5 -5
  203. data/ext/libmongocrypt/libmongocrypt/test/test-mc-text-search-str-encode.c +147 -18
  204. data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +35 -14
  205. data/ext/libmongocrypt/libmongocrypt/test/test-mc-writer.c +10 -10
  206. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +3 -7
  207. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +36 -24
  208. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +4 -4
  209. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +2 -2
  210. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +13 -13
  211. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cleanup.c +49 -55
  212. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +64 -67
  213. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +18 -18
  214. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +4 -0
  215. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +4 -3
  216. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +13 -3
  217. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +31 -13
  218. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +35 -52
  219. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +28 -1
  220. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +50 -91
  221. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +1 -1
  222. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +7 -4
  223. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +1 -1
  224. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +1 -1
  225. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +3 -5
  226. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +2 -2
  227. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +1 -1
  228. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +2 -2
  229. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +527 -225
  230. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +1 -1
  231. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +45 -56
  232. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +12 -3
  233. data/ext/libmongocrypt/libmongocrypt/test/test-named-kms-providers.c +11 -11
  234. data/ext/libmongocrypt/libmongocrypt/test/test-unicode-fold.c +6 -2
  235. data/ext/libmongocrypt/libmongocrypt/test/util/HELP.autogen +1 -1
  236. data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +1 -1
  237. data/ext/libmongocrypt/libmongocrypt/test/util/util.c +5 -5
  238. data/ext/libmongocrypt/libmongocrypt/test/util/util.h +7 -6
  239. data/lib/libmongocrypt_helper/version.rb +2 -2
  240. metadata +17 -13
  241. data/ext/libmongocrypt/libmongocrypt/bindings/python/libmongocrypt-version.txt +0 -1
  242. data/ext/libmongocrypt/libmongocrypt/bindings/python/strip_header.py +0 -50
  243. data/ext/libmongocrypt/libmongocrypt/bindings/python/update-sbom.sh +0 -14
  244. data/ext/libmongocrypt/libmongocrypt/test/data/cleanup/success/encrypted-payload.json +0 -29
  245. data/ext/libmongocrypt/libmongocrypt/test/data/compact/success/encrypted-payload.json +0 -29
  246. data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2EqualityIndexedValueV2.json +0 -8
  247. data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/FLE2RangeIndexedValueV2.json +0 -8
  248. /data/ext/libmongocrypt/libmongocrypt/bindings/python/{build-manylinux-wheel.sh → scripts/build-manylinux-wheel.sh} +0 -0
  249. /data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/{FLE2InsertUpdatePayload-with-edges.json → FLE2InsertUpdatePayload-RangeV1.json} +0 -0
  250. /data/ext/libmongocrypt/libmongocrypt/test/data/explicit-decrypt/{FLE2InsertUpdatePayload-with-edges-V2.json → FLE2InsertUpdatePayloadV2-RangeV1.json} +0 -0
@@ -247,4 +247,4 @@ main (int argc, char **argv)
247
247
  kms_message_init ();
248
248
  test_gcp ();
249
249
  return 0;
250
- }
250
+ }
@@ -76,6 +76,7 @@ value="ffa8cc79e8c3763b0121fcd06bb3488c8bf42c0774604640279b16b264194030eeb083962
76
76
  0x36, 0xa9, 0x06, 0x6b, 0x4e, 0x10, 0xae, 0xb5, 0x6a, 0x5c, 0xcf, 0x6a, \
77
77
  0xa4, 0x69, 0x01, 0xe6, 0x25, 0xe3, 0x40, 0x0c, 0x78, 0x11, 0xd2, 0xec
78
78
 
79
+ void kms_kmip_request_register_secretdata_test (void); // -Wmissing-prototypes: for testing only.
79
80
  void
80
81
  kms_kmip_request_register_secretdata_test (void)
81
82
  {
@@ -98,6 +99,7 @@ kms_kmip_request_register_secretdata_test (void)
98
99
  kms_request_destroy (req);
99
100
  }
100
101
 
102
+ void kms_kmip_request_register_secretdata_invalid_test (void); // -Wmissing-prototypes: for testing only.
101
103
  void
102
104
  kms_kmip_request_register_secretdata_invalid_test (void)
103
105
  {
@@ -144,6 +146,7 @@ value="7FJYvnV6XkaUCWuY96bCSc6AuhvkPpqI"/>
144
146
  0x58, 0x6b, 0x61, 0x55, 0x43, 0x57, 0x75, 0x59, 0x39, 0x36, 0x62, 0x43, \
145
147
  0x53, 0x63, 0x36, 0x41, 0x75, 0x68, 0x76, 0x6b, 0x50, 0x70, 0x71, 0x49
146
148
 
149
+ void kms_kmip_request_get_test (void); // -Wmissing-prototypes: for testing only.
147
150
  void
148
151
  kms_kmip_request_get_test (void)
149
152
  {
@@ -200,6 +203,7 @@ value="7FJYvnV6XkaUCWuY96bCSc6AuhvkPpqI"/>
200
203
  0x58, 0x6b, 0x61, 0x55, 0x43, 0x57, 0x75, 0x59, 0x39, 0x36, 0x62, 0x43, \
201
204
  0x53, 0x63, 0x36, 0x41, 0x75, 0x68, 0x76, 0x6b, 0x50, 0x70, 0x71, 0x49
202
205
 
206
+ void kms_kmip_request_activate_test (void); // -Wmissing-prototypes: for testing only.
203
207
  void
204
208
  kms_kmip_request_activate_test (void)
205
209
  {
@@ -56,6 +56,7 @@ static const uint8_t SUCCESS_REGISTER_RESPONSE[] = {
56
56
 
57
57
  static const char *const SUCCESS_REGISTER_RESPONSE_UNIQUE_IDENTIFIER = "39";
58
58
 
59
+ void kms_kmip_response_get_unique_identifier_test (void); // -Wmissing-prototypes: for testing only.
59
60
  void
60
61
  kms_kmip_response_get_unique_identifier_test (void)
61
62
  {
@@ -141,6 +142,7 @@ static const uint8_t SUCCESS_GET_RESPONSE_SECRETDATA[] = {
141
142
  0x36, 0xa9, 0x06, 0x6b, 0x4e, 0x10, 0xae, 0xb5, 0x6a, 0x5c, 0xcf, 0x6a,
142
143
  0xa4, 0x69, 0x01, 0xe6, 0x25, 0xe3, 0x40, 0x0c, 0x78, 0x11, 0xd2, 0xec};
143
144
 
145
+ void kms_kmip_response_get_secretdata_test (void); // -Wmissing-prototypes: for testing only.
144
146
  void
145
147
  kms_kmip_response_get_secretdata_test (void)
146
148
  {
@@ -197,6 +199,7 @@ static const uint8_t ERROR_GET_RESPOSE_NOTFOUND[] = {
197
199
  0x6c, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x4e,
198
200
  0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64};
199
201
 
202
+ void kms_kmip_response_get_secretdata_notfound_test (void); // -Wmissing-prototypes: for testing only.
200
203
  void
201
204
  kms_kmip_response_get_secretdata_notfound_test (void)
202
205
  {
@@ -36,6 +36,7 @@ static const int SAMPLE_KMIP_FIRST_LENGTH = 32;
36
36
  /* SAMPLE_KMIP_LARGE_LENGTH is a byte size larger than the message. */
37
37
  static const int SAMPLE_KMIP_LARGE_LENGTH = 1024;
38
38
 
39
+ void kms_kmip_response_parser_test (void); // -Wmissing-prototypes: for testing only.
39
40
  void
40
41
  kms_kmip_response_parser_test (void)
41
42
  {
@@ -118,6 +119,7 @@ feed_full_response (kms_response_parser_t *parser, uint8_t *data)
118
119
  }
119
120
  }
120
121
 
122
+ void kms_kmip_response_parser_reuse_test (void); // -Wmissing-prototypes: for testing only.
121
123
  void
122
124
  kms_kmip_response_parser_reuse_test (void)
123
125
  {
@@ -150,6 +152,7 @@ kms_kmip_response_parser_reuse_test (void)
150
152
  free (data);
151
153
  }
152
154
 
155
+ void kms_kmip_response_parser_excess_test (void); // -Wmissing-prototypes: for testing only.
153
156
  void
154
157
  kms_kmip_response_parser_excess_test (void)
155
158
  {
@@ -171,6 +174,7 @@ kms_kmip_response_parser_excess_test (void)
171
174
  free (data);
172
175
  }
173
176
 
177
+ void kms_kmip_response_parser_notenough_test (void); // -Wmissing-prototypes: for testing only.
174
178
  void
175
179
  kms_kmip_response_parser_notenough_test (void)
176
180
  {
@@ -117,4 +117,4 @@ send_kms_request (kms_request_t *req, const char *host)
117
117
  kms_response_parser_destroy (response_parser);
118
118
  mongoc_stream_destroy (tls_stream);
119
119
  return response;
120
- }
120
+ }
@@ -32,4 +32,4 @@ connect_with_tls (const char *host,
32
32
  kms_response_t *
33
33
  send_kms_request (kms_request_t *req, const char *host);
34
34
 
35
- #endif /* TEST_KMS_ONLINE_UTIL_H */
35
+ #endif /* TEST_KMS_ONLINE_UTIL_H */
@@ -43,15 +43,15 @@
43
43
 
44
44
  #include "test_kms_assert.h"
45
45
 
46
- const char *aws_test_suite_dir = "aws-sig-v4-test-suite";
46
+ static const char *aws_test_suite_dir = "aws-sig-v4-test-suite";
47
47
 
48
- const char *skipped_aws_tests[] = {
48
+ static const char *skipped_aws_tests[] = {
49
49
  /* we don't yet support temporary security credentials provided by the AWS
50
50
  * Security Token Service (AWS STS). see post-sts-token/readme.txt */
51
51
  "post-sts-token",
52
52
  };
53
53
 
54
- bool
54
+ static bool
55
55
  skip_aws_test (const char *test_name)
56
56
  {
57
57
  size_t i;
@@ -65,7 +65,7 @@ skip_aws_test (const char *test_name)
65
65
  return false;
66
66
  }
67
67
 
68
- bool
68
+ static bool
69
69
  ends_with (const char *str, const char *suffix)
70
70
  {
71
71
  size_t str_len = strlen (str);
@@ -79,7 +79,7 @@ ends_with (const char *str, const char *suffix)
79
79
  }
80
80
 
81
81
 
82
- char *
82
+ static char *
83
83
  last_segment (const char *str)
84
84
  {
85
85
  const char *p = str + strlen (str);
@@ -93,7 +93,7 @@ last_segment (const char *str)
93
93
  return strdup (str);
94
94
  }
95
95
 
96
- char *
96
+ static char *
97
97
  test_file_path (const char *path, const char *suffix)
98
98
  {
99
99
  char *r;
@@ -105,7 +105,7 @@ test_file_path (const char *path, const char *suffix)
105
105
  return r;
106
106
  }
107
107
 
108
- void
108
+ static void
109
109
  realloc_buffer (char **buffer, size_t *n, size_t len)
110
110
  {
111
111
  if (*buffer == NULL) {
@@ -119,12 +119,12 @@ realloc_buffer (char **buffer, size_t *n, size_t len)
119
119
  *n = len;
120
120
  }
121
121
 
122
- ssize_t
122
+ static ssize_t
123
123
  test_getline (char **lineptr, size_t *n, FILE *stream)
124
124
  {
125
125
  if (*lineptr == NULL && *n == 0) {
126
126
  realloc_buffer (lineptr, n, 128);
127
- };
127
+ }
128
128
 
129
129
  // Sanity check
130
130
  if ((*lineptr == NULL && *n != 0) || (*lineptr != NULL && *n == 0)) {
@@ -164,7 +164,7 @@ test_getline (char **lineptr, size_t *n, FILE *stream)
164
164
  }
165
165
  }
166
166
 
167
- char *
167
+ static char *
168
168
  read_test (const char *path, const char *suffix)
169
169
  {
170
170
  char *file_path = test_file_path (path, suffix);
@@ -210,7 +210,7 @@ read_test (const char *path, const char *suffix)
210
210
  return str;
211
211
  }
212
212
 
213
- void
213
+ static void
214
214
  set_test_date (kms_request_t *request)
215
215
  {
216
216
  struct tm tm;
@@ -230,7 +230,7 @@ set_test_date (kms_request_t *request)
230
230
  KMS_ASSERT (kms_request_set_date (request, &tm));
231
231
  }
232
232
 
233
- kms_request_t *
233
+ static kms_request_t *
234
234
  read_req (const char *path)
235
235
  {
236
236
  kms_request_t *request;
@@ -305,7 +305,7 @@ read_req (const char *path)
305
305
  return request;
306
306
  }
307
307
 
308
- void
308
+ static void
309
309
  test_compare (kms_request_t *request,
310
310
  char *(*func) (kms_request_t *),
311
311
  const char *dir_path,
@@ -330,31 +330,31 @@ test_compare (kms_request_t *request,
330
330
  free (test_name);
331
331
  }
332
332
 
333
- void
333
+ static void
334
334
  test_compare_creq (kms_request_t *request, const char *dir_path)
335
335
  {
336
336
  test_compare (request, kms_request_get_canonical, dir_path, "creq");
337
337
  }
338
338
 
339
- void
339
+ static void
340
340
  test_compare_sts (kms_request_t *request, const char *dir_path)
341
341
  {
342
342
  test_compare (request, kms_request_get_string_to_sign, dir_path, "sts");
343
343
  }
344
344
 
345
- void
345
+ static void
346
346
  test_compare_authz (kms_request_t *request, const char *dir_path)
347
347
  {
348
348
  test_compare (request, kms_request_get_signature, dir_path, "authz");
349
349
  }
350
350
 
351
- void
351
+ static void
352
352
  test_compare_sreq (kms_request_t *request, const char *dir_path)
353
353
  {
354
354
  test_compare (request, kms_request_get_signed, dir_path, "sreq");
355
355
  }
356
356
 
357
- void
357
+ static void
358
358
  aws_sig_v4_test (const char *dir_path)
359
359
  {
360
360
  kms_request_t *request;
@@ -367,7 +367,7 @@ aws_sig_v4_test (const char *dir_path)
367
367
  kms_request_destroy (request);
368
368
  }
369
369
 
370
- bool
370
+ static bool
371
371
  all_aws_sig_v4_tests (const char *path, const char *selected)
372
372
  {
373
373
  /* Amazon supplies tests, one per directory, 5 files per test, see
@@ -422,7 +422,7 @@ done:
422
422
  }
423
423
 
424
424
  /* docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html */
425
- void
425
+ static void
426
426
  example_signature_test (void)
427
427
  {
428
428
  const char *expect =
@@ -446,7 +446,7 @@ example_signature_test (void)
446
446
  kms_request_destroy (request);
447
447
  }
448
448
 
449
- void
449
+ static void
450
450
  path_normalization_test (void)
451
451
  {
452
452
  const char *tests[][2] = {
@@ -501,7 +501,7 @@ path_normalization_test (void)
501
501
  }
502
502
  }
503
503
 
504
- kms_request_t *
504
+ static kms_request_t *
505
505
  make_test_request (void)
506
506
  {
507
507
  kms_request_t *request = kms_request_new ("POST", "/", NULL);
@@ -515,7 +515,7 @@ make_test_request (void)
515
515
  return request;
516
516
  }
517
517
 
518
- void
518
+ static void
519
519
  host_test (void)
520
520
  {
521
521
  kms_request_t *request = make_test_request ();
@@ -523,7 +523,7 @@ host_test (void)
523
523
  kms_request_destroy (request);
524
524
  }
525
525
 
526
- void
526
+ static void
527
527
  content_length_test (void)
528
528
  {
529
529
  const char *payload = "foo-payload";
@@ -533,7 +533,7 @@ content_length_test (void)
533
533
  kms_request_destroy (request);
534
534
  }
535
535
 
536
- void
536
+ static void
537
537
  bad_query_test (void)
538
538
  {
539
539
  kms_request_t *request = kms_request_new ("GET", "/?asdf", NULL);
@@ -541,7 +541,7 @@ bad_query_test (void)
541
541
  kms_request_destroy (request);
542
542
  }
543
543
 
544
- void
544
+ static void
545
545
  append_header_field_value_test (void)
546
546
  {
547
547
  kms_request_t *request = kms_request_new ("GET", "/", NULL);
@@ -552,7 +552,7 @@ append_header_field_value_test (void)
552
552
  kms_request_destroy (request);
553
553
  }
554
554
 
555
- void
555
+ static void
556
556
  set_date_test (void)
557
557
  {
558
558
  // Windows CRT asserts on this negative test because it is a negative test
@@ -568,7 +568,7 @@ set_date_test (void)
568
568
  #endif
569
569
  }
570
570
 
571
- void
571
+ static void
572
572
  multibyte_test (void)
573
573
  {
574
574
  /* euro currency symbol */
@@ -597,7 +597,7 @@ multibyte_test (void)
597
597
  #undef EU
598
598
  }
599
599
 
600
- void
600
+ static void
601
601
  connection_close_test (void)
602
602
  {
603
603
  kms_request_opt_t *opt;
@@ -619,7 +619,7 @@ connection_close_test (void)
619
619
  }
620
620
 
621
621
  /* the ciphertext blob from a response to an "Encrypt" API call */
622
- const char ciphertext_blob[] =
622
+ static const char ciphertext_blob[] =
623
623
  "\x01\x02\x02\x00\x78\xf3\x8e\xd8\xd4\xc6\xba\xfb\xa1\xcf\xc1\x1e\x68\xf2"
624
624
  "\xa1\x91\x9e\x36\x4d\x74\xa2\xc4\x9e\x30\x67\x08\x53\x33\x0d\xcd\xe0\xc9"
625
625
  "\x1b\x01\x60\x30\xd4\x73\x9e\x90\x1f\xa7\x43\x55\x84\x26\xf9\xd5\xf0\xb1"
@@ -630,7 +630,7 @@ const char ciphertext_blob[] =
630
630
  "\x03\xcd\xcb\xe2\xac\x36\x4f\x73\xdb\x1b\x73\x2e\x33\xda\x45\x51\xf4\xcd"
631
631
  "\xc0\xff\xd2\xe1\xb9\xc4\xc2\x0e\xbf\x53\x90\x46\x18\x42";
632
632
 
633
- void
633
+ static void
634
634
  decrypt_request_test (void)
635
635
  {
636
636
  kms_request_t *request = kms_decrypt_request_new (
@@ -649,7 +649,7 @@ decrypt_request_test (void)
649
649
  kms_request_destroy (request);
650
650
  }
651
651
 
652
- void
652
+ static void
653
653
  encrypt_request_test (void)
654
654
  {
655
655
  char *plaintext = "foobar";
@@ -669,7 +669,7 @@ encrypt_request_test (void)
669
669
  kms_request_destroy (request);
670
670
  }
671
671
 
672
- void
672
+ static void
673
673
  kv_list_del_test (void)
674
674
  {
675
675
  kms_kv_list_t *lst = kms_kv_list_new ();
@@ -696,7 +696,7 @@ kv_list_del_test (void)
696
696
  kms_kv_list_destroy (lst);
697
697
  }
698
698
 
699
- void
699
+ static void
700
700
  b64_test (void)
701
701
  {
702
702
  uint8_t *expected = (uint8_t *) "\x01\x02\x03\x04";
@@ -712,7 +712,7 @@ b64_test (void)
712
712
  KMS_ASSERT (0 == memcmp (expected, data, 4));
713
713
  }
714
714
 
715
- void
715
+ static void
716
716
  b64_b64url_test (void)
717
717
  {
718
718
  char base64_data[64];
@@ -744,7 +744,7 @@ b64_b64url_test (void)
744
744
  ASSERT_CMPSTR (base64_data, "PDw_Pz8-Pg==");
745
745
  }
746
746
 
747
- void
747
+ static void
748
748
  kms_response_parser_test (void)
749
749
  {
750
750
  kms_response_parser_t *parser = kms_response_parser_new ();
@@ -760,7 +760,7 @@ kms_response_parser_test (void)
760
760
  kms_response_parser_feed (parser, (uint8_t *) "This is a test.", 15));
761
761
  ASSERT (0 == kms_response_parser_wants_bytes (parser, 123));
762
762
  response = kms_response_parser_get_response (parser);
763
- ASSERT (response->status == 200)
763
+ ASSERT (response->status == 200);
764
764
  ASSERT_CMPSTR (response->body->str, "This is a test.");
765
765
 
766
766
  kms_response_destroy (response);
@@ -958,7 +958,7 @@ kms_response_parser_files (void)
958
958
  _field = kms_request_str_new (); \
959
959
  } while (0)
960
960
 
961
- void
961
+ static void
962
962
  kms_request_validate_test (void)
963
963
  {
964
964
  kms_request_t *request = NULL;
@@ -1242,7 +1242,7 @@ main (int argc, char *argv[])
1242
1242
 
1243
1243
  int ret = kms_message_init ();
1244
1244
  if (ret != 0) {
1245
- TEST_PRINTF ("kms_message_init failed: 0x%x\n", ret);
1245
+ TEST_PRINTF ("kms_message_init failed: 0x%d\n", ret);
1246
1246
  abort ();
1247
1247
  }
1248
1248