1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-26 01:52:45 +02:00

2004-08-18 Marcus Brinkmann <marcus@g10code.de>

* passphrase.c (agent_get_passphrase):
This commit is contained in:
Marcus Brinkmann 2004-08-18 00:06:08 +00:00
parent 5d98f7afe5
commit 75ac082a76
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-08-18 Marcus Brinkmann <marcus@g10code.de>
* passphrase.c (agent_get_passphrase): Fix detection of gpg-agent
cancellation.
2004-08-08 David Shaw <dshaw@jabberwocky.com>
* plaintext.c (handle_plaintext): Bigger buffer for extra safety.

View File

@ -868,9 +868,11 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text,
m_free (orig_codeset);
return pw;
}
else if (nread > 7 && !memcmp (pw, "ERR 111", 7)
&& (pw[7] == ' ' || pw[7] == '\n') )
{
else if (nread > 4 && !memcmp (pw, "ERR ", 4)
&& (0xffff & strtoul (&pw[4], NULL, 0)) == 99)
{
/* 99 is GPG_ERR_CANCELED. FIXME: Check tail and overflow,
and use gpg-error. */
log_info (_("cancelled by user\n") );
if (canceled)
*canceled = 1;