Repository navigation
deps: bump ProtonMail/go-crypto to v1.5.2 (#82) - #87
Merged
Merged
Conversation
…oad check go-crypto v1.2.0 and later follow RFC 9580 section 7.1: clearsign Block.Plaintext excludes the line ending before the signature armor. verifyReleaseSignatures compared Plaintext with Release byte for byte, so every prior signed generation would fail the reuse check and be re-signed. Compare Plaintext plus one LF, the payload apt reads, as before. Add gpg_compat_test.go: every signature kind verifies with gpg, gpgv, sqv and go-crypto for LF, CRLF, with and without a final newline, and a dash-escaped line; Release.gpg stays a v4 binary SHA-512 signature. Closes #82
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Author
|
Cross-review (reviewer |
bketelsen
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #82.
Why
go.modpinnedgithub.com/ProtonMail/go-cryptoat v1.0.0. From v1.2.0,clearsign.Decodefollows RFC 9580 section 7.1:Block.Plaintextno longer ends with the line ending before the signature armor.getLineis unchanged (a CR before LF is still removed).The signing path itself does not change:
InReleaseand the binary.sigfiles still come from the gpg CLI, andRelease.gpgfrom go-cryptoArmoredDetachSign. The one break was the verifier:verifyReleaseSignaturescomparedPlaintextwithReleasebyte for byte. With the bump alone, every prior signed generation would fail the reuse check and be re-signed (TestVerifyReleaseSignaturesfails).Change
internal/generator/deb/release_signature.go: newclearsignedPayload=Plaintext+ one LF, the payload apt reads. The check behaves exactly as with v1.0.0. A Release without a final LF stays rejected (new test case).internal/signer/gpg_compat_test.go: for LF, CRLF, with and without a final newline, and a dash-escaped line, every signature kind (SignCleartext,SignDetached,SignDetachedBinary,SignDetachedBinaryFromFile) verifies withgpg --verifyand go-crypto.gpgvandsqv(the apt verifiers) also run when installed. Each subtest skips when its tool is missing; CI may lack them, and both ran locally. Also:InReleasecleartext section (dash-unescaped, LF-split) equals the input byte for byte when the input ends with LF.Release.gpgis still a v4, binary-mode, SHA-512 signature.x(gpg and Go), and CRLF data made LF-only (Go).docs/specs/generators.md(payload rule),docs/design/overview.md, and a "Verified by" reference in ADR-0009. The split in ADR-0009 does not change..github/dependabot.ymlis unchanged.Checks (local)
make build,make fmt,make lint(0 issues),go test -race -short ./..., govulncheck v1.9.0 (no vulnerabilities),node scripts/check-docs.mjs. The compat test runs 56 subtests with no skips here (gpg 2.4.7, gpgv, sqv).No release: tagging stays with Brian.