Skip to content
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

Implement OpenPGP Packet Criticality #1422

Closed
wants to merge 5 commits into from

Conversation

vanitasvitae
Copy link
Contributor

The upcoming OpenPGP v6 specification introduces the concept of Packet Criticality based on packet tags.

This PR adds support for packet criticality by adding getPacketTag() to the Packet class.
Further, it introduces a dedicated UnknownPacket class to improve forwards compatibility with future revisions of the standard, as well as a dedicated ReservedPacket class.

@vanitasvitae vanitasvitae mentioned this pull request Jun 13, 2023
50 tasks
@vanitasvitae
Copy link
Contributor Author

OpenPGP v6 implementations would set pgpObjectFactory.setThrowForUnknownCriticalPackets(true);, such that unknown critical packets automatically cause an IOException to be thrown.
If this flag is not set, the object factory will instead return an UnknownPacket object which the user can further consume.

@dghgit dghgit self-assigned this Jul 17, 2023
@dghgit
Copy link
Contributor

dghgit commented Jul 18, 2023

Thanks for the patch. Merged with some changes (trying to preserve API compatibility). This is also now published on https://www.bouncycastle.org/betas 176b05 or later.

@dghgit dghgit closed this Jul 18, 2023
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Aug 1, 2023
…of AESEngine.newInstance() to allow for JNI support in LTS.
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Aug 1, 2023
@vanitasvitae vanitasvitae deleted the packetCriticality branch September 17, 2024 12:58
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