mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
* keylist.c (print_capabilities): Show 'D' for disabled keys in
capabilities section. * trustdb.c (is_disabled): Remove incorrect comment.
This commit is contained in:
parent
e247a0b3e0
commit
c974390d37
@ -1,3 +1,10 @@
|
|||||||
|
2003-01-06 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keylist.c (print_capabilities): Show 'D' for disabled keys in
|
||||||
|
capabilities section.
|
||||||
|
|
||||||
|
* trustdb.c (is_disabled): Remove incorrect comment.
|
||||||
|
|
||||||
2003-01-03 David Shaw <dshaw@jabberwocky.com>
|
2003-01-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* import.c (import_one): Only do the work to create the status
|
* import.c (import_one): Only do the work to create the status
|
||||||
|
@ -359,12 +359,22 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
|
|
||||||
if ( keyblock ) { /* figure our the usable capabilities */
|
if ( keyblock ) { /* figure our the usable capabilities */
|
||||||
KBNODE k;
|
KBNODE k;
|
||||||
int enc=0, sign=0, cert=0;
|
int enc=0, sign=0, cert=0, disabled=0;
|
||||||
|
|
||||||
for (k=keyblock; k; k = k->next ) {
|
for (k=keyblock; k; k = k->next ) {
|
||||||
if ( k->pkt->pkttype == PKT_PUBLIC_KEY
|
if ( k->pkt->pkttype == PKT_PUBLIC_KEY
|
||||||
|| k->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
|| k->pkt->pkttype == PKT_PUBLIC_SUBKEY ) {
|
||||||
|
u32 kid[2];
|
||||||
pk = k->pkt->pkt.public_key;
|
pk = k->pkt->pkt.public_key;
|
||||||
|
|
||||||
|
if(k->pkt->pkttype==PKT_PUBLIC_KEY)
|
||||||
|
{
|
||||||
|
keyid_from_pk(pk,kid);
|
||||||
|
|
||||||
|
if(is_disabled(NULL,kid))
|
||||||
|
disabled=1;
|
||||||
|
}
|
||||||
|
|
||||||
if ( pk->is_valid && !pk->is_revoked && !pk->has_expired ) {
|
if ( pk->is_valid && !pk->is_revoked && !pk->has_expired ) {
|
||||||
if ( pk->pubkey_usage & PUBKEY_USAGE_ENC )
|
if ( pk->pubkey_usage & PUBKEY_USAGE_ENC )
|
||||||
enc = 1;
|
enc = 1;
|
||||||
@ -398,7 +408,10 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
|
|||||||
putchar ('S');
|
putchar ('S');
|
||||||
if (cert)
|
if (cert)
|
||||||
putchar ('C');
|
putchar ('C');
|
||||||
|
if (disabled)
|
||||||
|
putchar ('D');
|
||||||
}
|
}
|
||||||
|
|
||||||
putchar(':');
|
putchar(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,8 +904,6 @@ is_disabled(void *dummy,u32 *keyid)
|
|||||||
|
|
||||||
init_trustdb ();
|
init_trustdb ();
|
||||||
|
|
||||||
/* Note that get_pubkey returns the main key if keyid points to a
|
|
||||||
subkey. That's a good thing here. */
|
|
||||||
rc = get_pubkey(pk, keyid);
|
rc = get_pubkey(pk, keyid);
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user