libmongocrypt-helper 1.7.4.0.1002 → 1.8.0.0.1001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (396) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +9 -7
  4. data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +17 -23
  5. data/ext/libmongocrypt/libmongocrypt/Earthfile +374 -0
  6. data/ext/libmongocrypt/libmongocrypt/README.md +7 -7
  7. data/ext/libmongocrypt/libmongocrypt/VERSION_CURRENT +1 -1
  8. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +25 -6
  9. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +25 -3
  10. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +1 -1
  11. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +1 -1
  12. data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +3 -2
  13. data/ext/libmongocrypt/libmongocrypt/bindings/cs/cs.sln +79 -0
  14. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +2 -2
  15. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +6 -4
  16. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
  17. data/ext/libmongocrypt/libmongocrypt/bindings/node/CHANGELOG.md +24 -0
  18. data/ext/libmongocrypt/libmongocrypt/bindings/node/README.md +134 -5
  19. data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/build-static.sh +3 -6
  20. data/ext/libmongocrypt/libmongocrypt/bindings/node/index.d.ts +203 -77
  21. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/autoEncrypter.js +1 -1
  22. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/clientEncryption.js +165 -43
  23. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/common.js +12 -14
  24. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/errors.js +75 -0
  25. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/index.js +34 -3
  26. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/aws.js +26 -0
  27. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/azure.js +178 -0
  28. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/gcp.js +24 -0
  29. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/index.js +54 -0
  30. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/utils.js +39 -0
  31. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/stateMachine.js +9 -4
  32. data/ext/libmongocrypt/libmongocrypt/bindings/node/package-lock.json +4440 -5189
  33. data/ext/libmongocrypt/libmongocrypt/bindings/node/package.json +27 -8
  34. data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.cc +65 -38
  35. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/autoEncrypter.test.js +4 -7
  36. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/clientEncryption.test.js +434 -42
  37. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/common.test.js +94 -0
  38. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/cryptoCallbacks.test.js +1 -45
  39. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/index.test.js +45 -0
  40. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/mongocryptdManager.test.js +1 -1
  41. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/providers/credentialsProvider.test.js +551 -0
  42. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/release.test.js +10 -3
  43. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/requirements.helper.js +23 -1
  44. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/stateMachine.test.js +1 -1
  45. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/tools/chai-addons.js +8 -0
  46. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/types/index.test-d.ts +63 -0
  47. data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +26 -0
  48. data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +2 -2
  49. data/ext/libmongocrypt/libmongocrypt/bindings/python/build-manylinux-wheel.sh +1 -1
  50. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +128 -238
  51. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/compat.py +0 -27
  52. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/explicit_encrypter.py +1 -1
  53. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +5 -21
  54. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +2 -2
  55. data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +5 -5
  56. data/ext/libmongocrypt/libmongocrypt/bindings/python/setup.py +14 -9
  57. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/__init__.py +1 -10
  58. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
  59. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +5 -5
  60. data/ext/libmongocrypt/libmongocrypt/bindings/python/test-requirements.txt +4 -12
  61. data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +8 -6
  62. data/ext/libmongocrypt/libmongocrypt/cmake/IntelDFP.cmake +2 -1
  63. data/ext/libmongocrypt/libmongocrypt/cmake/Platform.cmake +50 -0
  64. data/ext/libmongocrypt/libmongocrypt/cmake/mongocrypt-config.cmake +21 -0
  65. data/ext/libmongocrypt/libmongocrypt/debian/gbp.conf +2 -2
  66. data/ext/libmongocrypt/libmongocrypt/etc/c6-vault.repo +39 -0
  67. data/ext/libmongocrypt/libmongocrypt/etc/fle2_aead_generate_tests.py +15 -24
  68. data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto.py +66 -54
  69. data/ext/libmongocrypt/libmongocrypt/etc/fle2_generate_tests.py +14 -23
  70. data/ext/libmongocrypt/libmongocrypt/etc/fle2v2_aead_generate_tests.py +32 -0
  71. data/ext/libmongocrypt/libmongocrypt/etc/format-all.sh +12 -0
  72. data/ext/libmongocrypt/libmongocrypt/etc/format.sh +16 -0
  73. data/ext/libmongocrypt/libmongocrypt/etc/install-package.sh +48 -0
  74. data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-libmongocrypt-pr-625.patch +13 -0
  75. data/ext/libmongocrypt/libmongocrypt/src/crypto/cng.c +381 -436
  76. data/ext/libmongocrypt/libmongocrypt/src/crypto/commoncrypto.c +162 -227
  77. data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +180 -248
  78. data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +33 -55
  79. data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +175 -205
  80. data/ext/libmongocrypt/libmongocrypt/src/mc-array-private.h +10 -21
  81. data/ext/libmongocrypt/libmongocrypt/src/mc-array.c +44 -56
  82. data/ext/libmongocrypt/libmongocrypt/src/mc-check-conversions-private.h +4 -8
  83. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +351 -463
  84. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +59 -66
  85. data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +7 -11
  86. data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +80 -92
  87. data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +18 -10
  88. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +59 -70
  89. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +384 -439
  90. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private-v2.h +41 -0
  91. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private.h +11 -18
  92. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-v2.c +135 -0
  93. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +109 -126
  94. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private-v2.h +88 -0
  95. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private.h +24 -27
  96. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-v2.c +137 -0
  97. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +106 -125
  98. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private-v2.h +117 -0
  99. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private.h +28 -36
  100. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-v2.c +294 -0
  101. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +237 -278
  102. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private-v2.h +133 -0
  103. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private.h +67 -56
  104. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-v2.c +437 -0
  105. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +476 -325
  106. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common-private.h +69 -0
  107. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common.c +182 -0
  108. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-private.h +23 -31
  109. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2-private.h +85 -0
  110. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2.c +142 -0
  111. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev.c +104 -231
  112. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-range-operator-private.h +8 -7
  113. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +55 -56
  114. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +517 -580
  115. data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +36 -66
  116. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +57 -76
  117. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +158 -189
  118. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +36 -42
  119. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +515 -558
  120. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +155 -191
  121. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +43 -53
  122. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +170 -240
  123. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +29 -34
  124. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +289 -338
  125. data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +36 -71
  126. data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +111 -164
  127. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +55 -49
  128. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +109 -125
  129. data/ext/libmongocrypt/libmongocrypt/src/mc-writer-private.h +66 -0
  130. data/ext/libmongocrypt/libmongocrypt/src/mc-writer.c +141 -0
  131. data/ext/libmongocrypt/libmongocrypt/src/mlib/check.hpp +37 -55
  132. data/ext/libmongocrypt/libmongocrypt/src/mlib/endian.h +11 -11
  133. data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +27 -32
  134. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +444 -499
  135. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +251 -334
  136. data/ext/libmongocrypt/libmongocrypt/src/mlib/macros.h +4 -5
  137. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +196 -231
  138. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +56 -79
  139. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +411 -530
  140. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +116 -131
  141. data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +17 -26
  142. data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +2 -2
  143. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary-private.h +3 -6
  144. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary.c +31 -48
  145. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +55 -131
  146. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +444 -565
  147. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +1 -2
  148. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +28 -45
  149. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key-private.h +11 -17
  150. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +103 -132
  151. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth-private.h +8 -14
  152. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth.c +78 -90
  153. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +26 -45
  154. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +220 -273
  155. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +13 -25
  156. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +147 -166
  157. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-compat.h +2 -2
  158. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +110 -204
  159. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +1137 -1565
  160. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +425 -472
  161. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +817 -694
  162. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +2394 -2697
  163. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +166 -186
  164. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +308 -351
  165. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +921 -1138
  166. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +16 -24
  167. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endian-private.h +44 -58
  168. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint-private.h +21 -25
  169. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint.c +167 -181
  170. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek-private.h +37 -43
  171. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek.c +215 -253
  172. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker-private.h +73 -108
  173. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +889 -1034
  174. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +27 -44
  175. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +349 -402
  176. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +92 -120
  177. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +1397 -1612
  178. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log-private.h +35 -67
  179. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +49 -83
  180. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +30 -36
  181. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +1821 -1470
  182. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-mutex-private.h +7 -12
  183. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +80 -108
  184. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +354 -424
  185. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +101 -117
  186. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status-private.h +3 -8
  187. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status.c +92 -119
  188. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util-private.h +19 -29
  189. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +136 -176
  190. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util-private.h +11 -21
  191. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +96 -135
  192. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +1092 -1320
  193. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +130 -295
  194. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +66 -78
  195. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +20 -28
  196. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +60 -73
  197. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +8 -16
  198. data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +57 -87
  199. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload-v2.json +60 -0
  200. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload-v2.json +67 -0
  201. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +2 -2
  202. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1-v2.json +8 -0
  203. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-v2.json +8 -0
  204. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1-v2.json +8 -0
  205. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key-v2.json +8 -0
  206. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-v2.json +8 -0
  207. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/cmd.json +6 -0
  208. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-field-map.json +22 -0
  209. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-payload.json +40 -0
  210. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/mongocryptd-reply.json +19 -0
  211. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/cmd.json +10 -0
  212. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-field-map.json +27 -0
  213. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-payload.json +41 -0
  214. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/mongocryptd-reply.json +49 -0
  215. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/cmd.json +6 -0
  216. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
  217. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-payload.json +50 -0
  218. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/mongocryptd-reply.json +58 -0
  219. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/cmd.json +6 -0
  220. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-field-map.json +27 -0
  221. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-payload.json +41 -0
  222. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/mongocryptd-reply.json +49 -0
  223. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/cmd.json +8 -0
  224. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-field-map.json +30 -0
  225. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-payload.json +44 -0
  226. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/mongocryptd-reply.json +52 -0
  227. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/cmd.json +8 -0
  228. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-field-map.json +27 -0
  229. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-payload.json +41 -0
  230. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/mongocryptd-reply.json +49 -0
  231. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/cmd.json +8 -0
  232. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-field-map.json +27 -0
  233. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-payload.json +41 -0
  234. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/mongocryptd-reply.json +49 -0
  235. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/cmd.json +8 -0
  236. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-field-map.json +27 -0
  237. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-payload.json +41 -0
  238. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/mongocryptd-reply.json +49 -0
  239. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload-v2.json +26 -0
  240. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload-v2.json +26 -0
  241. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload-v2.json +26 -0
  242. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload-v2.json +26 -0
  243. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload-v2.json +16 -0
  244. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/cmd.json +1 -1
  245. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/RNG_DATA.h +65 -65
  246. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/cmd.json +13 -0
  247. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-field-map.json +27 -0
  248. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-payload.json +44 -0
  249. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/mongocryptd-reply.json +52 -0
  250. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/RNG_DATA.h +132 -132
  251. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/RNG_DATA.h +71 -71
  252. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/cmd.json +9 -0
  253. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
  254. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-payload.json +53 -0
  255. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/mongocryptd-reply.json +61 -0
  256. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/cmd.json +9 -0
  257. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-field-map.json +27 -0
  258. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-payload.json +44 -0
  259. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/mongocryptd-reply.json +52 -0
  260. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/RNG_DATA.h +68 -68
  261. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/RNG_DATA.h +19 -19
  262. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/cmd.json +11 -0
  263. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-field-map.json +30 -0
  264. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-payload.json +47 -0
  265. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/mongocryptd-reply.json +55 -0
  266. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/cmd.json +11 -0
  267. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-field-map.json +27 -0
  268. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-payload.json +44 -0
  269. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/mongocryptd-reply.json +52 -0
  270. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/RNG_DATA.h +25 -25
  271. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/cmd.json +11 -0
  272. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-field-map.json +27 -0
  273. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-payload.json +44 -0
  274. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/mongocryptd-reply.json +52 -0
  275. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/RNG_DATA.h +65 -65
  276. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/cmd.json +11 -0
  277. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-field-map.json +27 -0
  278. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-payload.json +44 -0
  279. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/mongocryptd-reply.json +52 -0
  280. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/RNG_DATA.h +68 -68
  281. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload-v2.json +8 -0
  282. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/RNG_DATA.h +19 -19
  283. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload-v2.json +8 -0
  284. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/RNG_DATA.h +25 -25
  285. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload-v2.json +8 -0
  286. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload-v2.json +8 -0
  287. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/RNG_DATA.h +15 -15
  288. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload-v2.json +8 -0
  289. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/cmd.json +9 -0
  290. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-field-map.json +18 -0
  291. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-payload.json +14 -0
  292. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/mongocryptd-reply.json +41 -0
  293. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/cmd.json +9 -0
  294. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-field-map.json +22 -0
  295. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-payload.json +39 -0
  296. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/mongocryptd-reply.json +49 -0
  297. data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneRangeV2.json +10 -0
  298. data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneV2.json +10 -0
  299. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/README.md +17 -0
  300. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/aes-ctr.json +29 -0
  301. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-fixed.json +10 -0
  302. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-generated.json +38 -0
  303. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-decrypt.json +35 -0
  304. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-fixed.json +29 -0
  305. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-generated.json +122 -0
  306. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-fixed.json +29 -0
  307. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-generated.json +122 -0
  308. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/mcgrew.json +12 -0
  309. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/nist.json +20 -0
  310. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/README.md +27 -0
  311. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/mc.json +21 -0
  312. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/server.json +21 -0
  313. data/ext/libmongocrypt/libmongocrypt/test/example-no-bson.c +4 -4
  314. data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +278 -323
  315. data/ext/libmongocrypt/libmongocrypt/test/fuzz_kms.c +8 -7
  316. data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +6 -7
  317. data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +221 -283
  318. data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +58 -73
  319. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-equality-payload-v2.c +78 -0
  320. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-range-payload-v2.c +89 -0
  321. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev-v2.c +248 -0
  322. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +467 -414
  323. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup-v2.c +172 -0
  324. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +141 -159
  325. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev-v2.c +338 -0
  326. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +238 -176
  327. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +373 -474
  328. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +346 -388
  329. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +708 -825
  330. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +417 -481
  331. data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +110 -144
  332. data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +124 -207
  333. data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +223 -213
  334. data/ext/libmongocrypt/libmongocrypt/test/test-mc-writer.c +176 -0
  335. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +634 -807
  336. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +1 -2
  337. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +168 -189
  338. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +187 -211
  339. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache-oauth.c +34 -36
  340. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +210 -233
  341. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +185 -220
  342. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +331 -445
  343. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +670 -814
  344. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +102 -135
  345. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.h +54 -71
  346. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +394 -846
  347. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +159 -183
  348. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +867 -1045
  349. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +4349 -4713
  350. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +750 -964
  351. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +991 -1178
  352. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +342 -419
  353. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +23 -30
  354. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +98 -111
  355. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +49 -52
  356. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-broker.c +770 -920
  357. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +354 -407
  358. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key.c +197 -245
  359. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +286 -370
  360. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +147 -166
  361. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +50 -61
  362. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +85 -100
  363. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +656 -692
  364. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +46 -58
  365. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-traverse-util.c +377 -451
  366. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.c +48 -67
  367. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.h +4 -10
  368. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +827 -918
  369. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +111 -172
  370. data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +508 -559
  371. data/ext/libmongocrypt/libmongocrypt/test/util/util.c +735 -881
  372. data/ext/libmongocrypt/libmongocrypt/test/util/util.h +33 -55
  373. data/lib/libmongocrypt_helper/version.rb +2 -2
  374. data.tar.gz.sig +0 -0
  375. metadata +154 -26
  376. metadata.gz.sig +0 -0
  377. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
  378. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-document.json +0 -0
  379. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/credentialsProvider.js +0 -33
  380. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/credentialsProvider.test.js +0 -163
  381. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
  382. data/ext/libmongocrypt/libmongocrypt/test/data/aes-ctr.cstructs +0 -359
  383. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-aead.cstructs +0 -109
  384. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload.json +0 -26
  385. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/rangeopts.json +0 -5
  386. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/value-to-encrypt.json +0 -20
  387. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/RNG_DATA.h +0 -70
  388. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload.json +0 -8
  389. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/rangeopts.json +0 -5
  390. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/value-to-encrypt.json +0 -5
  391. data/ext/libmongocrypt/libmongocrypt/test/data/fle2.cstructs +0 -33
  392. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/key-filter.json +0 -0
  393. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
  394. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
  395. /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
  396. /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
