mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
kbx: Better error message in case of a crippled Libgcrypt.
* kbx/keybox-openpgp.c (keygrip_from_keyparm): Detect missing curve.
This commit is contained in:
parent
a3f95a29b9
commit
acafa695e1
@ -239,10 +239,18 @@ keygrip_from_keyparm (int algo, struct keyparm_s *kp, unsigned char *grip)
|
||||
}
|
||||
|
||||
if (!err && !gcry_pk_get_keygrip (s_pkey, grip))
|
||||
{
|
||||
/* Some Linux distributions remove certain curves from Libgcrypt
|
||||
* but not from GnuPG and thus the keygrip can't be computed.
|
||||
* Emit a better error message for this case. */
|
||||
if (!gcry_pk_get_curve (s_pkey, 0, NULL))
|
||||
err = gpg_error (GPG_ERR_UNKNOWN_CURVE);
|
||||
else
|
||||
{
|
||||
log_info ("kbx: error computing keygrip\n");
|
||||
err = gpg_error (GPG_ERR_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
gcry_sexp_release (s_pkey);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user