diff options
author | Werner Koch <wk@gnupg.org> | 2017-07-13 17:28:32 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-07-13 18:29:01 +0200 |
commit | fa1155e89ebb4b16ee95549b8ab72672df3a0c54 (patch) | |
tree | 515f2f5684c032772406b27e4ea94a91c87e766a /g10/keydb.h | |
parent | doc: Document gnupg version requirement for gpg-preset-passphrase. (diff) | |
download | gnupg2-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/keydb.h')
-rw-r--r-- | g10/keydb.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/g10/keydb.h b/g10/keydb.h index 40167230c..bad314991 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -119,13 +119,14 @@ union pref_hint /* Constants to describe from where a key was fetched or updated. */ enum { - KEYSRC_UNKNOWN = 0, - KEYSRC_FILE = 1, /* Direct import from a file. */ - KEYSRC_KS = 2, /* Public keyserver. */ - KEYSRC_PREF_KS = 3, /* Preferred keysrver. */ - KEYSRC_WKD = 4, /* Web Key Directory. */ - KEYSRC_WKD_SD = 5, /* Web Key Directory but from a sub domain. */ - KEYSRC_DANE = 6 /* OpenPGP DANE. */ + KEYORG_UNKNOWN = 0, + KEYORG_KS = 1, /* Public keyserver. */ + KEYORG_KS_PREF = 2, /* Preferred keysrver. */ + KEYORG_DANE = 3, /* OpenPGP DANE. */ + KEYORG_WKD = 4, /* Web Key Directory. */ + KEYORG_URL = 5, /* Trusted URL. */ + KEYORG_FILE = 6, /* Trusted file. */ + KEYORG_SELF = 7, /* We generated it. */ }; @@ -396,6 +397,7 @@ char *get_user_id_byfpr_native (ctrl_t ctrl, const byte *fpr); void release_akl(void); int parse_auto_key_locate(char *options); +int parse_key_origin (char *string); /*-- keyid.c --*/ int pubkey_letter( int algo ); |