summaryrefslogtreecommitdiffstats
path: root/g10/tdbio.h
diff options
context:
space:
mode:
Diffstat (limited to 'g10/tdbio.h')
-rw-r--r--g10/tdbio.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/g10/tdbio.h b/g10/tdbio.h
index 6fb0e545c..0cbb851f2 100644
--- a/g10/tdbio.h
+++ b/g10/tdbio.h
@@ -26,6 +26,10 @@
#define SIGS_PER_RECORD ((TRUST_RECORD_LEN-10)/5)
#define ITEMS_PER_HTBL_RECORD ((TRUST_RECORD_LEN-2)/4)
#define ITEMS_PER_HLST_RECORD ((TRUST_RECORD_LEN-6)/5)
+#define ITEMS_PER_PREF_RECORD (TRUST_RECORD_LEN-10)
+#if ITEMS_PER_PREF_RECORD % 2
+ #error ITEMS_PER_PREF_RECORD must be even
+#endif
#define MAX_LIST_SIGS_DEPTH 20
@@ -40,7 +44,6 @@
#define RECTYPE_HLST 11
-
#define DIRF_CHECKED 1 /* everything has been checked, the other bits are
valid */
#define DIRF_MISKEY 2 /* some keys are missing, so they could not be checked*/
@@ -91,10 +94,11 @@ struct trust_record {
byte uidflags;
byte namehash[20]; /* ripemd hash of the username */
} uid;
- struct { /* preference reord */
+ struct { /* preference record */
ulong lid; /* point back to the directory record */
/* or 0 for a glocal pref record */
ulong next; /* points to next pref record */
+ byte data[ITEMS_PER_PREF_RECORD];
} pref;
struct { /* signature record */
ulong lid;