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>
This commit is contained in:
Werner Koch 2014-10-08 21:40:34 +02:00
parent 0c52bfa395
commit 3ae6afc133
1 changed files with 2 additions and 1 deletions

View File

@ -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