Skip to content

Commit 8d42c57

Browse files
[3.12] gh-99108: Update and check HACL* version information (GH-117295) (GH-117302)
gh-99108: Update and check HACL* version information (GH-117295) (cherry picked from commit 669ef49) Co-authored-by: Seth Michael Larson <[email protected]>
1 parent 17a82a1 commit 8d42c57

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Misc/sbom.spdx.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/build/generate_sbom.py

+14
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,20 @@ def check_sbom_packages(sbom_data: dict[str, typing.Any]) -> None:
183183
),
184184
)
185185

186+
# HACL* specifies its expected rev in a refresh script.
187+
if package["name"] == "hacl-star":
188+
hacl_refresh_sh = (CPYTHON_ROOT_DIR / "Modules/_hacl/refresh.sh").read_text()
189+
hacl_expected_rev_match = re.search(
190+
r"expected_hacl_star_rev=([0-9a-f]{40})",
191+
hacl_refresh_sh
192+
)
193+
hacl_expected_rev = hacl_expected_rev_match and hacl_expected_rev_match.group(1)
194+
195+
error_if(
196+
hacl_expected_rev != version,
197+
"HACL* SBOM version doesn't match value in 'Modules/_hacl/refresh.sh'"
198+
)
199+
186200
# License must be on the approved list for SPDX.
187201
license_concluded = package["licenseConcluded"]
188202
error_if(

0 commit comments

Comments
 (0)