summaryrefslogtreecommitdiffstats
path: root/runtime/librsgt.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-03-07 19:00:51 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-07 19:00:51 +0100
commit212d4e4fe684a4562b284c5b07d9873b0135b10f (patch)
tree44a0dbc9a29fed3523e160eb174bbde0d332898c /runtime/librsgt.h
parent85dd75a54cc9032fce7553f284618cfbbf8508ef (diff)
downloadrsyslog-212d4e4fe684a4562b284c5b07d9873b0135b10f.tar.gz
rsyslog-212d4e4fe684a4562b284c5b07d9873b0135b10f.tar.bz2
rsyslog-212d4e4fe684a4562b284c5b07d9873b0135b10f.zip
logsig: add config parameters (for omfile)
Diffstat (limited to 'runtime/librsgt.h')
-rw-r--r--runtime/librsgt.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/runtime/librsgt.h b/runtime/librsgt.h
index ff35d19b..a4ea7cc1 100644
--- a/runtime/librsgt.h
+++ b/runtime/librsgt.h
@@ -37,6 +37,9 @@ struct gtctx_s {
enum GTHashAlgorithm hashAlg;
uint8_t *IV; /* initial value for blinding masks (where to do we get it from?) */
GTDataHash *x_prev; /* last leaf hash (maybe of previous block) --> preserve on term */
+ uint8_t bKeepRecordHashes;
+ uint8_t bKeepTreeHashes;
+ uint64_t blockSizeLimit;
char *timestamper;
unsigned char *sigfilename;
unsigned char *statefilename;
@@ -172,10 +175,33 @@ getIVLen(block_sig_t *bs)
{
return hashOutputLengthOctets(bs->hashID);
}
+static inline void
+rsgtSetTimestamper(gtctx ctx, char *timestamper)
+{
+ free(ctx->timestamper);
+ ctx->timestamper = strdup(timestamper);
+}
+static inline void
+rsgtSetBlockSizeLimit(gtctx ctx, uint64_t limit)
+{
+ ctx->blockSizeLimit = limit;
+}
+static inline void
+rsgtSetKeepRecordHashes(gtctx ctx, int val)
+{
+ ctx->bKeepRecordHashes = val;
+}
+static inline void
+rsgtSetKeepTreeHashes(gtctx ctx, int val)
+{
+ ctx->bKeepTreeHashes = val;
+}
+int rsgtSetHashFunction(gtctx ctx, char *algName);
void rsgtInit(char *usragent);
void rsgtExit(void);
-gtctx rsgtCtxNew(unsigned char *logfn, enum GTHashAlgorithm hashAlg);
+gtctx rsgtCtxNew(void);
+int rsgtCtxOpenFile(gtctx ctx, unsigned char *logfn);
void rsgtCtxDel(gtctx ctx);
void sigblkInit(gtctx ctx);
void sigblkAddRecord(gtctx ctx, const unsigned char *rec, const size_t len);