mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* keyedit.c (sign_uids): Show keyid of the key making the signature.
* trustdb.h, trustdb.c (is_disabled), keylist.c (print_capabilities), gpgv.c (is_disabled): is_disabled now takes a pk and not just the keyid. This is for speed since there is no need to re-fetch a key when we already have that key handy. * getkey.c (skip_disabled): New function to get a pk and call is_disabled on it. (key_byname): Use it here.
This commit is contained in:
parent
879014e14b
commit
53f2944998
7 changed files with 46 additions and 27 deletions
|
@ -745,23 +745,14 @@ clear_validity (PKT_public_key *pk)
|
|||
|
||||
/* Return true if key is disabled */
|
||||
int
|
||||
is_disabled(void *dummy,u32 *keyid)
|
||||
is_disabled(PKT_public_key *pk)
|
||||
{
|
||||
int rc;
|
||||
TRUSTREC trec;
|
||||
int disabled=0; /* default to not disabled */
|
||||
PKT_public_key *pk=m_alloc_clear(sizeof(PKT_public_key));
|
||||
int disabled=0;
|
||||
|
||||
init_trustdb ();
|
||||
init_trustdb();
|
||||
|
||||
rc = get_pubkey(pk, keyid);
|
||||
if(rc)
|
||||
{
|
||||
log_error("error checking disabled status of %08lX: %s\n",
|
||||
(ulong)keyid[1],g10_errstr(rc));
|
||||
goto leave;
|
||||
}
|
||||
|
||||
rc = read_trust_record (pk, &trec);
|
||||
if (rc && rc != -1)
|
||||
{
|
||||
|
@ -775,8 +766,7 @@ is_disabled(void *dummy,u32 *keyid)
|
|||
disabled=1;
|
||||
|
||||
leave:
|
||||
free_public_key(pk);
|
||||
return disabled;
|
||||
return disabled;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue