1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: Add magic parameter "default" to --quick-add-adsk.

* g10/getkey.c (has_key_with_fingerprint): New.
* g10/keyedit.c (menu_addadsk): Replace code by new function.
(keyedit_quick_addadsk): Handle magic arg "default".
* g10/keygen.c (append_all_default_adsks): New.
--

GnuPG-bug-id: 6882
(cherry picked from commit 77afc9ee1c)
This commit is contained in:
Werner Koch 2024-06-05 17:04:33 +02:00
parent 222045d850
commit ce75af47eb
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
6 changed files with 88 additions and 18 deletions

View file

@ -485,6 +485,10 @@ int parse_auto_key_locate(const char *options);
int parse_key_origin (char *string);
const char *key_origin_string (int origin);
/* Return an error if KEYBLOCK has a primary or subkey with the fpr. */
gpg_error_t has_key_with_fingerprint (kbnode_t keyblock,
const byte *fpr, size_t fprlen);
/*-- keyid.c --*/
int pubkey_letter( int algo );
char *pubkey_string (PKT_public_key *pk, char *buffer, size_t bufsize);