summaryrefslogtreecommitdiffstats
path: root/runtime/librsgt.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/librsgt.h')
-rw-r--r--runtime/librsgt.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/librsgt.h b/runtime/librsgt.h
index 4ce0be30..ff35d19b 100644
--- a/runtime/librsgt.h
+++ b/runtime/librsgt.h
@@ -39,6 +39,7 @@ struct gtctx_s {
GTDataHash *x_prev; /* last leaf hash (maybe of previous block) --> preserve on term */
char *timestamper;
unsigned char *sigfilename;
+ unsigned char *statefilename;
int fd;
unsigned char *blkStrtHash; /* last hash from previous block */
uint16_t lenBlkStrtHash;
@@ -70,8 +71,6 @@ struct block_sig_s {
uint8_t hashID;
uint8_t sigID; /* what type of *signature*? */
uint8_t *iv;
- // TODO: think about the situation where the last hash is
- // different from the current one (e.g. config change!)
imprint_t lastHash;
uint64_t recCount;
struct {
@@ -82,6 +81,17 @@ struct block_sig_s {
} sig;
};
+
+/* the following defines the gtstate file record. Currently, this record
+ * is fixed, we may change that over time.
+ */
+struct rsgtstatefile {
+ char hdr[8]; /* must be "GTSTAT10" */
+ uint8_t hashID;
+ uint8_t lenHash;
+ /* after that, the hash value is contained within the file */
+};
+
/* error states */
#define RSGTE_IO 1 /* any kind of io error, including EOF */
#define RSGTE_FMT 2 /* data fromat error */