mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
g10: report whether key in agent is passphrase-protected or not
* g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add r_cleartext parameter to report whether a key is stored without passphrase protection. * g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to match new API. * g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c, g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet need to know whether agent is passphrase-protected. -- Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
5cc1613dce
commit
00f30cc01c
9 changed files with 60 additions and 31 deletions
|
@ -1692,7 +1692,7 @@ change_passphrase (ctrl_t ctrl, kbnode_t keyblock)
|
|||
err = hexkeygrip_from_pk (pk, &hexgrip);
|
||||
if (err)
|
||||
goto leave;
|
||||
err = agent_get_keyinfo (ctrl, hexgrip, &serialno);
|
||||
err = agent_get_keyinfo (ctrl, hexgrip, &serialno, NULL);
|
||||
if (!err && serialno)
|
||||
; /* Key on card. */
|
||||
else if (gpg_err_code (err) == GPG_ERR_NOT_FOUND)
|
||||
|
@ -3766,7 +3766,7 @@ show_key_with_all_names (ctrl_t ctrl, estream_t fp,
|
|||
have_seckey = 0;
|
||||
}
|
||||
else
|
||||
have_seckey = !agent_get_keyinfo (ctrl, hexgrip, &serialno);
|
||||
have_seckey = !agent_get_keyinfo (ctrl, hexgrip, &serialno, NULL);
|
||||
xfree (hexgrip);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue