1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-10 21:38:50 +01:00

agent: When diverting to a card show the name of unsupported algos.

* agent/divert-scd.c (divert_pkdecrypt): Improve error message.
This commit is contained in:
Werner Koch 2024-08-09 10:08:50 +02:00
parent 8735b87411
commit 1d18c143f4
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -468,7 +468,20 @@ divert_pkdecrypt (ctrl_t ctrl,
n = snext (&s); n = snext (&s);
} }
else else
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM); {
if (opt.verbose)
{
if (smatch (&s, n, "elg"))
log_info ("unknown algorithm is \"elg\"\n");
else if (smatch (&s, n, "dsa"))
log_info ("unknown algorithm is \"dsa\"\n");
else if (smatch (&s, n, "kyber"))
log_info ("unknown algorithm is \"kyber\"\n");
else
log_printhex (s, n, "unknown algorithm is");
}
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
}
if (!n) if (!n)
return gpg_error (GPG_ERR_UNKNOWN_SEXP); return gpg_error (GPG_ERR_UNKNOWN_SEXP);