mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-22 19:58:29 +01:00
Fix bug 998.
This commit is contained in:
parent
e532a4e86f
commit
c092f026fe
@ -1,3 +1,8 @@
|
|||||||
|
2009-02-09 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* keylist.c (print_capabilities): Take care of cert-only keys.
|
||||||
|
Fixes bug#998.
|
||||||
|
|
||||||
2009-02-03 David Shaw <dshaw@jabberwocky.com>
|
2009-02-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* keyserver.c (keyserver_typemap): gpgkeys_hkp handles hkps as
|
* keyserver.c (keyserver_typemap): gpgkeys_hkp handles hkps as
|
||||||
|
@ -547,6 +547,7 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
if(pk || (sk && sk->protect.s2k.mode!=1001))
|
if(pk || (sk && sk->protect.s2k.mode!=1001))
|
||||||
{
|
{
|
||||||
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage;
|
||||||
|
int c_printed = 0;
|
||||||
|
|
||||||
if ( use & PUBKEY_USAGE_ENC )
|
if ( use & PUBKEY_USAGE_ENC )
|
||||||
putchar ('e');
|
putchar ('e');
|
||||||
@ -555,8 +556,18 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
{
|
{
|
||||||
putchar ('s');
|
putchar ('s');
|
||||||
if( pk? pk->is_primary : sk->is_primary )
|
if( pk? pk->is_primary : sk->is_primary )
|
||||||
|
{
|
||||||
putchar ('c');
|
putchar ('c');
|
||||||
|
/* The PUBKEY_USAGE_CERT flag was introduced later and
|
||||||
|
we used to always print 'c' for a primary key. To
|
||||||
|
avoid any regression here we better track whether we
|
||||||
|
printed 'c' already. */
|
||||||
|
c_printed = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (use & PUBKEY_USAGE_CERT) && !c_printed )
|
||||||
|
putchar ('c');
|
||||||
|
|
||||||
if ( (use & PUBKEY_USAGE_AUTH) )
|
if ( (use & PUBKEY_USAGE_AUTH) )
|
||||||
putchar ('a');
|
putchar ('a');
|
||||||
@ -583,6 +594,8 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
if(pk->is_primary)
|
if(pk->is_primary)
|
||||||
cert = 1;
|
cert = 1;
|
||||||
}
|
}
|
||||||
|
if ( pk->pubkey_usage & PUBKEY_USAGE_CERT )
|
||||||
|
cert = 1;
|
||||||
if ( (pk->pubkey_usage & PUBKEY_USAGE_AUTH) )
|
if ( (pk->pubkey_usage & PUBKEY_USAGE_AUTH) )
|
||||||
auth = 1;
|
auth = 1;
|
||||||
}
|
}
|
||||||
@ -600,6 +613,8 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
if(sk->is_primary)
|
if(sk->is_primary)
|
||||||
cert = 1;
|
cert = 1;
|
||||||
}
|
}
|
||||||
|
if ( (sk->pubkey_usage & PUBKEY_USAGE_CERT) )
|
||||||
|
cert = 1;
|
||||||
if ( (sk->pubkey_usage & PUBKEY_USAGE_AUTH) )
|
if ( (sk->pubkey_usage & PUBKEY_USAGE_AUTH) )
|
||||||
auth = 1;
|
auth = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user