Repository navigation
Conversation
Switch github.com/sassoftware/go-rpmutils to the github.com/M0Rf30/go-rpmutils fork. Upstream SignRpmStream wrote v4 signatures (RSA header + PGP header+payload, tags illegal in a v6 signature header) into format-6 packages built by rpm 6; the fork signs them like rpmsign 6 with an OPENPGP header signature and keeps the RESERVED tag and signature-header size. It also verifies v6 packages (payload digests without PAYLOADDIGESTALGO, OPENPGP signatures) and reads stripped cpio payloads correctly. Tests cover a format-6 fixture built by rpm 6.0.1 and cross-check with rpm -K when rpm 6 is installed.
Coverage
Go by area
Web by area (lines)
|
Collaborator
Author
|
Superseded by the pkgformat migration PR, which includes this RPM v6 signing work. |
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.
Problem
pkg/rpmsignre-signs uploads withsassoftware/go-rpmutilsSignRpmStream, which always writes v4 signatures (RSA header + PGP header+payload). On format-6 packages built by rpm 6 (_rpmformat 6) those tags are ignored or illegal (tags >999 are forbidden in a v6 signature header), so the result is not a valid v6 signature. Upstream go-rpmutils also cannot verify v6 packages (noPAYLOADDIGESTALGOin v6, OPENPGP tag not read) and mis-reads stripped cpio payloads.Change
github.com/sassoftware/go-rpmutilswith thegithub.com/M0Rf30/go-rpmutilsfork (feat: RPM v6 support; rename module to github.com/M0Rf30/go-rpmutils M0Rf30/go-rpmutils#1 merged, feat: sign RPM v6 packages M0Rf30/go-rpmutils#2 for v6 signing). The API is unchanged; only the import path changes.pkg/rpmsign/testdata/hello-v6.rpm(same spec,--define _rpmformat 6, rpm 6.0.1).Verification
TestSignProducesAVerifiablePackage,TestSigningTwiceReplacesTheSignatureandTestSignedPackagePassesRpmChecknow run on both formats; therpm -Kcross-check passes for v4 and v6 with rpm 6.0.1 (v6 skipped on rpm < 6).go test ./pkg/rpmsign/ ./pkg/rpm/ ./tests/pass;golangci-lint0 issues on touched packages;reuse lintcompliant.Before merge
go.mod pins the fork at the head of M0Rf30/go-rpmutils#2 (
ad938e1); merge that PR first and re-pin to its merge commit if squashed.