agent: Improve error handling.
authorJustus Winter <justus@g10code.com>
Fri, 11 Dec 2015 10:05:52 +0000 (11:05 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 11 Dec 2015 10:21:42 +0000 (11:21 +0100)
* agent/pksign.c (agent_pksign_do): Improve error handling.

Signed-off-by: Justus Winter <justus@g10code.com>
agent/pksign.c

index f64729c..7b498d4 100644 (file)
@@ -505,7 +505,8 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce,
                                ctrl->digest.raw_value);
         }
 
-      rc = gcry_pk_verify (s_sig, s_hash, s_pkey? s_pkey: s_skey);
+      if (! rc)
+        rc = gcry_pk_verify (s_sig, s_hash, s_pkey? s_pkey: s_skey);
 
       if (rc)
         {