mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* g10.c (main): New --gnupg option to disable the various --openpgp,
--pgpX, etc. options. This is the same as --no-XXXX for those options. * packet.h, getkey.c (skip_disabled), keylist.c (print_capabilities): New "pk_is_disabled" macro to retrieve the cached disabled value if available, and fill it in via cache_disabled_value if not available. * trustdb.h, gpgv.c (is_disabled), trustdb.c (is_disabled): Rename to cache_disabled_value. Cache the result of the check so we don't need to hit the trustdb more than once. * trustdb.c (get_validity): Cache the disabled value since we have it handy and it might be useful later.
This commit is contained in:
parent
66f51ba19f
commit
6957239566
8 changed files with 55 additions and 24 deletions
|
@ -205,6 +205,7 @@ typedef struct {
|
|||
u32 main_keyid[2]; /* keyid of the primary key */
|
||||
u32 keyid[2]; /* calculated by keyid_from_pk() */
|
||||
byte is_primary;
|
||||
byte is_disabled; /* 0 for unset, 1 for enabled, 2 for disabled. */
|
||||
prefitem_t *prefs; /* list of preferences (may be NULL) */
|
||||
int mdc_feature; /* mdc feature set */
|
||||
PKT_user_id *user_id; /* if != NULL: found by that uid */
|
||||
|
@ -213,6 +214,10 @@ typedef struct {
|
|||
MPI pkey[PUBKEY_MAX_NPKEY];
|
||||
} PKT_public_key;
|
||||
|
||||
/* Evaluates as true if the pk is disabled, and false if it isn't. If
|
||||
there is no disable value cached, fill one in. */
|
||||
#define pk_is_disabled(a) (((a)->is_disabled)?((a)->is_disabled==2):(cache_disabled_value((a))))
|
||||
|
||||
typedef struct {
|
||||
u32 timestamp; /* key made */
|
||||
u32 expiredate; /* expires at this date or 0 if not at all */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue