build: minor error handling tweak for v2 pem signing
What changed, and why it matters
This is a tiny build-script change that replaces a silent failure with a clear error message when required signing key files are missing. It does not change what the script does, only what it prints when it fails. There is no security vulnerability here.
No action needed. This is a benign, non-security build-script refinement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies release/scripts/v2sign.sh so that two file-existence checks now print a descriptive message and exit with code 2, instead of just running ‘false’ (which also exits non-zero but silently). The control flow and failure outcome are unchanged: the script still aborts immediately if PUBKEY or KEY is absent. This is a pure UX/logging improvement in release tooling.
Changed components
release/scripts/v2sign.shInspect captured patch +2 / −2
diff --git a/release/scripts/v2sign.sh b/release/scripts/v2sign.sh
index 59bc3b0..44b9f3f 100755
--- a/release/scripts/v2sign.sh
+++ b/release/scripts/v2sign.sh
@@ -28,8 +28,8 @@ VERIFY_OPTS="-pubin -inkey ${PUBKEY} -pkeyopt digest:sha256 -pkeyopt rsa_padding
pushd "${WORKING_DIR}"
-[ -f ${PUBKEY} ] || false # Public key file must exist
-[ -f ${KEY} ] || false # Private key file must exist
+[ -f ${PUBKEY} ] || (echo "Public key file ${PUBKEY} not found" && exit 2)
+[ -f ${KEY} ] || (echo "Private key file ${KEY} not found" && exit 2)
# Verify bootloaders are same
sha1=$(sha256sum "${BLEDIR}/bootloader/bootloader.bin" | cut -d\ -f1)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.