mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
Made --fixed-list-mode obsolete.
This commit is contained in:
parent
5a788b9e00
commit
035c838f71
2
NEWS
2
NEWS
@ -17,6 +17,8 @@ Noteworthy changes in version 2.0.10 (unreleased)
|
|||||||
|
|
||||||
* gpg-connect-agent accepts commands given as command line arguments.
|
* gpg-connect-agent accepts commands given as command line arguments.
|
||||||
|
|
||||||
|
* The gpg2 option --fixed-list-mode is now implicitly used and obsolete.
|
||||||
|
|
||||||
|
|
||||||
Noteworthy changes in version 2.0.9 (2008-03-26)
|
Noteworthy changes in version 2.0.9 (2008-03-26)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
@ -16,9 +16,9 @@ sub:r:1536:20:5CE086B5B5A18FF4:899817788:1025961788:::::esc:
|
|||||||
fpr:::::::::AB059359A3B81F410FCFF97F5CE086B5B5A18FF4:
|
fpr:::::::::AB059359A3B81F410FCFF97F5CE086B5B5A18FF4:
|
||||||
|
|
||||||
The double --with-fingerprint prints the fingerprint for the subkeys
|
The double --with-fingerprint prints the fingerprint for the subkeys
|
||||||
too, --fixed-list-mode is themodern listing way printing dates in
|
too. --fixed-list-mode is the modern listing way printing dates in
|
||||||
seconds since Epoch and does not merge the first userID with the pub
|
seconds since Epoch and does not merge the first userID with the pub
|
||||||
record.
|
record; gpg2 does this by default and the option is a dummy.
|
||||||
|
|
||||||
|
|
||||||
1. Field: Type of record
|
1. Field: Type of record
|
||||||
|
@ -1846,6 +1846,10 @@ source distribution.
|
|||||||
@opindex fixed-list-mode
|
@opindex fixed-list-mode
|
||||||
Do not merge primary user ID and primary key in @option{--with-colon}
|
Do not merge primary user ID and primary key in @option{--with-colon}
|
||||||
listing mode and print all timestamps as seconds since 1970-01-01.
|
listing mode and print all timestamps as seconds since 1970-01-01.
|
||||||
|
@ifclear gpgone
|
||||||
|
Since GnuPG 2.0.10, this mode is always used and thus this option is
|
||||||
|
obsolete; it does not harm to use it though.
|
||||||
|
@end ifclear
|
||||||
|
|
||||||
@item --with-fingerprint
|
@item --with-fingerprint
|
||||||
@opindex with-fingerprint
|
@opindex with-fingerprint
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2008-06-11 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* gpg.c: Make --fixed-list-mode a dummy.
|
||||||
|
* options.h (struct): Removed FIXED_LIST_MODE.
|
||||||
|
* keyid.c (colon_strtime, colon_datestr_from_pk)
|
||||||
|
(colon_datestr_from_sk, colon_datestr_from_sig)
|
||||||
|
(colon_expirestr_from_sig): Remove fixed_list_mode case.
|
||||||
|
* keylist.c (list_keyblock_colon): Ditto. Remove all now unsed
|
||||||
|
code and reindent.
|
||||||
|
|
||||||
2008-05-31 Werner Koch <wk@g10code.com>
|
2008-05-31 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* keygen.c (ask_user_id): Change the string printed as header of
|
* keygen.c (ask_user_id): Change the string printed as header of
|
||||||
|
@ -2734,7 +2734,7 @@ main (int argc, char **argv)
|
|||||||
"--keyserver-options ","http-proxy");
|
"--keyserver-options ","http-proxy");
|
||||||
break;
|
break;
|
||||||
case oFastListMode: opt.fast_list_mode = 1; break;
|
case oFastListMode: opt.fast_list_mode = 1; break;
|
||||||
case oFixedListMode: opt.fixed_list_mode = 1; break;
|
case oFixedListMode: /* Dummy */ break;
|
||||||
case oListOnly: opt.list_only=1; break;
|
case oListOnly: opt.list_only=1; break;
|
||||||
case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
|
case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
|
||||||
case oIgnoreValidFrom: opt.ignore_valid_from = 1; break;
|
case oIgnoreValidFrom: opt.ignore_valid_from = 1; break;
|
||||||
|
41
g10/keyid.c
41
g10/keyid.c
@ -607,61 +607,52 @@ usagestr_from_pk( PKT_public_key *pk )
|
|||||||
const char *
|
const char *
|
||||||
colon_strtime (u32 t)
|
colon_strtime (u32 t)
|
||||||
{
|
{
|
||||||
|
static char buf[20];
|
||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
return "";
|
return "";
|
||||||
if (opt.fixed_list_mode) {
|
snprintf (buf, sizeof buf, "%lu", (ulong)t);
|
||||||
static char buf[15];
|
|
||||||
sprintf (buf, "%lu", (ulong)t);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
return strtimestamp(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
colon_datestr_from_pk (PKT_public_key *pk)
|
colon_datestr_from_pk (PKT_public_key *pk)
|
||||||
{
|
{
|
||||||
if (opt.fixed_list_mode) {
|
static char buf[20];
|
||||||
static char buf[15];
|
|
||||||
sprintf (buf, "%lu", (ulong)pk->timestamp);
|
snprintf (buf, sizeof buf, "%lu", (ulong)pk->timestamp);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
return datestr_from_pk (pk);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
colon_datestr_from_sk (PKT_secret_key *sk)
|
colon_datestr_from_sk (PKT_secret_key *sk)
|
||||||
{
|
{
|
||||||
if (opt.fixed_list_mode) {
|
static char buf[20];
|
||||||
static char buf[15];
|
|
||||||
sprintf (buf, "%lu", (ulong)sk->timestamp);
|
snprintf (buf, sizeof buf, "%lu", (ulong)sk->timestamp);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
return datestr_from_sk (sk);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
colon_datestr_from_sig (PKT_signature *sig)
|
colon_datestr_from_sig (PKT_signature *sig)
|
||||||
{
|
{
|
||||||
if (opt.fixed_list_mode) {
|
static char buf[20];
|
||||||
static char buf[15];
|
|
||||||
sprintf (buf, "%lu", (ulong)sig->timestamp);
|
snprintf (buf, sizeof buf, "%lu", (ulong)sig->timestamp);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
return datestr_from_sig (sig);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
colon_expirestr_from_sig (PKT_signature *sig)
|
colon_expirestr_from_sig (PKT_signature *sig)
|
||||||
{
|
{
|
||||||
|
static char buf[20];
|
||||||
|
|
||||||
if (!sig->expiredate)
|
if (!sig->expiredate)
|
||||||
return "";
|
return "";
|
||||||
if (opt.fixed_list_mode) {
|
|
||||||
static char buf[15];
|
snprintf (buf, sizeof buf,"%lu", (ulong)sig->expiredate);
|
||||||
sprintf (buf, "%lu", (ulong)sig->expiredate);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
return expirestr_from_sig (sig);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************** .
|
/**************** .
|
||||||
|
147
g10/keylist.c
147
g10/keylist.c
@ -1,6 +1,6 @@
|
|||||||
/* keylist.c - print keys
|
/* keylist.c - print keys
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
* 2004, 2005 Free Software Foundation, Inc.
|
* 2004, 2005, 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -1068,20 +1068,21 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
PKT_public_key *pk;
|
PKT_public_key *pk;
|
||||||
PKT_secret_key *sk;
|
PKT_secret_key *sk;
|
||||||
u32 keyid[2];
|
u32 keyid[2];
|
||||||
int any=0;
|
|
||||||
int trustletter = 0;
|
int trustletter = 0;
|
||||||
int ulti_hack = 0;
|
int ulti_hack = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* get the keyid from the keyblock */
|
/* get the keyid from the keyblock */
|
||||||
node = find_kbnode( keyblock, secret? PKT_SECRET_KEY : PKT_PUBLIC_KEY );
|
node = find_kbnode( keyblock, secret? PKT_SECRET_KEY : PKT_PUBLIC_KEY );
|
||||||
if( !node ) {
|
if ( !node )
|
||||||
|
{
|
||||||
log_error("Oops; key lost!\n");
|
log_error("Oops; key lost!\n");
|
||||||
dump_kbnode( keyblock );
|
dump_kbnode( keyblock );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( secret ) {
|
if ( secret )
|
||||||
|
{
|
||||||
pk = NULL;
|
pk = NULL;
|
||||||
sk = node->pkt->pkt.secret_key;
|
sk = node->pkt->pkt.secret_key;
|
||||||
keyid_from_sk ( sk, keyid );
|
keyid_from_sk ( sk, keyid );
|
||||||
@ -1093,7 +1094,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
colon_strtime (sk->expiredate)
|
colon_strtime (sk->expiredate)
|
||||||
/* fixme: add LID here */ );
|
/* fixme: add LID here */ );
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
pk = node->pkt->pkt.public_key;
|
pk = node->pkt->pkt.public_key;
|
||||||
sk = NULL;
|
sk = NULL;
|
||||||
keyid_from_pk( pk, keyid );
|
keyid_from_pk( pk, keyid );
|
||||||
@ -1106,7 +1108,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
putchar ('e');
|
putchar ('e');
|
||||||
else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
|
else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
|
||||||
;
|
;
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
trustletter = get_validity_info ( pk, NULL );
|
trustletter = get_validity_info ( pk, NULL );
|
||||||
if ( trustletter == 'u' )
|
if ( trustletter == 'u' )
|
||||||
ulti_hack = 1;
|
ulti_hack = 1;
|
||||||
@ -1123,17 +1126,17 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
putchar(':');
|
putchar(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt.fixed_list_mode) {
|
|
||||||
/* do not merge the first uid with the primary key */
|
|
||||||
putchar (':');
|
putchar (':');
|
||||||
putchar (':');
|
putchar (':');
|
||||||
print_capabilities (pk, sk, keyblock);
|
print_capabilities (pk, sk, keyblock);
|
||||||
if (secret) {
|
if (secret)
|
||||||
|
{
|
||||||
putchar (':'); /* End of field 13. */
|
putchar (':'); /* End of field 13. */
|
||||||
putchar (':'); /* End of field 14. */
|
putchar (':'); /* End of field 14. */
|
||||||
if (sk->protect.s2k.mode == 1001)
|
if (sk->protect.s2k.mode == 1001)
|
||||||
putchar ('#'); /* Key is just a stub. */
|
putchar ('#'); /* Key is just a stub. */
|
||||||
else if (sk->protect.s2k.mode == 1002) {
|
else if (sk->protect.s2k.mode == 1002)
|
||||||
|
{
|
||||||
/* Key is stored on an external token (card) or handled by
|
/* Key is stored on an external token (card) or handled by
|
||||||
the gpg-agent. Print the serial number of that token
|
the gpg-agent. Print the serial number of that token
|
||||||
here. */
|
here. */
|
||||||
@ -1149,22 +1152,23 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
print_fingerprint (pk, sk, 0);
|
print_fingerprint (pk, sk, 0);
|
||||||
if (opt.with_key_data)
|
if (opt.with_key_data)
|
||||||
print_key_data (pk);
|
print_key_data (pk);
|
||||||
any = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for( kbctx=NULL; (node=walk_kbnode( keyblock, &kbctx, 0)) ; ) {
|
|
||||||
if( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode ) {
|
for ( kbctx=NULL; (node=walk_kbnode( keyblock, &kbctx, 0)) ; )
|
||||||
|
{
|
||||||
|
if ( node->pkt->pkttype == PKT_USER_ID && !opt.fast_list_mode )
|
||||||
|
{
|
||||||
|
char *str;
|
||||||
PKT_user_id *uid=node->pkt->pkt.user_id;
|
PKT_user_id *uid=node->pkt->pkt.user_id;
|
||||||
|
|
||||||
if (attrib_fp && node->pkt->pkt.user_id->attrib_data != NULL)
|
if (attrib_fp && node->pkt->pkt.user_id->attrib_data != NULL)
|
||||||
dump_attribs (node->pkt->pkt.user_id,pk,sk);
|
dump_attribs (node->pkt->pkt.user_id,pk,sk);
|
||||||
/*
|
/*
|
||||||
* Fixme: We need a is_valid flag here too
|
* Fixme: We need a is_valid flag here too
|
||||||
*/
|
*/
|
||||||
if( any ) {
|
str = uid->attrib_data? "uat":"uid";
|
||||||
char *str=uid->attrib_data?"uat":"uid";
|
/* If we're listing a secret key, leave out the validity
|
||||||
/* If we're listing a secret key, leave out the
|
values for now. This is handled better in 1.9. */
|
||||||
validity values for now. This is handled better in
|
|
||||||
1.9. */
|
|
||||||
if (sk)
|
if (sk)
|
||||||
printf ("%s:::::",str);
|
printf ("%s:::::",str);
|
||||||
else if ( uid->is_revoked )
|
else if ( uid->is_revoked )
|
||||||
@ -1173,7 +1177,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
printf ("%s:e::::",str);
|
printf ("%s:e::::",str);
|
||||||
else if ( opt.no_expensive_trust_checks )
|
else if ( opt.no_expensive_trust_checks )
|
||||||
printf ("%s:::::",str);
|
printf ("%s:::::",str);
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
int uid_validity;
|
int uid_validity;
|
||||||
|
|
||||||
if ( pk && !ulti_hack )
|
if ( pk && !ulti_hack )
|
||||||
@ -1192,39 +1197,19 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
printf ("%02X",uid->namehash[i]);
|
printf ("%02X",uid->namehash[i]);
|
||||||
|
|
||||||
printf ("::");
|
printf ("::");
|
||||||
}
|
|
||||||
if (uid->attrib_data)
|
if (uid->attrib_data)
|
||||||
printf ("%u %lu",uid->numattribs,uid->attrib_len);
|
printf ("%u %lu",uid->numattribs,uid->attrib_len);
|
||||||
else
|
else
|
||||||
print_string (stdout,uid->name,uid->len, ':' );
|
print_string (stdout,uid->name,uid->len, ':' );
|
||||||
putchar (':');
|
putchar (':');
|
||||||
if (any)
|
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
else {
|
|
||||||
putchar(':');
|
|
||||||
print_capabilities (pk, sk, keyblock);
|
|
||||||
putchar('\n');
|
|
||||||
if( fpr )
|
|
||||||
print_fingerprint( pk, sk, 0 );
|
|
||||||
if( opt.with_key_data )
|
|
||||||
print_key_data( pk );
|
|
||||||
any = 1;
|
|
||||||
}
|
}
|
||||||
}
|
else if ( node->pkt->pkttype == PKT_PUBLIC_SUBKEY )
|
||||||
else if( node->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
{
|
||||||
u32 keyid2[2];
|
u32 keyid2[2];
|
||||||
PKT_public_key *pk2 = node->pkt->pkt.public_key;
|
PKT_public_key *pk2 = node->pkt->pkt.public_key;
|
||||||
|
|
||||||
if( !any ) {
|
|
||||||
putchar(':');
|
|
||||||
putchar(':');
|
|
||||||
print_capabilities (pk, sk, keyblock);
|
|
||||||
putchar('\n');
|
|
||||||
if( fpr )
|
|
||||||
print_fingerprint( pk, sk, 0 ); /* of the main key */
|
|
||||||
any = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
keyid_from_pk ( pk2, keyid2 );
|
keyid_from_pk ( pk2, keyid2 );
|
||||||
fputs ("sub:", stdout );
|
fputs ("sub:", stdout );
|
||||||
if ( !pk2->is_valid )
|
if ( !pk2->is_valid )
|
||||||
@ -1235,8 +1220,9 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
putchar ('e');
|
putchar ('e');
|
||||||
else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
|
else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
|
||||||
;
|
;
|
||||||
else {
|
else
|
||||||
/* trustletter should always be defined here */
|
{
|
||||||
|
/* TRUSTLETTER should always be defined here. */
|
||||||
if (trustletter)
|
if (trustletter)
|
||||||
printf ("%c", trustletter );
|
printf ("%c", trustletter );
|
||||||
}
|
}
|
||||||
@ -1255,20 +1241,11 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
if ( opt.with_key_data )
|
if ( opt.with_key_data )
|
||||||
print_key_data( pk2 );
|
print_key_data( pk2 );
|
||||||
}
|
}
|
||||||
else if( node->pkt->pkttype == PKT_SECRET_SUBKEY ) {
|
else if( node->pkt->pkttype == PKT_SECRET_SUBKEY )
|
||||||
|
{
|
||||||
u32 keyid2[2];
|
u32 keyid2[2];
|
||||||
PKT_secret_key *sk2 = node->pkt->pkt.secret_key;
|
PKT_secret_key *sk2 = node->pkt->pkt.secret_key;
|
||||||
|
|
||||||
if( !any ) {
|
|
||||||
putchar(':');
|
|
||||||
putchar(':');
|
|
||||||
print_capabilities (pk, sk, keyblock);
|
|
||||||
putchar('\n');
|
|
||||||
if( fpr )
|
|
||||||
print_fingerprint( pk, sk, 0 ); /* of the main key */
|
|
||||||
any = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
keyid_from_sk ( sk2, keyid2 );
|
keyid_from_sk ( sk2, keyid2 );
|
||||||
printf ("ssb::%u:%d:%08lX%08lX:%s:%s:::::",
|
printf ("ssb::%u:%d:%08lX%08lX:%s:%s:::::",
|
||||||
nbits_from_sk( sk2 ),
|
nbits_from_sk( sk2 ),
|
||||||
@ -1278,16 +1255,12 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
colon_strtime (sk2->expiredate)
|
colon_strtime (sk2->expiredate)
|
||||||
/* fixme: add LID */ );
|
/* fixme: add LID */ );
|
||||||
print_capabilities (NULL, sk2, NULL);
|
print_capabilities (NULL, sk2, NULL);
|
||||||
if (opt.fixed_list_mode) {
|
|
||||||
/* We print the serial number only in fixed list mode
|
|
||||||
for the primary key so, so avoid questions we print
|
|
||||||
it for subkeys also only in this mode. There is no
|
|
||||||
technical reason, though. */
|
|
||||||
putchar(':'); /* End of field 13. */
|
putchar(':'); /* End of field 13. */
|
||||||
putchar(':'); /* End of field 14. */
|
putchar(':'); /* End of field 14. */
|
||||||
if (sk2->protect.s2k.mode == 1001)
|
if (sk2->protect.s2k.mode == 1001)
|
||||||
putchar ('#'); /* Key is just a stub. */
|
putchar ('#'); /* Key is just a stub. */
|
||||||
else if (sk2->protect.s2k.mode == 1002) {
|
else if (sk2->protect.s2k.mode == 1002)
|
||||||
|
{
|
||||||
/* Key is stored on an external token (card) or handled by
|
/* Key is stored on an external token (card) or handled by
|
||||||
the gpg-agent. Print the serial number of that token
|
the gpg-agent. Print the serial number of that token
|
||||||
here. */
|
here. */
|
||||||
@ -1295,35 +1268,19 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
printf ("%02X", sk2->protect.iv[i]);
|
printf ("%02X", sk2->protect.iv[i]);
|
||||||
}
|
}
|
||||||
putchar(':'); /* End of field 15. */
|
putchar(':'); /* End of field 15. */
|
||||||
}
|
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
|
|
||||||
if ( fpr > 1 )
|
if ( fpr > 1 )
|
||||||
print_fingerprint ( NULL, sk2, 0 );
|
print_fingerprint ( NULL, sk2, 0 );
|
||||||
}
|
}
|
||||||
else if( opt.list_sigs && node->pkt->pkttype == PKT_SIGNATURE ) {
|
else if ( opt.list_sigs && node->pkt->pkttype == PKT_SIGNATURE )
|
||||||
|
{
|
||||||
PKT_signature *sig = node->pkt->pkt.signature;
|
PKT_signature *sig = node->pkt->pkt.signature;
|
||||||
int sigrc,fprokay=0;
|
int sigrc,fprokay=0;
|
||||||
char *sigstr;
|
char *sigstr;
|
||||||
size_t fplen;
|
size_t fplen;
|
||||||
byte fparray[MAX_FINGERPRINT_LEN];
|
byte fparray[MAX_FINGERPRINT_LEN];
|
||||||
|
|
||||||
if( !any ) { /* no user id, (maybe a revocation follows)*/
|
|
||||||
if( sig->sig_class == 0x20 )
|
|
||||||
fputs("[revoked]:", stdout);
|
|
||||||
else if( sig->sig_class == 0x18 )
|
|
||||||
fputs("[key binding]:", stdout);
|
|
||||||
else if( sig->sig_class == 0x28 )
|
|
||||||
fputs("[subkey revoked]:", stdout);
|
|
||||||
else
|
|
||||||
putchar (':');
|
|
||||||
putchar(':');
|
|
||||||
print_capabilities (pk, sk, keyblock);
|
|
||||||
putchar('\n');
|
|
||||||
if( fpr )
|
|
||||||
print_fingerprint( pk, sk, 0 );
|
|
||||||
any=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( sig->sig_class == 0x20 || sig->sig_class == 0x28
|
if ( sig->sig_class == 0x20 || sig->sig_class == 0x28
|
||||||
|| sig->sig_class == 0x30 )
|
|| sig->sig_class == 0x30 )
|
||||||
sigstr = "rev";
|
sigstr = "rev";
|
||||||
@ -1333,12 +1290,15 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
sigstr = "sig";
|
sigstr = "sig";
|
||||||
else if ( sig->sig_class == 0x1F )
|
else if ( sig->sig_class == 0x1F )
|
||||||
sigstr = "sig";
|
sigstr = "sig";
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
printf ("sig::::::::::%02x%c:\n",
|
printf ("sig::::::::::%02x%c:\n",
|
||||||
sig->sig_class, sig->flags.exportable?'x':'l');
|
sig->sig_class, sig->flags.exportable?'x':'l');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if( opt.check_sigs ) {
|
|
||||||
|
if ( opt.check_sigs )
|
||||||
|
{
|
||||||
PKT_public_key *signer_pk=NULL;
|
PKT_public_key *signer_pk=NULL;
|
||||||
|
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
@ -1347,7 +1307,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
|
|
||||||
rc = check_key_signature2 ( keyblock, node, NULL, signer_pk,
|
rc = check_key_signature2 ( keyblock, node, NULL, signer_pk,
|
||||||
NULL, NULL, NULL );
|
NULL, NULL, NULL );
|
||||||
switch ( gpg_err_code (rc) ) {
|
switch ( gpg_err_code (rc) )
|
||||||
|
{
|
||||||
case 0: sigrc = '!'; break;
|
case 0: sigrc = '!'; break;
|
||||||
case GPG_ERR_BAD_SIGNATURE: sigrc = '-'; break;
|
case GPG_ERR_BAD_SIGNATURE: sigrc = '-'; break;
|
||||||
case GPG_ERR_NO_PUBKEY:
|
case GPG_ERR_NO_PUBKEY:
|
||||||
@ -1357,7 +1318,7 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
|
|
||||||
if (opt.no_sig_cache)
|
if (opt.no_sig_cache)
|
||||||
{
|
{
|
||||||
if(rc==0)
|
if (!rc)
|
||||||
{
|
{
|
||||||
fingerprint_from_pk (signer_pk, fparray, &fplen);
|
fingerprint_from_pk (signer_pk, fparray, &fplen);
|
||||||
fprokay = 1;
|
fprokay = 1;
|
||||||
@ -1365,7 +1326,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
free_public_key(signer_pk);
|
free_public_key(signer_pk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
rc = 0;
|
rc = 0;
|
||||||
sigrc = ' ';
|
sigrc = ' ';
|
||||||
}
|
}
|
||||||
@ -1391,7 +1353,8 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
printf("[%s] ", g10_errstr(rc) );
|
printf("[%s] ", g10_errstr(rc) );
|
||||||
else if ( sigrc == '?' )
|
else if ( sigrc == '?' )
|
||||||
;
|
;
|
||||||
else if ( !opt.fast_list_mode ) {
|
else if ( !opt.fast_list_mode )
|
||||||
|
{
|
||||||
size_t n;
|
size_t n;
|
||||||
char *p = get_user_id( sig->keyid, &n );
|
char *p = get_user_id( sig->keyid, &n );
|
||||||
print_string( stdout, p, n, ':' );
|
print_string( stdout, p, n, ':' );
|
||||||
@ -1401,12 +1364,12 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
|
|
||||||
if (opt.no_sig_cache && opt.check_sigs && fprokay)
|
if (opt.no_sig_cache && opt.check_sigs && fprokay)
|
||||||
{
|
{
|
||||||
printf(":");
|
putchar (':');
|
||||||
|
|
||||||
for (i=0; i < fplen ; i++ )
|
for (i=0; i < fplen ; i++ )
|
||||||
printf ("%02X", fparray[i] );
|
printf ("%02X", fparray[i] );
|
||||||
|
|
||||||
printf(":");
|
putchar (':');
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
@ -1417,12 +1380,6 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
|
|||||||
/* fixme: check or list other sigs here */
|
/* fixme: check or list other sigs here */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !any ) {/* oops, no user id */
|
|
||||||
putchar(':');
|
|
||||||
putchar(':');
|
|
||||||
print_capabilities (pk, sk, keyblock);
|
|
||||||
putchar('\n');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -179,7 +179,6 @@ struct
|
|||||||
int no_literal;
|
int no_literal;
|
||||||
ulong set_filesize;
|
ulong set_filesize;
|
||||||
int fast_list_mode;
|
int fast_list_mode;
|
||||||
int fixed_list_mode;
|
|
||||||
int ignore_time_conflict;
|
int ignore_time_conflict;
|
||||||
int ignore_valid_from;
|
int ignore_valid_from;
|
||||||
int ignore_crc_error;
|
int ignore_crc_error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user