mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Print designated revokers also in a standard listing.
* g10/keylist.c (print_revokers): Add arg with_colon, adjust callers,
add human printable format.
(list_keyblock_print): Call print_revokers.
--
Designated revokers were only printed in --with-colons mode. For
quick inspection of a key it is useful to see them right away.
(cherry picked from commit 9d618d1273
)
This commit is contained in:
parent
330354972a
commit
222045d850
4 changed files with 67 additions and 31 deletions
45
g10/keygen.c
45
g10/keygen.c
|
@ -1112,6 +1112,35 @@ make_backsig (ctrl_t ctrl, PKT_signature *sig, PKT_public_key *pk,
|
|||
}
|
||||
|
||||
|
||||
/* This function should be called to make sure that
|
||||
* opt.def_new_key_adsks has no duplicates and that tehre is no '!'
|
||||
* suffix. We don't do this during normal option processing because
|
||||
* this list is only needed for a very few operations. Callingit
|
||||
* twice does not harm. Users of the option list should skip empty
|
||||
* items. */
|
||||
void
|
||||
keygen_prepare_new_key_adsks (void)
|
||||
{
|
||||
strlist_t sl, slr;
|
||||
char *p;
|
||||
|
||||
for (sl = opt.def_new_key_adsks; sl; sl = sl->next)
|
||||
{
|
||||
if (!*sl->d)
|
||||
continue;
|
||||
p = strchr (sl->d, '!');
|
||||
if (p)
|
||||
*p = 0;
|
||||
for (slr = opt.def_new_key_adsks; slr != sl; slr = slr->next)
|
||||
if (!ascii_strcasecmp (sl->d, slr->d))
|
||||
{
|
||||
*sl->d = 0; /* clear fpr to mark this as a duplicate. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Write a direct key signature to the first key in ROOT using the key
|
||||
PSK. REVKEY is describes the direct key signature and TIMESTAMP is
|
||||
the timestamp to set on the signature. */
|
||||
|
@ -4167,7 +4196,7 @@ prepare_desig_revoker (ctrl_t ctrl, const char *name)
|
|||
}
|
||||
|
||||
|
||||
/* Parse asn ADSK specified by NAME, check that the public key exists
|
||||
/* Parse an ADSK specified by NAME, check that the public key exists
|
||||
* and return a parameter with the adsk information. On error print a
|
||||
* diagnostic and return NULL. */
|
||||
static struct para_data_s *
|
||||
|
@ -4333,7 +4362,7 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
|
|||
const char *s1, *s2, *s3;
|
||||
size_t n;
|
||||
char *p;
|
||||
strlist_t sl, slr;
|
||||
strlist_t sl;
|
||||
int is_default = 0;
|
||||
int have_user_id = 0;
|
||||
int err, algo;
|
||||
|
@ -4500,21 +4529,11 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
|
|||
* also check for duplicate specifications. In addition we remove
|
||||
* an optional '!' suffix for easier comparing; the suffix is anyway
|
||||
* re-added later. */
|
||||
keygen_prepare_new_key_adsks ();
|
||||
for (sl = opt.def_new_key_adsks; sl; sl = sl->next)
|
||||
{
|
||||
if (!*sl->d)
|
||||
continue;
|
||||
p = strchr (sl->d, '!');
|
||||
if (p)
|
||||
*p = 0;
|
||||
for (slr = opt.def_new_key_adsks; slr != sl; slr = slr->next)
|
||||
if (!ascii_strcasecmp (sl->d, slr->d))
|
||||
{
|
||||
*sl->d = 0; /* clear fpr to mark this as a duplicate. */
|
||||
break;
|
||||
}
|
||||
if (!*sl->d)
|
||||
continue;
|
||||
|
||||
r = prepare_adsk (ctrl, sl->d);
|
||||
if (!r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue