Skip to content

Parse RSA header tag for signature info#58

Merged
knqyf263 merged 3 commits into
knqyf263:masterfrom
anchore:add-signatures
May 19, 2025
Merged

Parse RSA header tag for signature info#58
knqyf263 merged 3 commits into
knqyf263:masterfrom
anchore:add-signatures

Conversation

@wagoodman
Copy link
Copy Markdown
Contributor

Today there is PGP processing that reads RPMTAG_PGP and populates the PGP field, however the RPMTAG_RSAHEADER is ignored. Moving forward we should expect to see the PGP tag really only being used for legacy cases while the newer RSAHEADER tag to be used more reliably. This PR does not remove the old field or processing but instead adds the PackageInfo.RSAHeader field and applies the same PGP parsing logic that is there today. The only other alteration done was to key PGP v4 vs older shapes based off of a version range check instead of a hardcoded value (otherwise newer versions as used in rockylinux 9 will default to the older pgp data shape).

  • By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wagoodman
Copy link
Copy Markdown
Contributor Author

wagoodman commented May 15, 2025

One question I have about this is the ability to get the raw header out (instead of the summarized RSA/SHA1, Tues May 2, ... strings), which would enable signature verification -- is there any interest in adding that as an option?

Copy link
Copy Markdown
Owner

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thanks!

@knqyf263 knqyf263 merged commit 7e39c90 into knqyf263:master May 19, 2025
3 checks passed
@knqyf263
Copy link
Copy Markdown
Owner

One question I have about this is the ability to get the raw header out (instead of the summarized RSA/SHA1, Tues May 2, ... strings), which would enable signature verification -- is there any interest in adding that as an option?

It sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants