Skip to content

Commit bd6c238

Browse files
Libmongocrypt version 1.14.0
1 parent 4f98bab commit bd6c238

File tree

260 files changed

+4484
-2429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+4484
-2429
lines changed

ext/libmongocrypt/libmongocrypt/.evergreen/config.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ functions:
306306
script: |
307307
set -ex
308308
cd ./libmongocrypt/bindings/python
309-
PYTHON=${PYTHON} ./release.sh
309+
PYTHON=${PYTHON} ./scripts/release.sh
310310
311311
"upload python release":
312312
- command: archive.targz_pack
@@ -383,10 +383,7 @@ functions:
383383
script: |
384384
# Authenticate to artifactory.
385385
echo "${artifactory_password}" | docker login --password-stdin --username "${artifactory_username}" artifactory.corp.mongodb.com
386-
# TODO(MONGOCRYPT-747): remove `--persist-build=false`.
387-
# Pass `--persist-build=false` to avoid using Docker Hub.
388-
# Earthly hardcodes use of docker/dockerfile-copy:v0.1.9 for the CACHE command.
389-
bash ${workdir}/libmongocrypt/.evergreen/earthly.sh ${args} --persist-build=false
386+
bash ${workdir}/libmongocrypt/.evergreen/earthly.sh ${args}
390387
391388
sbom:
392389
- command: ec2.assume_role
@@ -967,8 +964,6 @@ tasks:
967964
shell: bash
968965
script: |-
969966
set -o errexit
970-
# Authenticate to artifactory for signing image.
971-
echo "${artifactory_password}" | docker login --password-stdin --username "${artifactory_username}" artifactory.corp.mongodb.com
972967
# Copy file to sign into `libmongocrypt` directory to be used by Earthly.
973968
cp libmongocrypt_upload.tar.gz libmongocrypt
974969
- func: "earthly" # Sign tarball.

ext/libmongocrypt/libmongocrypt/.evergreen/earthly.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ fi
4848

4949
chmod a+x "$exe_path"
5050

51-
"$exe_path" --buildkit-image "artifactory.corp.mongodb.com/dockerhub/earthly/buildkitd:v${EARTHLY_VERSION}" "$@"
51+
"$exe_path" "$@"

ext/libmongocrypt/libmongocrypt/.github/workflows/codeql-actions.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
workflow_dispatch:
1111
schedule:
1212
- cron: '17 10 * * 2'
13+
workflow_call:
14+
inputs:
15+
ref:
16+
required: true
17+
type: string
1318

1419
jobs:
1520
analyze-python:
@@ -27,18 +32,19 @@ jobs:
2732
uses: actions/checkout@v4
2833
with:
2934
fetch-depth: 0
35+
ref: ${{ inputs.ref }}
3036
persist-credentials: false
3137

3238
# Initializes the CodeQL tools for scanning.
3339
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v3
40+
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3
3541
with:
3642
languages: actions
3743
build-mode: none
3844
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
3945
queries: security-extended
4046

4147
- name: Perform CodeQL Analysis
42-
uses: github/codeql-action/analyze@v3
48+
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3
4349
with:
4450
category: "/language:actions"

ext/libmongocrypt/libmongocrypt/.github/workflows/codeql-python.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
45+
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3
4646
with:
4747
languages: python
4848
build-mode: none
@@ -55,12 +55,12 @@ jobs:
5555
- name: Install package
5656
run: |
5757
cd bindings/python
58-
export LIBMONGOCRYPT_VERSION=$(cat ./libmongocrypt-version.txt)
58+
export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt)
5959
git fetch origin $LIBMONGOCRYPT_VERSION
60-
bash release.sh
60+
bash ./scripts/release.sh
6161
pip install dist/*.whl
6262
6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@v3
64+
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3
6565
with:
6666
category: "/language:python"

ext/libmongocrypt/libmongocrypt/.github/workflows/dist-python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454

5555
- name: Build and test dist files
5656
run: |
57-
export LIBMONGOCRYPT_VERSION=$(cat ./libmongocrypt-version.txt)
57+
export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt)
5858
git fetch origin $LIBMONGOCRYPT_VERSION
59-
bash ./release.sh
59+
bash ./scripts/release.sh
6060
6161
- uses: actions/upload-artifact@v4
6262
with:

ext/libmongocrypt/libmongocrypt/.github/workflows/release-python.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Python Release
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
7-
description: "The new version to set"
8-
required: true
96
following_version:
107
description: "The post (dev) version to set"
118
dry_run:
@@ -24,7 +21,6 @@ env:
2421
# to 'false' when the input is set to 'false'.
2522
DRY_RUN: ${{ ! contains(inputs.dry_run, 'false') }}
2623
FOLLOWING_VERSION: ${{ inputs.following_version || '' }}
27-
VERSION: ${{ inputs.version || '10.10.10.10' }}
2824

2925
defaults:
3026
run:
@@ -54,7 +50,6 @@ jobs:
5450
- uses: mongodb-labs/drivers-github-tools/python/pre-publish@v2
5551
id: pre-publish
5652
with:
57-
version: ${{ env.VERSION }}
5853
working_directory: ./bindings/python
5954
dry_run: ${{ env.DRY_RUN }}
6055
tag_template: "pymongocrypt-${VERSION}"
@@ -66,14 +61,20 @@ jobs:
6661
with:
6762
ref: ${{ needs.pre-publish.outputs.version }}
6863

69-
static-scan:
64+
static-python:
7065
needs: [pre-publish]
7166
uses: ./.github/workflows/codeql-python.yml
7267
with:
7368
ref: ${{ needs.pre-publish.outputs.version }}
7469

70+
static-actions:
71+
needs: [pre-publish]
72+
uses: ./.github/workflows/codeql-actions.yml
73+
with:
74+
ref: ${{ needs.pre-publish.outputs.version }}
75+
7576
publish:
76-
needs: [build-dist, static-scan]
77+
needs: [build-dist, static-python, static-actions]
7778
name: Upload release to PyPI
7879
runs-on: ubuntu-latest
7980
environment: release-python
@@ -86,14 +87,14 @@ jobs:
8687
name: all-dist-${{ github.run_id }}
8788
path: dist/
8889
- name: Publish package distributions to TestPyPI
89-
uses: pypa/gh-action-pypi-publish@release/v1
90+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
9091
with:
9192
repository-url: https://test.pypi.org/legacy/
9293
skip-existing: true
9394
attestations: ${{ env.DRY_RUN }}
9495
- name: Publish package distributions to PyPI
9596
if: startsWith(env.DRY_RUN, 'false')
96-
uses: pypa/gh-action-pypi-publish@release/v1
97+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
9798

9899
post-publish:
99100
needs: [publish]
@@ -117,7 +118,6 @@ jobs:
117118
artifactory_username: ${{ vars.ARTIFACTORY_USERNAME }}
118119
- uses: mongodb-labs/drivers-github-tools/python/post-publish@v2
119120
with:
120-
version: ${{ env.VERSION }}
121121
following_version: ${{ env.FOLLOWING_VERSION }}
122122
working_directory: ./bindings/python
123123
product_name: ${{ env.PRODUCT_NAME }}

ext/libmongocrypt/libmongocrypt/.github/workflows/test-python.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
if: github.repository_owner == 'mongodb'
4141
runs-on: ${{ matrix.os }}
4242
strategy:
43+
fail-fast: false
4344
matrix:
4445
os: [ubuntu-latest, windows-latest, macos-latest]
4546
python-version: ["3.8", "3.13"]
@@ -59,6 +60,6 @@ jobs:
5960
if [ "${{ matrix.python-version }}" == "3.13" ]; then
6061
export PIP_PRE=1
6162
fi
62-
export LIBMONGOCRYPT_VERSION=$(cat ./libmongocrypt-version.txt)
63+
export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt)
6364
git fetch origin $LIBMONGOCRYPT_VERSION
64-
bash ./release.sh
65+
bash ./scripts/release.sh

ext/libmongocrypt/libmongocrypt/.github/workflows/zizmor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
with:
2020
persist-credentials: false
2121
- name: Setup Rust
22-
uses: actions-rust-lang/setup-rust-toolchain@v1
22+
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1
2323
- name: Get zizmor
2424
run: cargo install zizmor
2525
- name: Run zizmor
2626
run: zizmor --format sarif . > results.sarif
2727
env:
2828
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
- name: Upload SARIF file
30-
uses: github/codeql-action/upload-sarif@v3
30+
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3
3131
with:
3232
sarif_file: results.sarif
3333
category: zizmor

ext/libmongocrypt/libmongocrypt/.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ repos:
5353
language: system
5454
types: [shell]
5555

56+
- repo: local
57+
hooks:
58+
- id: synchro
59+
name: synchro
60+
entry: bash ./bindings/python/scripts/synchro.sh
61+
language: python
62+
require_serial: true
63+
fail_fast: true
64+
additional_dependencies:
65+
- ruff==0.1.3
66+
- unasync
67+
5668
- repo: https://github.com/astral-sh/ruff-pre-commit
5769
# Ruff version.
5870
rev: v0.1.3

ext/libmongocrypt/libmongocrypt/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# ChangeLog
2+
## 1.14.0
3+
### Fixed
4+
- Fix building against libbson with extra alignment enabled (`ENABLE_EXTRA_ALIGNMENT=ON`).
5+
- Retry KMS encrypt request for context created by `mongocrypt_ctx_rewrap_many_datakey_init`.
6+
### Improvements
7+
- Improve performance of OpenSSL crypto operations.
8+
- Improve error for incorrect path to crypt_shared library.
9+
210
## 1.13.2
311
### Notes
412
- Bump downloaded libbson version from 1.28.1 to 1.30.3. Fixes a CMake configure error on macOS with CMake 4.

ext/libmongocrypt/libmongocrypt/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ set (MONGOCRYPT_SOURCES
108108
src/mc-fle2-encryption-placeholder.c
109109
src/mc-fle2-find-equality-payload.c
110110
src/mc-fle2-find-equality-payload-v2.c
111+
src/mc-fle2-find-text-payload.c
111112
src/mc-fle2-payload-iev.c
112113
src/mc-fle2-payload-iev-v2.c
113114
src/mc-fle2-payload-uev.c
114115
src/mc-fle2-payload-uev-common.c
115116
src/mc-fle2-payload-uev-v2.c
116117
src/mc-fle2-rfds.c
117118
src/mc-fle2-tag-and-encrypted-metadata-block.c
119+
src/mc-parse-utils.c
118120
src/mc-range-edge-generation.c
119121
src/mc-range-mincover.c
120122
src/mc-range-encoding.c
@@ -469,6 +471,7 @@ set (TEST_MONGOCRYPT_SOURCES
469471
test/test-mc-fle2-encryption-placeholder.c
470472
test/test-mc-fle2-find-equality-payload-v2.c
471473
test/test-mc-fle2-find-range-payload-v2.c
474+
test/test-mc-fle2-find-text-payload.c
472475
test/test-mc-fle2-payload-iev.c
473476
test/test-mc-fle2-payload-iev-v2.c
474477
test/test-mc-fle2-payload-iup.c
@@ -533,6 +536,8 @@ target_compile_definitions (test-mongocrypt PRIVATE
533536
"TEST_MONGOCRYPT_OUTPUT_PATH=\"$<TARGET_FILE:test-mongocrypt>\""
534537
# Tell test-mongocrypt whether we have a real csfle library for testing
535538
TEST_MONGOCRYPT_HAVE_REAL_CRYPT_SHARED_LIB=$<BOOL:${MONGOCRYPT_TESTING_CRYPT_SHARED_FILE}>
539+
# Tell test-mongocrypt the path of the libmongocrypt shared library for testing.
540+
"TEST_MONGOCRYPT_MONGOCRYPT_SHARED_PATH=\"$<TARGET_FILE:mongocrypt>\""
536541
)
537542

538543
add_test (
@@ -712,4 +717,3 @@ install (
712717
COMPONENT
713718
Devel
714719
)
715-
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Code Owners will automatically be added as reviewers on PRs
22

3+
# Listing code owners is required by DRIVERS-3098
4+
* @mongodb/dbx-c-cxx
5+
36
# Python Bindings
4-
bindings/python @mongodb/dbx-python
7+
bindings/python @mongodb/dbx-python

0 commit comments

Comments
 (0)