summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-10-08 21:40:34 +0200
committerWerner Koch <wk@gnupg.org>2014-10-08 21:43:28 +0200
commit3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97 (patch)
tree1d941ab4446b0945d4d034c8212ec9f38bce93ad
parentdoc: Minor fix. (diff)
downloadgnupg2-3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97.tar.xz
gnupg2-3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97.zip
gpg: Avoid error exit if keygrip computations fails in a key listing.
* g10/keyid.c (keygrip_from_pk): Use log_info and clear array on error. -- This may happen due to algorithms or curves not supported by Libgcrypt. We should only print a warning and not have gpg return with failure for a secret key listing. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--g10/keyid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keyid.c b/g10/keyid.c
index 94900bd73..3b4c10c65 100644
--- a/g10/keyid.c
+++ b/g10/keyid.c
@@ -854,7 +854,8 @@ keygrip_from_pk (PKT_public_key *pk, unsigned char *array)
if (!gcry_pk_get_keygrip (s_pkey, array))
{
- log_error ("error computing keygrip\n");
+ log_info ("error computing keygrip\n");
+ memset (array, 0, 20);
err = gpg_error (GPG_ERR_GENERAL);
}
else