mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
agent: Minor change for 56b5c9f.
* agent/call-pinentry.c (agent_askpin): Move option setting to ... (start_pinentry): here. Fix error code check. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
d0d4984cfe
commit
436f206072
@ -407,6 +407,20 @@ start_pinentry (ctrl_t ctrl)
|
|||||||
return unlock_pinentry (rc);
|
return unlock_pinentry (rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Indicate to the pinentry that it may read from an external cache.
|
||||||
|
|
||||||
|
It is essential that the pinentry respect this. If the cached
|
||||||
|
password is not up to date and retry == 1, then, using a version
|
||||||
|
of GPG Agent that doesn't support this, won't issue another pin
|
||||||
|
request and the user won't get a chance to correct the
|
||||||
|
password. */
|
||||||
|
rc = assuan_transact (entry_ctx, "OPTION allow-external-password-cache",
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
if (rc && gpg_err_code (rc) != GPG_ERR_UNKNOWN_OPTION)
|
||||||
|
return unlock_pinentry (rc);
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Provide a few default strings for use by the pinentries. This
|
/* Provide a few default strings for use by the pinentries. This
|
||||||
may help a pinentry to avoid implementing localization code. */
|
may help a pinentry to avoid implementing localization code. */
|
||||||
@ -814,18 +828,6 @@ agent_askpin (ctrl_t ctrl,
|
|||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* Indicate to the pinentry that it may read from an external cache.
|
|
||||||
|
|
||||||
It is essential that the pinentry respect this. If the cached
|
|
||||||
password is not up to date and retry == 1, then, using a version
|
|
||||||
of GPG Agent that doesn't support this, won't issue another pin
|
|
||||||
request and the user won't get a chance to correct the
|
|
||||||
password. */
|
|
||||||
rc = assuan_transact (entry_ctx, "OPTION allow-external-password-cache",
|
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
|
||||||
if (rc && gpg_err_code (rc) != GPG_ERR_ASS_UNKNOWN_CMD)
|
|
||||||
return unlock_pinentry (rc);
|
|
||||||
|
|
||||||
/* If we have a KEYINFO string and are normal, user, or ssh cache
|
/* If we have a KEYINFO string and are normal, user, or ssh cache
|
||||||
mode, we tell that the Pinentry so it may use it for own caching
|
mode, we tell that the Pinentry so it may use it for own caching
|
||||||
purposes. Most pinentries won't have this implemented and thus
|
purposes. Most pinentries won't have this implemented and thus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user