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 5d8bc309c7
commit 6fa4d7973d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -467,7 +467,20 @@ divert_pkdecrypt (ctrl_t ctrl,
n = snext (&s);
}
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)
return gpg_error (GPG_ERR_UNKNOWN_SEXP);