aboutsummaryrefslogtreecommitdiffstats
path: root/agent/pksign.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-08-18 13:42:54 +0000
committerWerner Koch <[email protected]>2014-08-18 13:42:54 +0000
commit3981ff15f3c0829ba22cd37794353502d996683c (patch)
treeff65c51b73688a205dd26e62123524dbaf27aeb3 /agent/pksign.c
parenttests: Re-enable OpenPGP ecc test. (diff)
downloadgnupg-3981ff15f3c0829ba22cd37794353502d996683c.tar.gz
gnupg-3981ff15f3c0829ba22cd37794353502d996683c.zip
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.
Diffstat (limited to 'agent/pksign.c')
-rw-r--r--agent/pksign.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/pksign.c b/agent/pksign.c
index 713c8ba79..9147b50d0 100644
--- a/agent/pksign.c
+++ b/agent/pksign.c
@@ -312,7 +312,8 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce,
&s_skey, NULL);
if (rc)
{
- log_error ("failed to read the secret key\n");
+ if (gpg_err_code (rc) != GPG_ERR_NO_SECKEY)
+ log_error ("failed to read the secret key\n");
goto leave;
}