aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-11-13 13:23:03 +0000
committerDavid Shaw <[email protected]>2002-11-13 13:23:03 +0000
commit365011c8f1cf6d73d44503a65b63ffb5bede8065 (patch)
tree6884702eb04d35dbe3a1b9f2a2bf7caa2d143dbf /g10/keylist.c
parent* config.sub, config.guess: Updated from ftp.gnu.org/gnu/config (diff)
downloadgnupg-365011c8f1cf6d73d44503a65b63ffb5bede8065.tar.gz
gnupg-365011c8f1cf6d73d44503a65b63ffb5bede8065.zip
* keyedit.c (show_key_with_all_names_colon): Make --with-colons --edit
display match the validity and trust of --with-colons --list-keys. * passphrase.c (agent_send_all_options): Fix compile warning. * keylist.c (list_keyblock_colon): Validity for subkeys should match that of the primary key, and not that of the last user ID. * getkey.c (merge_selfsigs): Revoked/expired/invalid primary keys carry these facts onto all their subkeys, but only after the subkey has a chance to be marked valid. This is to fix an incorrect "invalid public key" error verifying a signature made by a revoked signing subkey, with a valid unrevoked primary key.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index afe88265d..c77ec2df5 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -694,7 +694,6 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
sk = NULL;
keyid_from_pk( pk, keyid );
fputs( "pub:", stdout );
- trustletter = 0;
if ( !pk->is_valid )
putchar ('i');
else if ( pk->is_revoked )
@@ -755,6 +754,7 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
}
else {
byte namehash[20];
+ int uid_validity;
if( pk && !ulti_hack ) {
if( node->pkt->pkt.user_id->attrib_data )
@@ -765,11 +765,11 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
rmd160_hash_buffer( namehash,
node->pkt->pkt.user_id->name,
node->pkt->pkt.user_id->len );
- trustletter = get_validity_info( pk, namehash );
+ uid_validity = get_validity_info( pk, namehash );
}
else
- trustletter = 'u';
- printf("%s:%c::::::::",str,trustletter);
+ uid_validity = 'u';
+ printf("%s:%c::::::::",str,uid_validity);
}
}
if(node->pkt->pkt.user_id->attrib_data)
@@ -818,7 +818,9 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
;
else {
- printf("%c", trustletter );
+ /* trustletter should always be defined here */
+ if(trustletter)
+ printf("%c", trustletter );
}
printf(":%u:%d:%08lX%08lX:%s:%s:",
nbits_from_pk( pk2 ),