mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Autoload designated revoker key and ADSK when needed.
* g10/options.h (opt): Move the definition of struct akl to global scope. * g10/keydb.h (enum get_pubkey_modes): Add GET_PUBKEY_TRY_LDAP. * g10/getkey.c (get_pubkey_byname): Implement GET_PUBKEY_BYNAME. * g10/keygen.c (prepare_desig_revoker): Use it here. (prepare_adsk): and here. -- The revoker key is required before we create it along with a new key. This is because the we need to know the algo and also to make sure that the key really exists. GnuPG-bug-id: 7133
This commit is contained in:
parent
068ebb6f1e
commit
465ea9116d
4 changed files with 42 additions and 27 deletions
|
@ -4504,7 +4504,7 @@ prepare_desig_revoker (ctrl_t ctrl, const char *name)
|
|||
|
||||
revoker_pk = xcalloc (1, sizeof *revoker_pk);
|
||||
revoker_pk->req_usage = PUBKEY_USAGE_CERT;
|
||||
err = get_pubkey_byname (ctrl, GET_PUBKEY_NO_AKL,
|
||||
err = get_pubkey_byname (ctrl, GET_PUBKEY_TRY_LDAP,
|
||||
NULL, revoker_pk, name, NULL, NULL, 1);
|
||||
if (err)
|
||||
goto leave;
|
||||
|
@ -4565,7 +4565,7 @@ prepare_adsk (ctrl_t ctrl, const char *name)
|
|||
|
||||
adsk_pk = xcalloc (1, sizeof *adsk_pk);
|
||||
adsk_pk->req_usage = PUBKEY_USAGE_ENC;
|
||||
err = get_pubkey_byname (ctrl, GET_PUBKEY_NO_AKL,
|
||||
err = get_pubkey_byname (ctrl, GET_PUBKEY_TRY_LDAP,
|
||||
NULL, adsk_pk, name, NULL, NULL, 1);
|
||||
if (err)
|
||||
goto leave;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue