summaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2019-09-05 20:36:38 +0200
committerWerner Koch <wk@gnupg.org>2019-09-05 20:38:23 +0200
commite1d9be730ca07e10a20df5ef60d7562030f10676 (patch)
tree5acbb9b3236c3d0ac4230c69d42779c5245a0dff /g10/keyedit.c
parentscd: Implement auto-switching between Yubikey apps. (diff)
downloadgnupg2-e1d9be730ca07e10a20df5ef60d7562030f10676.tar.xz
gnupg2-e1d9be730ca07e10a20df5ef60d7562030f10676.zip
gpg: Rework the signature subpacket iteration function.
* g10/parse-packet.c (enum_sig_subpkt): Replace first arg by two args so that the entire signature packet is available. Change all callers. (parse_sig_subpkt): Ditto. -- This patch is a prerequisite to support the new attestation key signatures. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keyedit.c')
-rw-r--r--g10/keyedit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 1bf5de9b2..b66ae9548 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -299,11 +299,11 @@ keyedit_print_one_sig (ctrl_t ctrl, estream_t fp,
PKT_public_key *pk = keyblock->pkt->pkt.public_key;
const unsigned char *s;
- s = parse_sig_subpkt (sig->hashed, SIGSUBPKT_PRIMARY_UID, NULL);
+ s = parse_sig_subpkt (sig, 1, SIGSUBPKT_PRIMARY_UID, NULL);
if (s && *s)
tty_fprintf (fp, " [primary]\n");
- s = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_EXPIRE, NULL);
+ s = parse_sig_subpkt (sig, 1, SIGSUBPKT_KEY_EXPIRE, NULL);
if (s && buf32_to_u32 (s))
tty_fprintf (fp, " [expires: %s]\n",
isotimestamp (pk->timestamp + buf32_to_u32 (s)));
@@ -3158,8 +3158,8 @@ show_prefs (PKT_user_id * uid, PKT_signature * selfsig, int verbose)
const byte *pref_ks;
size_t pref_ks_len;
- pref_ks = parse_sig_subpkt (selfsig->hashed,
- SIGSUBPKT_PREF_KS, &pref_ks_len);
+ pref_ks = parse_sig_subpkt (selfsig, 1,
+ SIGSUBPKT_PREF_KS, &pref_ks_len);
if (pref_ks && pref_ks_len)
{
tty_printf (" ");
@@ -4870,10 +4870,10 @@ menu_set_primary_uid (ctrl_t ctrl, kbnode_t pub_keyblock)
int action;
/* See whether this signature has the primary UID flag. */
- p = parse_sig_subpkt (sig->hashed,
+ p = parse_sig_subpkt (sig, 1,
SIGSUBPKT_PRIMARY_UID, NULL);
if (!p)
- p = parse_sig_subpkt (sig->unhashed,
+ p = parse_sig_subpkt (sig, 0,
SIGSUBPKT_PRIMARY_UID, NULL);
if (p && *p) /* yes */
action = selected ? 0 : -1;
@@ -5086,7 +5086,7 @@ menu_set_keyserver_url (ctrl_t ctrl, const char *url, kbnode_t pub_keyblock)
const byte *p;
size_t plen;
- p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_KS, &plen);
+ p = parse_sig_subpkt (sig, 1, SIGSUBPKT_PREF_KS, &plen);
if (p && plen)
{
tty_printf ("Current preferred keyserver for user"