8000 Signature Packet format fixes by vanitasvitae · Pull Request #2078 · bcgit/bc-java · GitHub
[go: up one dir, main page]

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

Closed
wants to merge 3 commits into 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

@ligefeiBouncycastle ligefeiBouncycastle self-requested a review May 20, 2025 06:39
hubot pushed a commit that referenced this pull request May 25, 2025
hubot pushed a commit that referenced this pull request May 25, 2025
Signature Packet format fixes #2078

See merge request root/bc-java!98
@ligefeiBouncycastle
Copy link
Collaborator

Thank you for this PR. The code has been merged by c70e8cd

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
0