mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02: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
@ -240,8 +240,16 @@ keygrip_from_keyparm (int algo, struct keyparm_s *kp, unsigned char *grip)
|
|||||||
|
|
||||||
if (!err && !gcry_pk_get_keygrip (s_pkey, grip))
|
if (!err && !gcry_pk_get_keygrip (s_pkey, grip))
|
||||||
{
|
{
|
||||||
log_info ("kbx: error computing keygrip\n");
|
/* Some Linux distributions remove certain curves from Libgcrypt
|
||||||
err = gpg_error (GPG_ERR_GENERAL);
|
* 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);
|
gcry_sexp_release (s_pkey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user