Skip to content

fix: update PGP signing method to use clearsign format#172

Merged
dadav merged 1 commit intodadav:mainfrom
eranor:fix/correct-pgp-signing
Jan 28, 2026
Merged

fix: update PGP signing method to use clearsign format#172
dadav merged 1 commit intodadav:mainfrom
eranor:fix/correct-pgp-signing

Conversation

@eranor
Copy link
Copy Markdown
Contributor

@eranor eranor commented Jan 27, 2026

Fix plugin provenance signing

The sign-plugin.sh script creates invalid provenance files that fail verification:

gpg: WARNING: signature digest conflict in message
gpg: Can't check signature: General error

Root Cause

The script manually added PGP headers (-----BEGIN PGP SIGNED MESSAGE-----, Hash: SHA256), then used gpg --detach-sign to sign that content, then concatenated the result. This creates an invalid format where the signature includes the PGP headers themselves, causing hash algorithm conflicts.

Solution

Use gpg --clearsign which properly handles PGP clearsign format. This matches Helm's implementation (clearsign.Encode()).

Changes

  • Remove manual PGP headers from provenance template
  • Change from gpg --detach-sign to gpg --clearsign
  • Remove manual file concatenation

@dadav dadav merged commit 75e1e25 into dadav:main Jan 28, 2026
1 check passed
@eranor eranor deleted the fix/correct-pgp-signing branch January 28, 2026 22:26
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