diff options
author | Werner Koch <wk@gnupg.org> | 2014-10-08 21:40:34 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-10-08 21:43:28 +0200 |
commit | 3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97 (patch) | |
tree | 1d941ab4446b0945d4d034c8212ec9f38bce93ad | |
parent | doc: Minor fix. (diff) | |
download | gnupg2-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.c | 3 |
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 |