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

Encryption with the latest subkey not possible #210

Open
gree1502 opened this issue Apr 19, 2023 · 1 comment
Open

Encryption with the latest subkey not possible #210

gree1502 opened this issue Apr 19, 2023 · 1 comment

Comments

@gree1502
Copy link

Hi,
We have a requirement where the new subkey is created by the vendor and current subkey is valid until June 1st. I have exported the public.asc file. I do see
1 primary key - flagged as certify.
1 subkey - flagged as encrypt (current - expires june 1st)
1 subkey - flagged as encrypt (new - expires after 2 years)
After exporting the new public key provided by the vendor, the PGP library encrypts with current subkey instead of new one. Is there a functionality where I can specify which subkey to use or use the latest subkey based on date the subkey was created?

Screenshot 2023-04-19 155342

@mattosaurus
Copy link
Owner

Hi, unfortunately this isn't possible at the moment.

The code that picks the correct key to use at the moment is essentially a fixed hierarchy and doesn't take account of expiry dates.

I'm planning to update this to allow a subkey to be specified by ID as well but haven't started on this yet. Taking account of expiry dates would also be a good option.

Feel free to submit a PR with these changes, otherwise I'll do them when I get a chance.

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

No branches or pull requests

2 participants