diff options
-rw-r--r-- | lang/cpp/src/key.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index d621a81e..4f7ec54b 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -341,7 +341,12 @@ void Key::update() KeyListMode::Validate | KeyListMode::WithTofu); Error err; - auto newKey = ctx->key(primaryFingerprint(), err, hasSecret()); + auto newKey = ctx->key(primaryFingerprint(), err, true); + // Not secret so we get the information from the pubring. + if (newKey.isNull()) + { + newKey = ctx->key(primaryFingerprint(), err, false); + } delete ctx; if (err) { return; |