1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

agent: Return NO_SECKEY instead of ENONET for PKSIGN and others.

* agent/pksign.c (agent_pksign_do): Replace ENONET by NO_SECKEY.
* agent/findkey.c (agent_key_from_file): No diagnostic for NO_SECKEY.
* agent/pkdecrypt.c (agent_pkdecrypt): Replace checking for ENOENT.
This commit is contained in:
Werner Koch 2014-08-18 15:42:54 +02:00
parent 3259862cb4
commit 3981ff15f3
4 changed files with 10 additions and 7 deletions

View file

@ -72,9 +72,7 @@ agent_pkdecrypt (ctrl_t ctrl, const char *desc_text,
CACHE_MODE_NORMAL, NULL, &s_skey, NULL);
if (rc)
{
if (gpg_err_code (rc) == GPG_ERR_ENOENT)
rc = gpg_error (GPG_ERR_NO_SECKEY);
else
if (gpg_err_code (rc) != GPG_ERR_NO_SECKEY)
log_error ("failed to read the secret key\n");
goto leave;
}