mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* keylist.c (print_capabilities): Properly indicate per-key capabilities
of sign&encrypt primary keys that have secret-parts-missing (i.e. no capabilities at all).
This commit is contained in:
parent
d1738ac243
commit
3832320327
2 changed files with 18 additions and 7 deletions
|
@ -300,16 +300,21 @@ print_key_data( PKT_public_key *pk, u32 *keyid )
|
|||
static void
|
||||
print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
||||
{
|
||||
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
||||
if(pk || (sk && sk->protect.s2k.mode!=1001))
|
||||
{
|
||||
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
||||
|
||||
if ( use & PUBKEY_USAGE_ENC ) {
|
||||
if ( use & PUBKEY_USAGE_ENC )
|
||||
putchar ('e');
|
||||
|
||||
if ( use & PUBKEY_USAGE_SIG )
|
||||
{
|
||||
putchar ('s');
|
||||
if( pk? pk->is_primary : sk->is_primary )
|
||||
putchar ('c');
|
||||
}
|
||||
}
|
||||
if ( (use & PUBKEY_USAGE_SIG) && !(sk?(sk->protect.s2k.mode==1001):0) ) {
|
||||
putchar ('s');
|
||||
if( pk? pk->is_primary : sk->is_primary )
|
||||
putchar ('c');
|
||||
}
|
||||
|
||||
if ( keyblock ) { /* figure our the usable capabilities */
|
||||
KBNODE k;
|
||||
int enc=0, sign=0, cert=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue