aboutsummaryrefslogtreecommitdiffstats
path: root/g10/packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'g10/packet.h')
-rw-r--r--g10/packet.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/packet.h b/g10/packet.h
index a10ee811a..c75b301c5 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -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 */