aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-06-11 10:41:51 +0000
committerWerner Koch <[email protected]>2024-06-11 10:44:25 +0000
commitc489bf7e7e9fa96db46544edc2ae8bb59f0d340f (patch)
treed03a6d2aec73d303c4de08bc50441cd8ee4a226a
parentgpg: Do not show RENC if no key capabilities are found for a key. (diff)
downloadgnupg-c489bf7e7e9fa96db46544edc2ae8bb59f0d340f.tar.gz
gnupg-c489bf7e7e9fa96db46544edc2ae8bb59f0d340f.zip
gpg: Do not bail out on secret keys with an unknown algo
* g10/getkey.c (lookup): Skip keys with unknown algos. -- If the local store has private keys with an algorithm not supported by thi version of gpg, gpg used to bail out. Thus decryption of proper messages was not possible. This fix skips such secret keys.
-rw-r--r--g10/getkey.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 41e39a0d9..ebed43abb 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -4008,6 +4008,8 @@ lookup (ctrl_t ctrl, getkey_ctx_t ctx, int want_secret,
rc = agent_probe_any_secret_key (NULL, keyblock);
if (gpg_err_code(rc) == GPG_ERR_NO_SECKEY)
goto skip; /* No secret key available. */
+ if (gpg_err_code (rc) == GPG_ERR_PUBKEY_ALGO)
+ goto skip; /* Not implemented algo - skip. */
if (rc)
goto found; /* Unexpected error. */
}