Fix signing failure after importing public key with updated expiry#2384
Open
kaie wants to merge 2 commits into
Open
Fix signing failure after importing public key with updated expiry#2384kaie wants to merge 2 commits into
kaie wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2384 +/- ##
=======================================
Coverage 85.46% 85.46%
=======================================
Files 126 126
Lines 22711 22717 +6
=======================================
+ Hits 19409 19415 +6
Misses 3302 3302 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When importing an updated public key, sync it into the secring if a matching secret key exists, so the secring reflects the new expiration and signing succeeds. Fixes: rnpgp#2383 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1265348 to
8eb3ed8
Compare
kaie
commented
May 20, 2026
| // public key was new or updated: sync into secring if a secret key exists there | ||
| auto *expub = ffi->pubring->get_key(key.fp()); | ||
| if (expub && ffi->secring->get_key(key.fp())) { | ||
| ffi->secring->import_key(*expub, true); |
Contributor
Author
There was a problem hiding this comment.
Is it necessary to minimize the public key, strip attributes from it, prior to importing it into secring?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When importing an updated public key, sync it into the secring if a matching secret key exists, so the secring reflects the new expiration and signing succeeds.
Fixes: #2383