Skip to content

Signature Packet format fixes #2078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vanitasvitae
Copy link
Contributor

@vanitasvitae vanitasvitae commented May 14, 2025

This PR does:

  • Fix PGPSignature.join() to retain the signature packet length encoding format of the base signature. Previously, the merged result signature object would have its packet length format forced to LEGACY, no matter what the input signatures were encoded with. This would result in mismatches when doing comparisons between encodings in PGPainless' tests.
  • Fix PGPSignatureSubpacketGenerator.addEmbeddedSignature() to retrieve the encoding of the embedded signature in legacy format. Otherwise, signatures using the new packet length encoding format, which might have a different header length would result in broken embedded sigs, since the wrong number of header bytes would be cut stripped off.
  • Set the packet length encoding format of salted (= recently specified) signatures to the new packet format. This is done in an effort to begin phasing out producing the legacy packet length format.

Note: These changes are currently still part of #1911

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.

1 participant