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

Allow population of PGPSignatureSubpacketGenerator from given PGPSign… #848

Closed
wants to merge 1 commit into from

Conversation

vanitasvitae
Copy link
Contributor

…atureSubpacketVector

Hey :)
I'm struggling to extend the expiration date of a keyring while preserving the signature subpackets of the previous self-signature.
This PR allows for the PGPSignatureSubpacketGenerator to be prepopulated with subpackets of a given PGPSignatureSubpacketVector.
I also prevent some packet types from being added into the vector multiple times where it makes sense to prevent this.
This is being done by switching from an ominous list of subpackets to members for the different subpacket types.

The changes are aimed to be as backwards compatible as possible, so where the name of a method doesn't match what it does (the case with some setters) I deprecated the unsuitable method and forward method calls to a method that is more suitably named.

Let me know what you think of this change or if I can improve it somehow.

@vanitasvitae vanitasvitae marked this pull request as ready for review December 5, 2020 15:32
@vanitasvitae
Copy link
Contributor Author

Regarding the now deprecated methods: Should I add another commit that changes calls to those methods from inside bouncycastle to instead call their replacements?

@dghgit
Copy link
Contributor

dghgit commented Dec 14, 2020

I've done a merge and edit on this. The basic idea is a good one, as are a lot of the method name changes - I think we're stuck with the list though as it allows people to define the order packets appear in, I think the principal thing missing is the ability to remove packets from the generator. The code should be appearing on github shortly. Note I also added hashCode() and equals() to SignatureSubpacket.

vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Dec 27, 2020
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Dec 27, 2020
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Dec 27, 2020
@vanitasvitae vanitasvitae deleted the subpackets branch September 17, 2024 12:57
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