summaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-07-13 17:28:32 +0200
committerWerner Koch <wk@gnupg.org>2017-07-13 18:29:01 +0200
commitfa1155e89ebb4b16ee95549b8ab72672df3a0c54 (patch)
tree515f2f5684c032772406b27e4ea94a91c87e766a /g10/build-packet.c
parentdoc: Document gnupg version requirement for gpg-preset-passphrase. (diff)
downloadgnupg2-fa1155e89ebb4b16ee95549b8ab72672df3a0c54.tar.xz
gnupg2-fa1155e89ebb4b16ee95549b8ab72672df3a0c54.zip
gpg: New option --key-origin.
* g10/keydb.h (KEYORG_): Rename to KEYORG_. * g10/packet.h (PKT_user_id): Rename field keysrc to keyorg. Adjust users. (PKT_public_key): Ditto. (PKT_ring_trust): Ditto. * g10/options.h (struct opt): Add field key_origin. * g10/getkey.c (parse_key_origin): New. * g10/gpg.c (oKeyOrigin): New. (opts): Add "keys-origin". (main): Set option. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index fa2674b2a..6d00fc5c1 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -213,7 +213,7 @@ build_packet_and_meta (iobuf_t out, PACKET *pkt)
PKT_user_id *uid = pkt->pkt.user_id;
rt.subtype = RING_TRUST_UID;
- rt.keysrc = uid->keysrc;
+ rt.keyorg = uid->keyorg;
rt.keyupdate = uid->keyupdate;
rt.url = uid->updateurl;
err = do_ring_trust (out, &rt);
@@ -225,7 +225,7 @@ build_packet_and_meta (iobuf_t out, PACKET *pkt)
PKT_public_key *pk = pkt->pkt.public_key;
rt.subtype = RING_TRUST_KEY;
- rt.keysrc = pk->keysrc;
+ rt.keyorg = pk->keyorg;
rt.keyupdate = pk->keyupdate;
rt.url = pk->updateurl;
err = do_ring_trust (out, &rt);
@@ -395,7 +395,7 @@ do_ring_trust (iobuf_t out, PKT_ring_trust *rt)
iobuf_put (out, rt->subtype);
if (rt->subtype == RING_TRUST_KEY || rt->subtype == RING_TRUST_UID)
{
- iobuf_put (out, rt->keysrc);
+ iobuf_put (out, rt->keyorg);
write_32 (out, rt->keyupdate);
iobuf_put (out, namelen);
if (namelen)