mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
sm: Always print the keygrip in colon mode.
* sm/keylist.c (list_cert_colon): Always print the keygrip as described in the manual. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c4506f624e
commit
0a8e20c4c6
@ -1189,10 +1189,12 @@ gpg-preset-passphrase [options] [command] @var{cacheid}
|
|||||||
@var{cacheid} is either a 40 character keygrip of hexadecimal
|
@var{cacheid} is either a 40 character keygrip of hexadecimal
|
||||||
characters identifying the key for which the passphrase should be set
|
characters identifying the key for which the passphrase should be set
|
||||||
or cleared. The keygrip is listed along with the key when running the
|
or cleared. The keygrip is listed along with the key when running the
|
||||||
command: @code{gpgsm --dump-secret-keys}. Alternatively an arbitrary
|
command: @code{gpgsm --with-keygrip --list-secret-keys}.
|
||||||
string may be used to identify a passphrase; it is suggested that such
|
Alternatively an arbitrary string may be used to identify a
|
||||||
a string is prefixed with the name of the application (e.g
|
passphrase; it is suggested that such a string is prefixed with the
|
||||||
@code{foo:12346}).
|
name of the application (e.g @code{foo:12346}). Scripts should always
|
||||||
|
use the option @option{--with-colons}, which provides the keygrip in a
|
||||||
|
"grp" line (cf. @file{doc/DETAILS})/
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
One of the following command options must be given:
|
One of the following command options must be given:
|
||||||
|
14
sm/keylist.c
14
sm/keylist.c
@ -541,16 +541,16 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity,
|
|||||||
xfree (fpr); fpr = NULL; chain_id = NULL;
|
xfree (fpr); fpr = NULL; chain_id = NULL;
|
||||||
xfree (chain_id_buffer); chain_id_buffer = NULL;
|
xfree (chain_id_buffer); chain_id_buffer = NULL;
|
||||||
|
|
||||||
if (opt.with_key_data)
|
/* Always print the keygrip. */
|
||||||
|
if ( (p = gpgsm_get_keygrip_hexstring (cert)))
|
||||||
{
|
{
|
||||||
if ( (p = gpgsm_get_keygrip_hexstring (cert)))
|
es_fprintf (fp, "grp:::::::::%s:\n", p);
|
||||||
{
|
xfree (p);
|
||||||
es_fprintf (fp, "grp:::::::::%s:\n", p);
|
|
||||||
xfree (p);
|
|
||||||
}
|
|
||||||
print_key_data (cert, fp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.with_key_data)
|
||||||
|
print_key_data (cert, fp);
|
||||||
|
|
||||||
kludge_uid = NULL;
|
kludge_uid = NULL;
|
||||||
for (idx=0; (p = ksba_cert_get_subject (cert,idx)); idx++)
|
for (idx=0; (p = ksba_cert_get_subject (cert,idx)); idx++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user