Skip to content

Commit dc9c67e

Browse files
committed
debt: Modify README with how AES-CTR-DRBG is used when FIPS mode is enabled.
1 parent abde1f5 commit dc9c67e

4 files changed

Lines changed: 42 additions & 14 deletions

File tree

CHANGELOG/CHANGELOG-1.x.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Date format: `YYYY-MM-DD`
1919

2020
---
2121

22-
## [1.14.2] - 2025-11-21
22+
## [1.14.3] - 2025-11-21
2323

2424
### Added
2525
- **debt:** Modify README with how AES-CTR-DRBG is used when FIPS mode is enabled.
@@ -261,8 +261,8 @@ Date format: `YYYY-MM-DD`
261261
### Fixed
262262
### Security
263263

264-
[Unreleased]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.14.2...HEAD
265-
[1.14.2]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.14.1...v1.14.2
264+
[Unreleased]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.14.3...HEAD
265+
[1.14.3]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.14.1...v1.14.3
266266
[1.14.1]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.14.0...v1.14.1
267267
[1.14.0]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.13.0...v1.14.0
268268
[1.13.0]: https://github.com/sixafter/aes-ctr-drbg/compare/v1.12.0...v1.13.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ release-verify: ## Verify the release
100100

101101
.PHONY: module-verify
102102
module-verify: ## Verify Go module integrity
103-
@scripts/verify-mod.sh
103+
@TAG=$(TAG) scripts/verify-mod.sh
104104

105105
.PHONY: signature-verify
106106
signature-verify: ## Verify latest release's digital signatures

scripts/verify-mod.sh

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
#
44
# This source code is licensed under the Apache 2.0 License found in the
55
# LICENSE file in the root directory of this source tree.
6+
#!/bin/bash
7+
# Copyright (c) 2024-2025 Six After, Inc.
8+
#
9+
# This source code is licensed under the Apache 2.0 License found in the
10+
# LICENSE file in the root directory of this source tree.
611
set -e
712

813
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -18,17 +23,29 @@ fi
1823
mkdir -p tmp
1924
rm tmp/*.zip 2>/dev/null || true
2025

21-
# ------------------------------------------------------------
22-
# Detect latest release (README method)
23-
# ------------------------------------------------------------
2426
REPO_OWNER="sixafter"
2527
REPO_NAME="aes-ctr-drbg"
2628
MODULE="github.com/${REPO_OWNER}/${REPO_NAME}"
2729

28-
TAG=$(curl -s "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest" | jq -r .tag_name)
29-
VERSION=${TAG#v}
30+
# ------------------------------------------------------------
31+
# TAG selection logic:
32+
# If TAG environment variable is provided, use it.
33+
# Otherwise default to latest GitHub release (current behavior).
34+
# ------------------------------------------------------------
35+
if [ -n "${TAG:-}" ]; then
36+
echo "Using provided TAG: ${TAG}"
37+
else
38+
echo "No TAG provided, detecting latest GitHub release..."
39+
TAG=$(curl -s "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest" | jq -r .tag_name)
40+
if [ -z "$TAG" ] || [ "$TAG" = "null" ]; then
41+
echo "[ERROR] Could not detect latest release tag from GitHub." >&2
42+
exit 1
43+
fi
44+
fi
3045

31-
echo "Latest release: $TAG (version: $VERSION)"
46+
VERSION=${TAG#v}
47+
echo "Verifying tag: $TAG (version: $VERSION)"
48+
echo
3249

3350
# ------------------------------------------------------------
3451
# Portable SHA-256 function (macOS + Linux)
@@ -40,7 +57,7 @@ else
4057
fi
4158

4259
# ------------------------------------------------------------
43-
# 1. GitHub Tag ZIP
60+
# 1. GitHub Tag ZIP (Human-facing)
4461
# ------------------------------------------------------------
4562
echo "Downloading GitHub tag archive..."
4663
curl -sSfL -o tmp/github.zip \
@@ -87,9 +104,20 @@ echo "go mod : $GOMOD_SHA"
87104
echo "Proxy : $PROXY_SHA"
88105
echo
89106

90-
if [ "$GITHUB_SHA" != "$GOMOD_SHA" ] || [ "$GITHUB_SHA" != "$PROXY_SHA" ]; then
91-
echo "ERROR: CHECKSUM MISMATCH DETECTED!"
107+
# The authoritative comparison: direct vs proxy
108+
if [ "$GOMOD_SHA" != "$PROXY_SHA" ]; then
109+
echo "[ERROR] Go module ZIP mismatch between direct and proxy!"
92110
exit 1
93111
fi
94112

113+
echo "✔ Go module ZIP is consistent across direct and proxy."
114+
115+
# GitHub tag ZIP is informational (not authoritative)
116+
if [ "$GITHUB_SHA" != "$GOMOD_SHA" ]; then
117+
echo "⚠ WARNING: GitHub's UI ZIP does NOT match the Go module ZIP."
118+
echo " This is normal: GitHub generates tag archives separately."
119+
else
120+
echo "✔ GitHub tag ZIP matches module ZIP (rare but OK)."
121+
fi
122+
95123
echo "Go module archive is fully reproducible across GitHub, direct, and proxy."

scripts/verify-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ if is_windows; then
1919
fi
2020

2121
rm -fr dist
22-
goreleaser --config .goreleaser.yaml release --snapshot
22+
goreleaser --config .goreleaser.yaml release --snapshot --skip=publish

0 commit comments

Comments
 (0)