1
0
Fork 0
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:
David Shaw 2003-05-07 14:04:27 +00:00
parent 879014e14b
commit 53f2944998
7 changed files with 46 additions and 27 deletions

View file

@ -733,6 +733,27 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc)
return classify_user_id2 (name, desc, &dummy);
}
static int
skip_disabled(void *dummy,u32 *keyid)
{
int rc,disabled=0;
PKT_public_key *pk=m_alloc_clear(sizeof(PKT_public_key));
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;
}
disabled=is_disabled(pk);
leave:
free_public_key(pk);
return disabled;
}
/****************
* Try to get the pubkey by the userid. This function looks for the
* first pubkey certificate which has the given name in a user_id.
@ -784,7 +805,7 @@ key_byname( GETKEY_CTX *retctx, STRLIST namelist,
&& ctx->items[n].mode!=KEYDB_SEARCH_MODE_FPR16
&& ctx->items[n].mode!=KEYDB_SEARCH_MODE_FPR20
&& ctx->items[n].mode!=KEYDB_SEARCH_MODE_FPR)
ctx->items[n].skipfnc=is_disabled;
ctx->items[n].skipfnc=skip_disabled;
}
ctx->kr_handle = keydb_new (secmode);