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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c28cbfbd91e043ddfd42777c19330e7a3c5c8d3d0915793d2fc69d8f641dd5d8
4
- data.tar.gz: 0fe816908825594f1728ae973604f0d3cc5e2288a3f8fad99ccfbaaca4511fa3
3
+ metadata.gz: 3ae10db4e420e2a2ec71ccedbb7024d15a87141ce15c0af424045482558aff11
4
+ data.tar.gz: 87fd8a2506d70a72f870c1be0e26c409d3e8e1b4ec11353faf275a2d467dab5a
5
5
  SHA512:
6
- metadata.gz: 57d347930b4799a794eae40254cbc2a9b00b359ea52f55ebdf60b90cd37890aafb46f594d6b4a174f10f50ec102c4de7e0c1eb0d0f36b2777fcfbd0ba80c850a
7
- data.tar.gz: 75e290bf291fbcae5043dbd8ed4885cf28ca808672940722e0cc355570aacb186c31d01b9db70ed9b260be7fb80404febfd8bff0f8b447254b60419281924711
6
+ metadata.gz: e962ba2224249acd36da0a9957e7dc2adabb7194253e0340461f7fde40e48a3ff5ee4bca30b642464479aacbb99121d2c9e8655e51bd630ec1395700ae87f625
7
+ data.tar.gz: 77f27ffb1c4277c9c9d45d967af1d7dafadcb8c4127b1691e6ecfe4c22c6e9a3cd7e258bcad334fe36baaa4f010f0dfa7a4c41f4f189f097b2e578acdaf0f50a
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,11 +1,13 @@
1
1
  # ChangeLog
2
- ## 1.7.4
3
- ### Fixed
4
- - Fix build on macOS Ventura.
5
- ## 1.7.3
6
- ### Fixed
7
- - Fix KMIP Register request for versions 1.12-1.13.0 of Hashicorp Vault.
8
- - Fix possible memory leak when encrypting malformed BSON with Queryable Encryption.
2
+ ## 1.8.0
3
+ This release adds stable support of the Queryable Encryption (QE) feature for the "Indexed" and "Unindexed" algorithms.
4
+ ## 1.8.0-alpha1
5
+ This release makes backwards breaking changes to Queryable Encryption (QE) behavior added in the 1.8.0-alpha0 release:
6
+ - Do not apply default to min/max values for int/long/date.
7
+ - Enable the QEv2 protocol by default. Remove function to enable QEv2.
8
+ ## 1.8.0-alpha0
9
+ ### Improvements
10
+ - Support Queryable Encryption v2 protocol.
9
11
  ## 1.7.2
10
12
  ### Improvements
11
13
  - Add toggle for Decimal128 Range Support.
@@ -78,13 +78,13 @@ if (ENABLE_MORE_WARNINGS_AS_ERRORS)
78
78
  )
79
79
  endif ()
80
80
 
81
- find_package (Threads REQUIRED)
82
-
83
81
  add_subdirectory (bindings/cs)
84
82
 
85
83
  include (GenerateExportHeader)
86
84
 
87
85
  include (CTest)
86
+ include (Platform)
87
+
88
88
 
89
89
  set (MONGOCRYPT_PUBLIC_HEADERS
90
90
  src/mongocrypt-compat.h
@@ -99,11 +99,17 @@ set (MONGOCRYPT_SOURCES
99
99
  src/mc-array.c
100
100
  src/mc-efc.c
101
101
  src/mc-fle2-find-range-payload.c
102
+ src/mc-fle2-find-range-payload-v2.c
102
103
  src/mc-fle2-insert-update-payload.c
104
+ src/mc-fle2-insert-update-payload-v2.c
103
105
  src/mc-fle2-encryption-placeholder.c
104
106
  src/mc-fle2-find-equality-payload.c
107
+ src/mc-fle2-find-equality-payload-v2.c
105
108
  src/mc-fle2-payload-iev.c
109
+ src/mc-fle2-payload-iev-v2.c
106
110
  src/mc-fle2-payload-uev.c
111
+ src/mc-fle2-payload-uev-common.c
112
+ src/mc-fle2-payload-uev-v2.c
107
113
  src/mc-fle2-rfds.c
108
114
  src/mc-range-edge-generation.c
109
115
  src/mc-range-mincover.c
@@ -111,6 +117,7 @@ set (MONGOCRYPT_SOURCES
111
117
  src/mc-rangeopts.c
112
118
  src/mc-reader.c
113
119
  src/mc-tokens.c
120
+ src/mc-writer.c
114
121
  src/mongocrypt-binary.c
115
122
  src/mongocrypt-buffer.c
116
123
  src/mongocrypt-cache.c
@@ -270,26 +277,15 @@ target_include_directories (
270
277
  PUBLIC
271
278
  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>"
272
279
  )
273
- include (TestBigEndian)
274
- TEST_BIG_ENDIAN (MONGOCRYPT_BIG_ENDIAN)
275
- if (MONGOCRYPT_BIG_ENDIAN)
276
- message ("Detected byte order: big endian")
277
- list (APPEND MONGOCRYPT_DEFINITIONS MONGOCRYPT_BIG_ENDIAN)
278
- else ()
279
- message ("Detected byte order: little endian")
280
- list (APPEND MONGOCRYPT_DEFINITIONS MONGOCRYPT_LITTLE_ENDIAN)
281
- endif ()
282
- target_compile_definitions (mongocrypt PRIVATE ${MONGOCRYPT_DEFINITIONS})
283
280
  target_link_libraries (
284
281
  mongocrypt
285
282
  PRIVATE
286
283
  _mongocrypt::libbson_for_shared
287
- Threads::Threads
288
284
  kms_message_static
289
285
  $<BUILD_INTERFACE:mongo::mlib>
290
286
  PUBLIC
287
+ mongocrypt::platform
291
288
  ${maybe_dfp_library}
292
- ${CMAKE_DL_LIBS}
293
289
  )
294
290
 
295
291
  if (NOT USE_SHARED_LIBBSON)
@@ -333,8 +329,6 @@ target_include_directories (
333
329
  )
334
330
  target_compile_definitions (
335
331
  mongocrypt_static
336
- PRIVATE
337
- ${MONGOCRYPT_DEFINITIONS}
338
332
  PUBLIC
339
333
  MONGOCRYPT_STATIC_DEFINE
340
334
  KMS_MSG_STATIC
@@ -346,9 +340,8 @@ target_link_libraries (
346
340
  kms_message_static
347
341
  $<BUILD_INTERFACE:mongo::mlib>
348
342
  PUBLIC
343
+ mongocrypt::platform
349
344
  ${maybe_dfp_library}
350
- ${CMAKE_THREAD_LIBS_INIT}
351
- ${CMAKE_DL_LIBS}
352
345
  )
353
346
  set (PKG_CONFIG_STATIC_LIBS "\${prefix}/${CMAKE_INSTALL_LIBDIR}/libmongocrypt-static.a")
354
347
  set (PKG_CONFIG_STATIC_LIBS "${PKG_CONFIG_STATIC_LIBS} ${CMAKE_THREAD_LIBS_INIT}")
@@ -394,8 +387,6 @@ endif ()
394
387
  if (NOT APPLE)
395
388
  find_library (M_LIBRARY m)
396
389
  if (M_LIBRARY)
397
- target_link_libraries (mongocrypt PRIVATE ${M_LIBRARY})
398
- target_link_libraries (mongocrypt_static PRIVATE ${M_LIBRARY})
399
390
  set (PKG_CONFIG_STATIC_LIBS "${PKG_CONFIG_STATIC_LIBS} -lm")
400
391
  endif ()
401
392
  endif ()
@@ -461,9 +452,14 @@ endif ()
461
452
  set (TEST_MONGOCRYPT_SOURCES
462
453
  test/test-gcp-auth.c
463
454
  test/test-mc-efc.c
455
+ test/test-mc-fle2-find-equality-payload-v2.c
456
+ test/test-mc-fle2-find-range-payload-v2.c
464
457
  test/test-mc-fle2-payload-iev.c
458
+ test/test-mc-fle2-payload-iev-v2.c
465
459
  test/test-mc-fle2-payload-iup.c
460
+ test/test-mc-fle2-payload-iup-v2.c
466
461
  test/test-mc-fle2-payload-uev.c
462
+ test/test-mc-fle2-payload-uev-v2.c
467
463
  test/test-mc-fle2-rfds.c
468
464
  test/test-mc-range-edge-generation.c
469
465
  test/test-mc-range-mincover.c
@@ -471,6 +467,7 @@ set (TEST_MONGOCRYPT_SOURCES
471
467
  test/test-mc-reader.c
472
468
  test/test-mc-tokens.c
473
469
  test/test-mc-range-encoding.c
470
+ test/test-mc-writer.c
474
471
  test/test-mongocrypt-assert-match-bson.c
475
472
  test/test-mongocrypt-buffer.c
476
473
  test/test-mongocrypt-cache.c
@@ -510,8 +507,6 @@ target_include_directories (test-mongocrypt PRIVATE ./src "${CMAKE_CURRENT_SOURC
510
507
  target_link_libraries (test-mongocrypt PRIVATE _mongocrypt::libbson_for_static mongocrypt_static mongo::mlib)
511
508
  target_include_directories (test-mongocrypt PRIVATE "${CMAKE_CURRENT_LIST_DIR}/test")
512
509
  target_compile_definitions (test-mongocrypt PRIVATE
513
- ${BSON_DEFINITIONS}
514
- ${MONGOCRYPT_DEFINITIONS}
515
510
  # Set a definition so that testcases can know where test-mongocrypt.exe was written to
516
511
  "TEST_MONGOCRYPT_OUTPUT_PATH=\"$<TARGET_FILE:test-mongocrypt>\""
517
512
  # Tell test-mongocrypt whether we have a real csfle library for testing
@@ -547,7 +542,6 @@ if ("cxx_relaxed_constexpr" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
547
542
  mongocrypt
548
543
  mongo::mlib
549
544
  ${maybe_dfp_library}
550
- Threads::Threads
551
545
  _mongocrypt::libbson_for_static
552
546
  )
553
547
  add_test ("${test_name}" "${exe_name}")
@@ -0,0 +1,374 @@
1
+ # Earthly Intro: https://docs.earthly.dev/
2
+ # Earthfile Reference: https://docs.earthly.dev/docs/earthfile
3
+
4
+ # Quick notes:
5
+ # • The shell script at ".evergreen/earthly.sh" can be used to automatically
6
+ # download and use a fixed version of Earthly that is compatible with
7
+ # this file version. Execute the shell script as if it were the Earthly
8
+ # executable itself.
9
+ # • In this file, the convention is to copy the source tree into /s/libmongocrypt
10
+ # • Earthly copies the "build context" (working directory) into the local buildkit
11
+ # daemon before each build execution. (Similar to the Docker build context).
12
+ # If you have a large amount of data in the working directory, this could be
13
+ # slow. The ".earthlyignore" file specifies patterns of files and directories
14
+ # to exclude from the context upload. Modify it to suite your needs, if necessary.
15
+ # • Only a subset of the source tree is COPY'd into the build environment. Files
16
+ # outside of this set will not be available in the build. See the COPY_SOURCE
17
+ # command for the list.
18
+ # • Modification at any layer will invalidate caching on all subsequent build
19
+ # layers. This is important and by-design in Earthly. Push infrequently-modified
20
+ # operations to earlier in the process the pipeline to make better use of
21
+ # the cache.
22
+ #
23
+ # This file has a few major sections:
24
+ # - Setup COMMANDs
25
+ # - Utility COMMANDs
26
+ # - Environment targets
27
+ # - Build/test/CI targets
28
+ #
29
+ # All environment targets begin with "env.". All build targets (should) accept an "env"
30
+ # parameter that specifies the name of the environment to use for the task. The name
31
+ # of an environment is specified following the "env." prefix. For example, the
32
+ # Ubuntu 22.04 environment is named "u22", so its environment target is "env.u22",
33
+ # and can be used i.e. "earthly +build --env=u22"
34
+ #
35
+ # The following environment are defined in this file:
36
+ # • u22 - Ubuntu 22.04
37
+ # • u20 - Ubuntu 20.04
38
+ # • u18 - Ubuntu 18.04
39
+ # • u16 - Ubuntu 16.04
40
+ # • u14 - Ubuntu 14.04
41
+ # • rl8 - RockyLinux 8 - Stand-in for RHEL 8
42
+ # • c7 - CentOS 7 - Stand-in for RHEL 7
43
+ # • c6 - CentOS 6 - Stand-in for RHEL 6
44
+ # • amzn1 - AmazonLinux (2018.03)
45
+ # • amzn2 - AmazonLinux 2
46
+ # • deb9 - Debian 9.2
47
+ # • deb10 - Debian 10.0
48
+ # • deb11 - Debian 11.0
49
+ # • sles15 - OpenSUSE Leap 15.0
50
+ # • alpine - Alpine Linux 3.18
51
+ #
52
+ # When adding new environments, always pull from a fully-qualified image ID:
53
+ # • DO NOT: "ubuntu"
54
+ # • DO NOT: "ubuntu:latest"
55
+ # • DO NOT: "ubuntu:22.10"
56
+ # • DO: "docker.io/library/ubuntu:22.10"
57
+ # ###
58
+
59
+ VERSION --use-cache-command 0.6
60
+ FROM docker.io/library/alpine:3.16
61
+ WORKDIR /s
62
+
63
+ init:
64
+ # Special initializing target that sets up the base image and adds the "__install"
65
+ # script. This scripts abstracts around the underlying package manager interface
66
+ # to "do the right thing" when you want to install packages. Package names will
67
+ # still need to be spelled correctly for the respective system.
68
+ #
69
+ # Invoke +init with a "--base" parameter that specifies the base image to pull
70
+ ARG --required base
71
+ FROM $base
72
+ COPY etc/install-package.sh /usr/local/bin/__install
73
+ RUN chmod +x /usr/local/bin/__install
74
+ ENV USER_CACHES_DIR=/Cache
75
+
76
+ # Environment setup commands below. Each provides the basic environment for a
77
+ # libmongocrypt build. Additional packages and setup may be required for
78
+ # individual tasks.
79
+
80
+ DEBIAN_SETUP:
81
+ # Setup for a debian-like build environment. Used for both Debian and Ubuntu
82
+ COMMAND
83
+ RUN __install build-essential g++ libssl-dev curl unzip python3 pkg-config \
84
+ git ccache findutils ca-certificates
85
+
86
+ REDHAT_SETUP:
87
+ # Setup for a redhat-like build environment. Used for CentOS and RockyLinux.
88
+ COMMAND
89
+ RUN __install epel-release && \
90
+ __install gcc-c++ make openssl-devel curl unzip git ccache findutils \
91
+ patch
92
+
93
+ CENTOS6_SETUP:
94
+ # Special setup for CentOS6: The packages have been moved to the vault, so
95
+ # we need to enable the vault repos before we perform any __installs
96
+ COMMAND
97
+ RUN rm /etc/yum.repos.d/*.repo
98
+ COPY etc/c6-vault.repo /etc/yum.repos.d/CentOS-Base.repo
99
+ DO +REDHAT_SETUP
100
+
101
+ AMZ_SETUP:
102
+ # Setup for Amazon Linux.
103
+ COMMAND
104
+ # amzn1 has "python38", but amzn2 has "python3." Try both
105
+ RUN __install python3 || __install python38
106
+ RUN __install gcc-c++ make openssl-devel curl unzip tar gzip \
107
+ openssh-clients patch git
108
+
109
+ SLES_SETUP:
110
+ # Setup for a SLES/SUSE build environment
111
+ COMMAND
112
+ RUN __install gcc-c++ make libopenssl-devel curl unzip tar gzip python3 \
113
+ patch git xz which
114
+
115
+ ALPINE_SETUP:
116
+ # Setup for an Alpine Linux build environment
117
+ COMMAND
118
+ RUN __install make bash gcc g++ unzip curl tar gzip git musl-dev \
119
+ linux-headers openssl-dev python3
120
+
121
+ # Environment targets are defined below. These do not have build outputs, but
122
+ # are rather themselves the "outputs" to be used as the environment for subsequent
123
+ # tasks
124
+
125
+ env.c6:
126
+ # A CentOS 6 environment.
127
+ FROM +init --base=docker.io/library/centos:6
128
+ DO +CENTOS6_SETUP
129
+
130
+ env.c7:
131
+ # A CentOS 7 environment.
132
+ FROM +init --base=docker.io/library/centos:7
133
+ DO +REDHAT_SETUP
134
+
135
+ env.rl8:
136
+ # CentOS 8 is cancelled. Use RockyLinux 8 for our RHEL 8 environment.
137
+ FROM +init --base=docker.io/library/rockylinux:8
138
+ DO +REDHAT_SETUP
139
+
140
+ # Utility command for Ubuntu environments
141
+ ENV_UBUNTU:
142
+ COMMAND
143
+ ARG --required version
144
+ FROM +init --base=docker.io/library/ubuntu:$version
145
+ DO +DEBIAN_SETUP
146
+
147
+ env.u14:
148
+ # An Ubuntu 14.04 environment
149
+ DO +ENV_UBUNTU --version 14.04
150
+
151
+ env.u16:
152
+ # An Ubuntu 16.04 environment
153
+ DO +ENV_UBUNTU --version 16.04
154
+
155
+ env.u18:
156
+ # An Ubuntu 18.04 environment
157
+ DO +ENV_UBUNTU --version 18.04
158
+
159
+ env.u20:
160
+ # An Ubuntu 20.04 environment
161
+ DO +ENV_UBUNTU --version 20.04
162
+
163
+ env.u22:
164
+ # An Ubuntu 22.04 environment
165
+ DO +ENV_UBUNTU --version 22.04
166
+
167
+ env.amzn1:
168
+ # An Amazon "1" environment. (AmazonLinux 2018)
169
+ FROM +init --base=docker.io/library/amazonlinux:2018.03
170
+ DO +AMZ_SETUP
171
+
172
+ env.amzn2:
173
+ # An AmazonLinux 2 environment
174
+ FROM +init --base=docker.io/library/amazonlinux:2
175
+ DO +AMZ_SETUP
176
+
177
+ # Utility command for Debian setup
178
+ ENV_DEBIAN:
179
+ COMMAND
180
+ ARG --required version
181
+ FROM +init --base=docker.io/library/debian:$version
182
+ DO +DEBIAN_SETUP
183
+
184
+ env.deb9:
185
+ # A Debian 9.2 environment
186
+ DO +ENV_DEBIAN --version 9.2
187
+
188
+ env.deb10:
189
+ # A Debian 10.0 environment
190
+ DO +ENV_DEBIAN --version 10.0
191
+
192
+ env.deb-unstable:
193
+ DO +ENV_DEBIAN --version=unstable
194
+
195
+ env.deb11:
196
+ # A Debian 11.0 environment
197
+ DO +ENV_DEBIAN --version 11.0
198
+
199
+ env.sles15:
200
+ # An OpenSUSE Leap 15.0 environment.
201
+ FROM +init --base=docker.io/opensuse/leap:15.0
202
+ DO +SLES_SETUP
203
+
204
+ env.alpine:
205
+ FROM +init --base=docker.io/library/alpine:3.17
206
+ DO +ALPINE_SETUP
207
+
208
+ # Utility: Warm-up obtaining CMake and Ninja for the build. This is usually
209
+ # very quick, but on some platforms we need to compile them from source.
210
+ CACHE_WARMUP:
211
+ COMMAND
212
+ # Copy only the scripts that are strictly necessary for the operation, to
213
+ # avoid cache invalidation later on.
214
+ COPY .evergreen/setup-env.sh \
215
+ .evergreen/init.sh \
216
+ .evergreen/ensure-cmake.sh \
217
+ .evergreen/ensure-ninja.sh \
218
+ /T/
219
+ RUN bash /T/ensure-cmake.sh
220
+ RUN env NINJA_EXE=/usr/local/bin/ninja \
221
+ bash /T/ensure-ninja.sh
222
+
223
+ COPY_SOURCE:
224
+ COMMAND
225
+ COPY --dir \
226
+ .git/ \
227
+ cmake/ \
228
+ kms-message/ \
229
+ test/ \
230
+ debian/ \
231
+ src/ \
232
+ doc/ \
233
+ etc/ \
234
+ LICENSE \
235
+ .evergreen/ \
236
+ third-party/ \
237
+ CMakeLists.txt \
238
+ "/s/libmongocrypt"
239
+ COPY --dir bindings/cs/ "/s/libmongocrypt/bindings/"
240
+
241
+ BUILD_EXAMPLE_STATE_MACHINE:
242
+ COMMAND
243
+ COPY test/example-state-machine.c /s/
244
+ RUN pkg-config --exists libmongocrypt --print-errors && \
245
+ gcc /s/example-state-machine.c \
246
+ -o /s/example-state-machine \
247
+ $(pkg-config --cflags --libs libmongocrypt)
248
+ COPY --dir test/example /s/test/example
249
+ RUN cd /s && /s/example-state-machine
250
+
251
+ rpm-build:
252
+ FROM +init --base fedora:rawhide
253
+ GIT CLONE https://src.fedoraproject.org/rpms/libmongocrypt.git /R
254
+ # Install the packages listed by "BuildRequires" and rpm-build:
255
+ RUN __install $(awk '/^BuildRequires:/ { print $2 }' /R/libmongocrypt.spec) \
256
+ rpm-build
257
+ DO +COPY_SOURCE
258
+ RUN cp -r /s/libmongocrypt/. /R
259
+ RUN awk -f /R/etc/rpm/tweak.awk < /R/libmongocrypt.spec > /R/libmongocrypt.2.spec
260
+ RUN rpmbuild -ba /R/libmongocrypt.2.spec \
261
+ -D "_topdir /X" \
262
+ -D "_sourcedir /R"
263
+ SAVE ARTIFACT /X/RPMS /
264
+ SAVE ARTIFACT /X/SRPMS /
265
+
266
+ rpm-install-runtime:
267
+ # Install the runtime RPM
268
+ FROM +init --base fedora:rawhide
269
+ COPY +rpm-build/RPMS /tmp/libmongocrypt-rpm/
270
+ RUN dnf makecache
271
+ RUN __install $(find /tmp/libmongocrypt-rpm/ -name 'libmongocrypt-1.*.rpm')
272
+
273
+ rpm-install-dev:
274
+ # Install the development RPM
275
+ FROM +rpm-install-runtime
276
+ COPY +rpm-build/RPMS /tmp/libmongocrypt-rpm/
277
+ RUN dnf makecache
278
+ RUN __install $(find /tmp/libmongocrypt-rpm/ -name 'libmongocrypt-devel-*.rpm')
279
+
280
+ rpm-devel-test:
281
+ # Attempt to build a small app using pkg-config and the dev RPM
282
+ FROM +rpm-install-dev
283
+ RUN __install gcc
284
+ DO +BUILD_EXAMPLE_STATE_MACHINE
285
+ SAVE ARTIFACT /s/example-state-machine /
286
+
287
+ rpm-runtime-test:
288
+ # Attempt to run a libmongocrypt-using app with the runtime RPM installed
289
+ FROM +rpm-install-runtime
290
+ COPY +rpm-devel-test/example-state-machine /s/
291
+ COPY --dir test/example /s/test/example
292
+ RUN cd /s/ && /s/example-state-machine
293
+
294
+ # A target to build the debian package. Options:
295
+ # • --env=[...] (default: deb-unstable)
296
+ # · Set the environment for the build. Affects which packages are available
297
+ # for build dependencies.
298
+ # NOTE: Uncommited local changes will be ignored and not affect the result!
299
+ deb-build:
300
+ ARG env=deb-unstable
301
+ FROM +env.$env
302
+ RUN __install git-buildpackage fakeroot debhelper cmake libbson-dev \
303
+ libintelrdfpmath-dev
304
+ DO +COPY_SOURCE
305
+ WORKDIR /s/libmongocrypt
306
+ RUN git clean -fdx && git reset --hard
307
+ RUN python3 etc/calc_release_version.py > VERSION_CURRENT
308
+ RUN git add -f VERSION_CURRENT && \
309
+ git -c user.name=anon -c user.email=anon@localhost \
310
+ commit VERSION_CURRENT -m 'Set version' && \
311
+ env LANG=C bash debian/build_snapshot.sh && \
312
+ debc ../*.changes && \
313
+ dpkg -i ../*.deb
314
+ SAVE ARTIFACT /s/*.deb /debs/
315
+
316
+ deb-install-runtime:
317
+ # Install the runtime deb package
318
+ FROM +init --base=docker.io/library/debian:unstable
319
+ COPY +deb-build/debs/libmongocrypt0*.deb /tmp/lmc.deb
320
+ RUN __install /tmp/lmc.deb
321
+
322
+ deb-install-dev:
323
+ # Install the development deb package
324
+ FROM +deb-install-runtime
325
+ COPY +deb-build/debs/libmongocrypt-dev*.deb /tmp/lmc-dev.deb
326
+ RUN __install /tmp/lmc-dev.deb
327
+
328
+ deb-dev-test:
329
+ # Attempt to build a small app using pkg-config and the dev deb package
330
+ FROM +deb-install-dev
331
+ RUN __install pkg-config gcc
332
+ DO +BUILD_EXAMPLE_STATE_MACHINE
333
+ SAVE ARTIFACT /s/example-state-machine /
334
+
335
+ deb-runtime-test:
336
+ # Attempt to run a libmongocrypt-using app with the runtime DEB installed
337
+ FROM +deb-install-runtime
338
+ COPY +deb-dev-test/example-state-machine /s/
339
+ COPY --dir test/example /s/test/example
340
+ RUN cd /s/ && /s/example-state-machine
341
+
342
+ packaging-full-test:
343
+ BUILD +deb-runtime-test
344
+ BUILD +rpm-runtime-test
345
+
346
+ check-format:
347
+ FROM python:3.11.2-slim-buster
348
+ RUN pip install pipx
349
+ COPY etc/format* /X/etc/
350
+ COPY .evergreen/init.sh /X/.evergreen/
351
+ RUN /X/etc/format.sh # Does nothing, but warms the cache
352
+ COPY --dir .clang-format src test /X/
353
+ RUN /X/etc/format-all.sh --dry-run -Werror --verbose
354
+
355
+ # The main "build" target. Options:
356
+ # • --env=[...] (default "u22")
357
+ # · Set the environment for the build. Any name of and "env.<name>" targets
358
+ # can be used.
359
+ # • --persist_build={true,false} (default "true")
360
+ # · Persist the build directory between executions. Enables incremental
361
+ # compilation and reusing of configuration between builds. The build
362
+ # directory is NOT shared between different "--env" environments, only
363
+ # within a single environment.
364
+ build:
365
+ ARG env=u22
366
+ FROM +env.$env
367
+ DO +CACHE_WARMUP
368
+ DO +COPY_SOURCE
369
+ WORKDIR /s
370
+ ARG persist_build=true
371
+ IF $persist_build
372
+ CACHE /s/libmongocrypt/cmake-build
373
+ END
374
+ RUN env USE_NINJA=1 bash libmongocrypt/.evergreen/build_all.sh
@@ -135,7 +135,7 @@ Do the following when releasing:
135
135
  Distribution packages (i.e., .deb/.rpm) are built and published for several Linux distributions. The installation of these packages for supported platforms is documented here.
136
136
 
137
137
  ### Unstable Development Distribution Packages ###
138
- To install the latest unstable development package, change `1.7` to `development` in the package URLs listed in the subsequent instructions. For example, `https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/1.7` in the instructions would become `https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/development`. Do not use the unstable version of libmongocrypt in a production environment.
138
+ To install the latest unstable development package, change `1.8` to `development` in the package URLs listed in the subsequent instructions. For example, `https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/1.8` in the instructions would become `https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/development`. Do not use the unstable version of libmongocrypt in a production environment.
139
139
 
140
140
  ### .deb Packages (Debian and Ubuntu) ###
141
141
 
@@ -148,13 +148,13 @@ sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.
148
148
  Second, create a list entry for the repository. For Ubuntu systems (be sure to change `<release>` to `xenial`, `bionic`, `focal`, or `jammy`, as appropriate to your system):
149
149
 
150
150
  ```
151
- echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/1.7 universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
151
+ echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu <release>/libmongocrypt/1.8 universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
152
152
  ```
153
153
 
154
154
  For Debian systems (be sure to change `<release>` to `stretch`, `buster`, or `bullseye`, as appropriate to your system):
155
155
 
156
156
  ```
157
- echo "deb https://libmongocrypt.s3.amazonaws.com/apt/debian <release>/libmongocrypt/1.7 main" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
157
+ echo "deb https://libmongocrypt.s3.amazonaws.com/apt/debian <release>/libmongocrypt/1.8 main" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
158
158
  ```
159
159
 
160
160
  Third, update the package cache:
@@ -179,7 +179,7 @@ Create the file `/etc/yum.repos.d/libmongocrypt.repo` with contents:
179
179
  ```
180
180
  [libmongocrypt]
181
181
  name=libmongocrypt repository
182
- baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/1.7/x86_64
182
+ baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/1.8/x86_64
183
183
  gpgcheck=1
184
184
  enabled=1
185
185
  gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
@@ -198,7 +198,7 @@ Create the file `/etc/yum.repos.d/libmongocrypt.repo` with contents:
198
198
  ```
199
199
  [libmongocrypt]
200
200
  name=libmongocrypt repository
201
- baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/1.7/x86_64
201
+ baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/1.8/x86_64
202
202
  gpgcheck=1
203
203
  enabled=1
204
204
  gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
@@ -217,7 +217,7 @@ Create the file `/etc/yum.repos.d/libmongocrypt.repo` with contents:
217
217
  ```
218
218
  [libmongocrypt]
219
219
  name=libmongocrypt repository
220
- baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/1.7/x86_64
220
+ baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/1.8/x86_64
221
221
  gpgcheck=1
222
222
  enabled=1
223
223
  gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc
@@ -240,7 +240,7 @@ sudo rpm --import https://www.mongodb.org/static/pgp/libmongocrypt.asc
240
240
  Second, add the repository (be sure to change `<release>` to `12` or `15`, as appropriate to your system):
241
241
 
242
242
  ```
243
- sudo zypper addrepo --gpgcheck "https://libmongocrypt.s3.amazonaws.com/zypper/suse/<release>/libmongocrypt/1.7/x86_64" libmongocrypt
243
+ sudo zypper addrepo --gpgcheck "https://libmongocrypt.s3.amazonaws.com/zypper/suse/<release>/libmongocrypt/1.8/x86_64" libmongocrypt
244
244
  ```
245
245
 
246
246
  Finally, install the libmongocrypt packages:
@@ -1 +1 @@
1
- 1.7.4
1
+ 1.8.0
@@ -105,11 +105,7 @@ namespace MongoDB.Libmongocrypt
105
105
  /// <summary>
106
106
  /// Starts an explicit encryption context.
107
107
  /// </summary>
108
- /// <param name="key">The key id.</param>
109
- /// <param name="encryptionAlgorithm">The encryption algorithm.</param>
110
- /// <param name="message">The BSON message.</param>
111
- /// <returns>A encryption context. </returns>
112
- public CryptContext StartExplicitEncryptionContext(byte[] keyId, byte[] keyAltName, string queryType, long? contentionFactor, string encryptionAlgorithm, byte[] message)
108
+ public CryptContext StartExplicitEncryptionContext(byte[] keyId, byte[] keyAltName, string queryType, long? contentionFactor, string encryptionAlgorithm, byte[] message, byte[] rangeOptions, bool isExpressionMode = false)
113
109
  {
114
110
  var handle = Library.mongocrypt_ctx_new(_handle);
115
111
 
@@ -122,6 +118,11 @@ namespace MongoDB.Libmongocrypt
122
118
  PinnedBinary.RunAsPinnedBinary(handle, keyAltName, _status, (h, pb) => Library.mongocrypt_ctx_setopt_key_alt_name(h, pb));
123
119
  }
124
120
 
121
+ if (rangeOptions != null)
122
+ {
123
+ PinnedBinary.RunAsPinnedBinary(handle, rangeOptions, _status, (h, pb) => Library.mongocrypt_ctx_setopt_algorithm_range(h, pb));
124
+ }
125
+
125
126
  handle.Check(_status, Library.mongocrypt_ctx_setopt_algorithm(handle, encryptionAlgorithm, -1));
126
127
 
127
128
  if (queryType != null)
@@ -135,7 +136,25 @@ namespace MongoDB.Libmongocrypt
135
136
  handle.Check(_status, Library.mongocrypt_ctx_setopt_contention_factor(handle, contentionFactorInt));
136
137
  }
137
138
 
138
- PinnedBinary.RunAsPinnedBinary(handle, message, _status, (h, pb) => Library.mongocrypt_ctx_explicit_encrypt_init(h, pb));
139
+ PinnedBinary.RunAsPinnedBinary(
140
+ handle,
141
+ message,
142
+ _status,
143
+ (h, pb) =>
144
+ {
145
+ if (isExpressionMode)
146
+ {
147
+ // mongocrypt_ctx_explicit_encrypt_expression_init shares the same code as mongocrypt_ctx_explicit_encrypt_init.
148
+ // The only difference is the validation of the queryType argument:
149
+ // * mongocrypt_ctx_explicit_encrypt_expression_init requires queryType of "rangePreview".
150
+ // * mongocrypt_ctx_explicit_encrypt_init rejects queryType of "rangePreview".
151
+ return Library.mongocrypt_ctx_explicit_encrypt_expression_init(h, pb);
152
+ }
153
+ else
154
+ {
155
+ return Library.mongocrypt_ctx_explicit_encrypt_init(h, pb);
156
+ }
157
+ });
139
158
 
140
159
  return new CryptContext(handle);
141
160
  }