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

* findkey.c (agent_key_from_file): Now return an error code so

that we have more detailed error messages in the upper layers.
This fixes the handling pinentry's cancel button.
* pksign.c (agent_pksign): Changed accordingly.
* pkdecrypt.c (agent_pkdecrypt): Ditto.
* command.c (cmd_passwd): Ditto.
This commit is contained in:
Werner Koch 2004-01-16 17:39:58 +00:00
parent 1e53ff3608
commit 671f696e55
7 changed files with 49 additions and 33 deletions

View file

@ -64,11 +64,10 @@ agent_pkdecrypt (CTRL ctrl, const char *ciphertext, size_t ciphertextlen,
log_printhex ("keygrip:", ctrl->keygrip, 20);
log_printhex ("cipher: ", ciphertext, ciphertextlen);
}
s_skey = agent_key_from_file (ctrl, ctrl->keygrip, &shadow_info, 0);
if (!s_skey && !shadow_info)
rc = agent_key_from_file (ctrl, ctrl->keygrip, &shadow_info, 0, &s_skey);
if (rc)
{
log_error ("failed to read the secret key\n");
rc = gpg_error (GPG_ERR_NO_SECKEY);
goto leave;
}