Home GnuPG
Diffusion GnuPG 1aaadede76cc

agent: Show "no secret key" instead of "card removed".

Description

agent: Show "no secret key" instead of "card removed".

* agent/findkey.c (agent_key_from_file): Check the error of
read_key_file again.
* agent/pkdecrypt.c (agent_pkdecrypt): Restore error if no card was
found.  Also remove useless condition.

The first patch fixes a likely merge error. The second is about the
actual return code: If we have no smardcard but simply try to decrypt
with the current smartcard we should return the originla error code.