@@ -17,8 +17,8 @@
17
17
  #include <mongocrypt.h>
18
18
 
19
19
  #include "mongocrypt-private.h"
20
- #include "test-mongocrypt.h"
21
20
  #include "test-mongocrypt-assert-match-bson.h"
21
+ #include "test-mongocrypt.h"
22
22
 
23
23
  /* Tests have the form
24
24
  {
@@ -31,176 +31,157 @@
31
31
  }
32
32
  */
33
33
 
34
- static void
35
- _satisfy_oauth_request (mongocrypt_kms_ctx_t *kms_ctx)
36
- {
37
- const char *valid_reply =
38
- "HTTP/1.1 200 OK\r\n"
39
- "Content-Length: 85\r\n"
40
- "\r\n"
41
- "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_"
42
- "in\":3599,\"access_token\":\"AAAA\"}";
43
-
44
- mongocrypt_binary_t *bin = mongocrypt_binary_new_from_data (
45
- (uint8_t *) valid_reply, (uint32_t) strlen (valid_reply));
46
- ASSERT_OK (mongocrypt_kms_ctx_feed (kms_ctx, bin), kms_ctx);
47
- mongocrypt_binary_destroy (bin);
34
+ static void _satisfy_oauth_request(mongocrypt_kms_ctx_t *kms_ctx) {
35
+ const char *valid_reply = "HTTP/1.1 200 OK\r\n"
36
+ "Content-Length: 85\r\n"
37
+ "\r\n"
38
+ "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_"
39
+ "in\":3599,\"access_token\":\"AAAA\"}";
40
+
41
+ mongocrypt_binary_t *bin = mongocrypt_binary_new_from_data((uint8_t *)valid_reply, (uint32_t)strlen(valid_reply));
42
+ ASSERT_OK(mongocrypt_kms_ctx_feed(kms_ctx, bin), kms_ctx);
43
+ mongocrypt_binary_destroy(bin);
48
44
  }
49
45
 
50
- static void
51
- _test_one_kms_response (_mongocrypt_tester_t *tester, bson_t *test)
52
- {
53
- mongocrypt_t *crypt;
54
- mongocrypt_kms_ctx_t *kms_ctx;
55
- mongocrypt_ctx_t *ctx;
56
- bson_iter_t iter;
57
- bson_iter_t ctx_iter;
58
-
59
- BSON_ASSERT (bson_iter_init_find (&iter, test, "description"));
60
- printf ("- %s\n", bson_iter_utf8 (&iter, NULL));
61
- BSON_ASSERT (bson_iter_init_find (&ctx_iter, test, "ctx"));
62
- BSON_ASSERT (bson_iter_recurse (&ctx_iter, &ctx_iter));
63
- while (bson_iter_next (&ctx_iter)) {
64
- const char *ctx_type = bson_iter_utf8 (&ctx_iter, NULL);
65
- bool ok = false;
66
- mongocrypt_status_t *status;
67
- mongocrypt_binary_t *bin = NULL;
68
- char *expect;
69
-
70
- status = mongocrypt_status_new ();
71
- crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
72
- ctx = mongocrypt_ctx_new (crypt);
73
-
74
- /* Test both contexts for creating a data key and automatic decryption
75
- * since they go through different code paths related to KMS. */
76
- if (0 == strcmp ("datakey", ctx_type)) {
77
- mongocrypt_ctx_setopt_masterkey_aws (
78
- ctx, "example", -1, "example", -1);
79
- ASSERT_OK (mongocrypt_ctx_datakey_init (ctx), ctx);
80
- } else if (0 == strcmp ("decrypt", ctx_type)) {
81
- mongocrypt_binary_destroy (bin);
82
- bin = _mongocrypt_tester_encrypted_doc (tester);
83
- tester->paths.key_file = "./test/example/key-document.json";
84
- ASSERT_OK (mongocrypt_ctx_decrypt_init (ctx, bin), ctx);
85
- } else if (0 == strcmp ("azure_oauth_datakey", ctx_type) ||
86
- 0 == strcmp ("azure_datakey", ctx_type)) {
87
- mongocrypt_ctx_setopt_key_encryption_key (
88
- ctx,
89
- TEST_BSON ("{'provider': 'azure', 'keyVaultEndpoint': "
90
- "'example.vault.azure.net', 'keyName': 'test'}"));
91
- ASSERT_OK (mongocrypt_ctx_datakey_init (ctx), ctx);
92
- } else if (0 == strcmp ("azure_oauth_decrypt", ctx_type)
93
- || 0 == strcmp ("azure_decrypt", ctx_type)) {
94
- bin = _mongocrypt_tester_encrypted_doc (tester);
95
- tester->paths.key_file = "./test/data/key-document-azure.json";
96
- ASSERT_OK (mongocrypt_ctx_decrypt_init (ctx, bin), ctx);
97
- } else if (0 == strcmp ("gcp_oauth_datakey", ctx_type) ||
98
- 0 == strcmp ("gcp_datakey", ctx_type)) {
99
- mongocrypt_ctx_setopt_key_encryption_key (
100
- ctx,
101
- TEST_BSON ("{'provider': 'gcp', 'projectId': 'test', 'location': "
102
- "'global', 'keyRing': 'test', 'keyName': 'test'}"));
103
- ASSERT_OK (mongocrypt_ctx_datakey_init (ctx), ctx);
104
- } else if (0 == strcmp ("gcp_oauth_decrypt", ctx_type) ||
105
- 0 == strcmp ("gcp_decrypt", ctx_type)) {
106
- bin = _mongocrypt_tester_encrypted_doc (tester);
107
- tester->paths.key_file = "./test/data/key-document-gcp.json";
108
- ASSERT_OK (mongocrypt_ctx_decrypt_init (ctx, bin), ctx);
109
- } else {
110
- fprintf (stderr, "unsupported ctx type: %s\n", ctx_type);
111
- abort ();
112
- }
113
-
114
- _mongocrypt_tester_run_ctx_to (tester, ctx, MONGOCRYPT_CTX_NEED_KMS);
115
- kms_ctx = mongocrypt_ctx_next_kms_ctx (ctx);
116
- BSON_ASSERT (kms_ctx);
117
- BSON_ASSERT (mongocrypt_kms_ctx_bytes_needed (kms_ctx) > 0);
118
-
119
- if (0 == strcmp ("gcp_datakey", ctx_type) ||
120
- 0 == strcmp ("gcp_decrypt", ctx_type) ||
121
- 0 == strcmp ("azure_datakey", ctx_type) ||
122
- 0 == strcmp ("azure_decrypt", ctx_type)) {
123
- /* The targeted request is after the oauth request.
124
- * Satisfy the oauth request with a valid response */
125
- _satisfy_oauth_request (kms_ctx);
126
- ASSERT_OK (mongocrypt_ctx_kms_done (ctx), ctx);
127
- ASSERT_STATE_EQUAL (mongocrypt_ctx_state (ctx), MONGOCRYPT_CTX_NEED_KMS);
128
- kms_ctx = mongocrypt_ctx_next_kms_ctx (ctx);
129
- BSON_ASSERT (kms_ctx);
130
- BSON_ASSERT (mongocrypt_kms_ctx_bytes_needed (kms_ctx) > 0);
131
- }
132
-
133
- /* Feed until failure or completion. */
134
- BSON_ASSERT (bson_iter_init_find (&iter, test, "http_reply"));
135
- BSON_ASSERT (bson_iter_recurse (&iter, &iter));
136
- while (bson_iter_next (&iter)) {
137
- uint32_t len;
138
- uint8_t *data;
139
-
140
- mongocrypt_binary_destroy (bin);
141
- data = (uint8_t *) bson_iter_utf8 (&iter, &len);
142
- bin = mongocrypt_binary_new_from_data (data, len);
143
- if (!mongocrypt_kms_ctx_feed (kms_ctx, bin)) {
144
- mongocrypt_kms_ctx_status (kms_ctx, status);
46
+ static void _test_one_kms_response(_mongocrypt_tester_t *tester, bson_t *test) {
47
+ mongocrypt_t *crypt;
48
+ mongocrypt_kms_ctx_t *kms_ctx;
49
+ mongocrypt_ctx_t *ctx;
50
+ bson_iter_t iter;
51
+ bson_iter_t ctx_iter;
52
+
53
+ BSON_ASSERT(bson_iter_init_find(&iter, test, "description"));
54
+ printf("- %s\n", bson_iter_utf8(&iter, NULL));
55
+ BSON_ASSERT(bson_iter_init_find(&ctx_iter, test, "ctx"));
56
+ BSON_ASSERT(bson_iter_recurse(&ctx_iter, &ctx_iter));
57
+ while (bson_iter_next(&ctx_iter)) {
58
+ const char *ctx_type = bson_iter_utf8(&ctx_iter, NULL);
59
+ bool ok = false;
60
+ mongocrypt_status_t *status;
61
+ mongocrypt_binary_t *bin = NULL;
62
+ char *expect;
63
+
64
+ status = mongocrypt_status_new();
65
+ crypt = _mongocrypt_tester_mongocrypt(TESTER_MONGOCRYPT_DEFAULT);
66
+ ctx = mongocrypt_ctx_new(crypt);
67
+
68
+ /* Test both contexts for creating a data key and automatic decryption
69
+ * since they go through different code paths related to KMS. */
70
+ if (0 == strcmp("datakey", ctx_type)) {
71
+ mongocrypt_ctx_setopt_masterkey_aws(ctx, "example", -1, "example", -1);
72
+ ASSERT_OK(mongocrypt_ctx_datakey_init(ctx), ctx);
73
+ } else if (0 == strcmp("decrypt", ctx_type)) {
74
+ mongocrypt_binary_destroy(bin);
75
+ bin = _mongocrypt_tester_encrypted_doc(tester);
76
+ tester->paths.key_file = "./test/example/key-document.json";
77
+ ASSERT_OK(mongocrypt_ctx_decrypt_init(ctx, bin), ctx);
78
+ } else if (0 == strcmp("azure_oauth_datakey", ctx_type) || 0 == strcmp("azure_datakey", ctx_type)) {
79
+ mongocrypt_ctx_setopt_key_encryption_key(ctx,
80
+ TEST_BSON("{'provider': 'azure', 'keyVaultEndpoint': "
81
+ "'example.vault.azure.net', 'keyName': 'test'}"));
82
+ ASSERT_OK(mongocrypt_ctx_datakey_init(ctx), ctx);
83
+ } else if (0 == strcmp("azure_oauth_decrypt", ctx_type) || 0 == strcmp("azure_decrypt", ctx_type)) {
84
+ bin = _mongocrypt_tester_encrypted_doc(tester);
85
+ tester->paths.key_file = "./test/data/key-document-azure.json";
86
+ ASSERT_OK(mongocrypt_ctx_decrypt_init(ctx, bin), ctx);
87
+ } else if (0 == strcmp("gcp_oauth_datakey", ctx_type) || 0 == strcmp("gcp_datakey", ctx_type)) {
88
+ mongocrypt_ctx_setopt_key_encryption_key(ctx,
89
+ TEST_BSON("{'provider': 'gcp', 'projectId': 'test', 'location': "
90
+ "'global', 'keyRing': 'test', 'keyName': 'test'}"));
91
+ ASSERT_OK(mongocrypt_ctx_datakey_init(ctx), ctx);
92
+ } else if (0 == strcmp("gcp_oauth_decrypt", ctx_type) || 0 == strcmp("gcp_decrypt", ctx_type)) {
93
+ bin = _mongocrypt_tester_encrypted_doc(tester);
94
+ tester->paths.key_file = "./test/data/key-document-gcp.json";
95
+ ASSERT_OK(mongocrypt_ctx_decrypt_init(ctx, bin), ctx);
96
+ } else {
97
+ fprintf(stderr, "unsupported ctx type: %s\n", ctx_type);
98
+ abort();
99
+ }
100
+
101
+ _mongocrypt_tester_run_ctx_to(tester, ctx, MONGOCRYPT_CTX_NEED_KMS);
102
+ kms_ctx = mongocrypt_ctx_next_kms_ctx(ctx);
103
+ BSON_ASSERT(kms_ctx);
104
+ BSON_ASSERT(mongocrypt_kms_ctx_bytes_needed(kms_ctx) > 0);
105
+
106
+ if (0 == strcmp("gcp_datakey", ctx_type) || 0 == strcmp("gcp_decrypt", ctx_type)
107
+ || 0 == strcmp("azure_datakey", ctx_type) || 0 == strcmp("azure_decrypt", ctx_type)) {
108
+ /* The targeted request is after the oauth request.
109
+ * Satisfy the oauth request with a valid response */
110
+ _satisfy_oauth_request(kms_ctx);
111
+ ASSERT_OK(mongocrypt_ctx_kms_done(ctx), ctx);
112
+ ASSERT_STATE_EQUAL(mongocrypt_ctx_state(ctx), MONGOCRYPT_CTX_NEED_KMS);
113
+ kms_ctx = mongocrypt_ctx_next_kms_ctx(ctx);
114
+ BSON_ASSERT(kms_ctx);
115
+ BSON_ASSERT(mongocrypt_kms_ctx_bytes_needed(kms_ctx) > 0);
116
+ }
117
+
118
+ /* Feed until failure or completion. */
119
+ BSON_ASSERT(bson_iter_init_find(&iter, test, "http_reply"));
120
+ BSON_ASSERT(bson_iter_recurse(&iter, &iter));
121
+ while (bson_iter_next(&iter)) {
122
+ uint32_t len;
123
+ uint8_t *data;
124
+
125
+ mongocrypt_binary_destroy(bin);
126
+ data = (uint8_t *)bson_iter_utf8(&iter, &len);
127
+ bin = mongocrypt_binary_new_from_data(data, len);
128
+ if (!mongocrypt_kms_ctx_feed(kms_ctx, bin)) {
129
+ mongocrypt_kms_ctx_status(kms_ctx, status);
130
+ goto failed;
131
+ }
132
+ }
133
+
134
+ if (!mongocrypt_ctx_kms_done(ctx)) {
135
+ mongocrypt_ctx_status(ctx, status);
145
136
  goto failed;
146
- }
147
- }
148
-
149
- if (!mongocrypt_ctx_kms_done (ctx)) {
150
- mongocrypt_ctx_status (ctx, status);
151
- goto failed;
152
- }
153
-
154
- ok = true;
155
-
156
- failed:
157
- BSON_ASSERT (bson_iter_init_find (&iter, test, "expect"));
158
- if (BSON_ITER_HOLDS_ARRAY (&iter)) {
159
- // Concatenate array into one string.
160
- bson_string_t *builder = bson_string_new (NULL);
161
- bson_iter_recurse (&iter, &iter);
162
- while (bson_iter_next (&iter)) {
163
- ASSERT (BSON_ITER_HOLDS_UTF8 (&iter));
164
- bson_string_append (builder, bson_iter_utf8 (&iter, NULL));
165
- }
166
- expect = bson_string_free (builder, false /* free segment */);
167
- } else {
168
- expect = bson_strdup (bson_iter_utf8 (&iter, NULL));
169
- }
170
-
171
- if (0 == strcmp ("ok", expect)) {
172
- ASSERT_OR_PRINT (ok, status);
173
- } else {
174
- ASSERT_STATUS_CONTAINS (status, expect);
175
- }
176
-
177
- bson_free (expect);
178
- mongocrypt_binary_destroy (bin);
179
- mongocrypt_status_destroy (status);
180
- mongocrypt_ctx_destroy (ctx);
181
- mongocrypt_destroy (crypt);
182
- }
137
+ }
138
+
139
+ ok = true;
140
+
141
+ failed:
142
+ BSON_ASSERT(bson_iter_init_find(&iter, test, "expect"));
143
+ if (BSON_ITER_HOLDS_ARRAY(&iter)) {
144
+ // Concatenate array into one string.
145
+ bson_string_t *builder = bson_string_new(NULL);
146
+ bson_iter_recurse(&iter, &iter);
147
+ while (bson_iter_next(&iter)) {
148
+ ASSERT(BSON_ITER_HOLDS_UTF8(&iter));
149
+ bson_string_append(builder, bson_iter_utf8(&iter, NULL));
150
+ }
151
+ expect = bson_string_free(builder, false /* free segment */);
152
+ } else {
153
+ expect = bson_strdup(bson_iter_utf8(&iter, NULL));
154
+ }
155
+
156
+ if (0 == strcmp("ok", expect)) {
157
+ ASSERT_OR_PRINT(ok, status);
158
+ } else {
159
+ ASSERT_STATUS_CONTAINS(status, expect);
160
+ }
161
+
162
+ bson_free(expect);
163
+ mongocrypt_binary_destroy(bin);
164
+ mongocrypt_status_destroy(status);
165
+ mongocrypt_ctx_destroy(ctx);
166
+ mongocrypt_destroy(crypt);
167
+ }
183
168
  }
184
169
 
185
- static void
186
- _test_kms_responses (_mongocrypt_tester_t *tester)
187
- {
188
- bson_t test_file;
189
- bson_iter_t iter;
190
-
191
- _load_json_as_bson ("./test/data/kms-tests.json", &test_file);
192
- for (bson_iter_init (&iter, &test_file); bson_iter_next (&iter);) {
193
- bson_t test;
194
-
195
- bson_iter_bson (&iter, &test);
196
- _test_one_kms_response (tester, &test);
197
- bson_destroy (&test);
198
- }
199
- bson_destroy (&test_file);
170
+ static void _test_kms_responses(_mongocrypt_tester_t *tester) {
171
+ bson_t test_file;
172
+ bson_iter_t iter;
173
+
174
+ _load_json_as_bson("./test/data/kms-tests.json", &test_file);
175
+ for (bson_iter_init(&iter, &test_file); bson_iter_next(&iter);) {
176
+ bson_t test;
177
+
178
+ bson_iter_bson(&iter, &test);
179
+ _test_one_kms_response(tester, &test);
180
+ bson_destroy(&test);
181
+ }
182
+ bson_destroy(&test_file);
200
183
  }
201
184
 
202
- void
203
- _mongocrypt_tester_install_kms_responses (_mongocrypt_tester_t *tester)
204
- {
205
- INSTALL_TEST (_test_kms_responses);
185
+ void _mongocrypt_tester_install_kms_responses(_mongocrypt_tester_t *tester) {
186
+ INSTALL_TEST(_test_kms_responses);
206
187
  }
@@ -16,74 +16,63 @@
16
16
 
17
17
  #include "test-mongocrypt.h"
18
18
 
19
- static void
20
- _test_local_roundtrip (_mongocrypt_tester_t *tester)
21
- {
22
- mongocrypt_t *crypt;
23
- mongocrypt_ctx_t *ctx;
24
- mongocrypt_binary_t *bin;
25
- _mongocrypt_buffer_t encrypted_cmd;
26
- bson_t as_bson;
27
- bson_iter_t iter;
19
+ static void _test_local_roundtrip(_mongocrypt_tester_t *tester) {
20
+ mongocrypt_t *crypt;
21
+ mongocrypt_ctx_t *ctx;
22
+ mongocrypt_binary_t *bin;
23
+ _mongocrypt_buffer_t encrypted_cmd;
24
+ bson_t as_bson;
25
+ bson_iter_t iter;
28
26
 
29
- bin = mongocrypt_binary_new ();
30
- crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
31
- ctx = mongocrypt_ctx_new (crypt);
32
- /* Encrypt a document. */
33
- ASSERT_OK (mongocrypt_ctx_encrypt_init (
34
- ctx, "test", -1, TEST_FILE ("./test/example/cmd.json")),
35
- ctx);
36
- _mongocrypt_tester_run_ctx_to (tester, ctx, MONGOCRYPT_CTX_NEED_MONGO_KEYS);
37
- ASSERT_OK (mongocrypt_ctx_mongo_feed (
38
- ctx, TEST_FILE ("./test/data/key-document-local.json")),
39
- ctx);
40
- ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
27
+ bin = mongocrypt_binary_new();
28
+ crypt = _mongocrypt_tester_mongocrypt(TESTER_MONGOCRYPT_DEFAULT);
29
+ ctx = mongocrypt_ctx_new(crypt);
30
+ /* Encrypt a document. */
31
+ ASSERT_OK(mongocrypt_ctx_encrypt_init(ctx, "test", -1, TEST_FILE("./test/example/cmd.json")), ctx);
32
+ _mongocrypt_tester_run_ctx_to(tester, ctx, MONGOCRYPT_CTX_NEED_MONGO_KEYS);
33
+ ASSERT_OK(mongocrypt_ctx_mongo_feed(ctx, TEST_FILE("./test/data/key-document-local.json")), ctx);
34
+ ASSERT_OK(mongocrypt_ctx_mongo_done(ctx), ctx);
41
35
 
42
- /* Because this is local, we skip NEED_KMS and go right to READY. */
43
- BSON_ASSERT (mongocrypt_ctx_state (ctx) == MONGOCRYPT_CTX_READY);
44
- ASSERT_OK (mongocrypt_ctx_finalize (ctx, bin), ctx);
36
+ /* Because this is local, we skip NEED_KMS and go right to READY. */
37
+ BSON_ASSERT(mongocrypt_ctx_state(ctx) == MONGOCRYPT_CTX_READY);
38
+ ASSERT_OK(mongocrypt_ctx_finalize(ctx, bin), ctx);
45
39
 
46
- BSON_ASSERT (_mongocrypt_binary_to_bson (bin, &as_bson));
47
- /* Keep a copy to decrypt later. */
48
- _mongocrypt_buffer_copy_from_binary (&encrypted_cmd, bin);
49
- CRYPT_TRACEF (&crypt->log, "encrypted doc: %s", tmp_json (&as_bson));
50
- bson_iter_init (&iter, &as_bson);
51
- bson_iter_find_descendant (&iter, "filter.ssn", &iter);
52
- BSON_ASSERT (BSON_ITER_HOLDS_BINARY (&iter));
53
- mongocrypt_ctx_destroy (ctx);
54
- mongocrypt_destroy (crypt); /* destroy because of caching. */
40
+ BSON_ASSERT(_mongocrypt_binary_to_bson(bin, &as_bson));
41
+ /* Keep a copy to decrypt later. */
42
+ _mongocrypt_buffer_copy_from_binary(&encrypted_cmd, bin);
43
+ CRYPT_TRACEF(&crypt->log, "encrypted doc: %s", tmp_json(&as_bson));
44
+ bson_iter_init(&iter, &as_bson);
45
+ bson_iter_find_descendant(&iter, "filter.ssn", &iter);
46
+ BSON_ASSERT(BSON_ITER_HOLDS_BINARY(&iter));
47
+ mongocrypt_ctx_destroy(ctx);
48
+ mongocrypt_destroy(crypt); /* destroy because of caching. */
55
49
 
56
- /* Decrypt it back. */
57
- crypt = _mongocrypt_tester_mongocrypt (TESTER_MONGOCRYPT_DEFAULT);
58
- ctx = mongocrypt_ctx_new (crypt);
59
- _mongocrypt_buffer_to_binary (&encrypted_cmd, bin);
60
- ASSERT_OK (mongocrypt_ctx_decrypt_init (ctx, bin), ctx);
61
- _mongocrypt_tester_run_ctx_to (tester, ctx, MONGOCRYPT_CTX_NEED_MONGO_KEYS);
62
- ASSERT_OK (mongocrypt_ctx_mongo_feed (
63
- ctx, TEST_FILE ("./test/data/key-document-local.json")),
64
- ctx);
65
- ASSERT_OK (mongocrypt_ctx_mongo_done (ctx), ctx);
50
+ /* Decrypt it back. */
51
+ crypt = _mongocrypt_tester_mongocrypt(TESTER_MONGOCRYPT_DEFAULT);
52
+ ctx = mongocrypt_ctx_new(crypt);
53
+ _mongocrypt_buffer_to_binary(&encrypted_cmd, bin);
54
+ ASSERT_OK(mongocrypt_ctx_decrypt_init(ctx, bin), ctx);
55
+ _mongocrypt_tester_run_ctx_to(tester, ctx, MONGOCRYPT_CTX_NEED_MONGO_KEYS);
56
+ ASSERT_OK(mongocrypt_ctx_mongo_feed(ctx, TEST_FILE("./test/data/key-document-local.json")), ctx);
57
+ ASSERT_OK(mongocrypt_ctx_mongo_done(ctx), ctx);
66
58
 
67
- /* Because this is local, we skip NEED_KMS and go right to READY. */
68
- BSON_ASSERT (mongocrypt_ctx_state (ctx) == MONGOCRYPT_CTX_READY);
69
- ASSERT_OK (mongocrypt_ctx_finalize (ctx, bin), ctx);
59
+ /* Because this is local, we skip NEED_KMS and go right to READY. */
60
+ BSON_ASSERT(mongocrypt_ctx_state(ctx) == MONGOCRYPT_CTX_READY);
61
+ ASSERT_OK(mongocrypt_ctx_finalize(ctx, bin), ctx);
70
62
 
71
- BSON_ASSERT (_mongocrypt_binary_to_bson (bin, &as_bson));
72
- CRYPT_TRACEF (&crypt->log, "decrypted doc: %s", tmp_json (&as_bson));
73
- bson_iter_init (&iter, &as_bson);
74
- bson_iter_find_descendant (&iter, "filter.ssn", &iter);
75
- BSON_ASSERT (BSON_ITER_HOLDS_UTF8 (&iter));
76
- BSON_ASSERT (0 == strcmp (bson_iter_utf8 (&iter, NULL),
77
- _mongocrypt_tester_plaintext (tester)));
63
+ BSON_ASSERT(_mongocrypt_binary_to_bson(bin, &as_bson));
64
+ CRYPT_TRACEF(&crypt->log, "decrypted doc: %s", tmp_json(&as_bson));
65
+ bson_iter_init(&iter, &as_bson);
66
+ bson_iter_find_descendant(&iter, "filter.ssn", &iter);
67
+ BSON_ASSERT(BSON_ITER_HOLDS_UTF8(&iter));
68
+ BSON_ASSERT(0 == strcmp(bson_iter_utf8(&iter, NULL), _mongocrypt_tester_plaintext(tester)));
78
69
 
79
- mongocrypt_binary_destroy (bin);
80
- _mongocrypt_buffer_cleanup (&encrypted_cmd);
81
- mongocrypt_ctx_destroy (ctx);
82
- mongocrypt_destroy (crypt);
70
+ mongocrypt_binary_destroy(bin);
71
+ _mongocrypt_buffer_cleanup(&encrypted_cmd);
72
+ mongocrypt_ctx_destroy(ctx);
73
+ mongocrypt_destroy(crypt);
83
74
  }
84
75
 
85
- void
86
- _mongocrypt_tester_install_local_kms (_mongocrypt_tester_t *tester)
87
- {
88
- INSTALL_TEST (_test_local_roundtrip);
76
+ void _mongocrypt_tester_install_local_kms(_mongocrypt_tester_t *tester) {
77
+ INSTALL_TEST(_test_local_roundtrip);
89
78
  }