diff options
| author | Daniel Kahn Gillmor <[email protected]> | 2016-06-10 20:15:33 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2016-06-11 09:09:09 +0000 |
| commit | 00f30cc01c79bbdff5cdc3be795f009f15d3845e (patch) | |
| tree | 501c18c6aaa3ce352b42736d2bf92da7f8c6d5ef /g10/keylist.c | |
| parent | speedo,w32: Distribute gpg-preset-passphrase. (diff) | |
| download | gnupg-00f30cc01c79bbdff5cdc3be795f009f15d3845e.tar.gz gnupg-00f30cc01c79bbdff5cdc3be795f009f15d3845e.zip | |
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 <[email protected]>
Diffstat (limited to 'g10/keylist.c')
| -rw-r--r-- | g10/keylist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index 231f3c00e..973a9fb9d 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -247,7 +247,7 @@ print_card_key_info (estream_t fp, kbnode_t keyblock) log_error ("error computing a keygrip: %s\n", gpg_strerror (rc)); s2k_char = '?'; } - else if (!agent_get_keyinfo (NULL, hexgrip, &serialno)) + else if (!agent_get_keyinfo (NULL, hexgrip, &serialno, NULL)) s2k_char = serialno? '>':' '; else s2k_char = '#'; /* Key not found. */ @@ -1046,7 +1046,7 @@ list_keyblock_print (ctrl_t ctrl, kbnode_t keyblock, int secret, int fpr, if (secret) { /* Encode some info about the secret key in SECRET. */ - if (!agent_get_keyinfo (NULL, hexgrip, &serialno)) + if (!agent_get_keyinfo (NULL, hexgrip, &serialno, NULL)) secret = serialno? 3 : 1; else secret = 2; /* Key not found. */ @@ -1160,7 +1160,7 @@ list_keyblock_print (ctrl_t ctrl, kbnode_t keyblock, int secret, int fpr, } if (secret) { - if (!agent_get_keyinfo (NULL, hexgrip, &serialno)) + if (!agent_get_keyinfo (NULL, hexgrip, &serialno, NULL)) secret = serialno? 3 : 1; else secret = '2'; /* Key not found. */ @@ -1354,7 +1354,7 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock, log_error ("error computing a keygrip: %s\n", gpg_strerror (rc)); } stubkey = 0; - if ((secret||has_secret) && agent_get_keyinfo (NULL, hexgrip, &serialno)) + if ((secret||has_secret) && agent_get_keyinfo (NULL, hexgrip, &serialno, NULL)) stubkey = 1; /* Key not found. */ keyid_from_pk (pk, keyid); @@ -1501,7 +1501,7 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock, } stubkey = 0; if ((secret||has_secret) - && agent_get_keyinfo (NULL, hexgrip, &serialno)) + && agent_get_keyinfo (NULL, hexgrip, &serialno, NULL)) stubkey = 1; /* Key not found. */ keyid_from_pk (pk2, keyid2); |
