diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-08 15:13:22 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-08 15:13:22 +0100 |
commit | 39b91ca4e7b40d4a1ab3fb8ac857cecc084b7308 (patch) | |
tree | 607d1857a0c50ac2abab6762b612ef7f5e8bbcd0 /runtime/librsgt_read.c | |
parent | febd1c619d3774766064294358c885f14c74ed7c (diff) | |
download | rsyslog-39b91ca4e7b40d4a1ab3fb8ac857cecc084b7308.tar.gz rsyslog-39b91ca4e7b40d4a1ab3fb8ac857cecc084b7308.tar.bz2 rsyslog-39b91ca4e7b40d4a1ab3fb8ac857cecc084b7308.zip |
logsig: add capability to write interim hash records
Diffstat (limited to 'runtime/librsgt_read.c')
-rw-r--r-- | runtime/librsgt_read.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/runtime/librsgt_read.c b/runtime/librsgt_read.c index a1c59509..be78580d 100644 --- a/runtime/librsgt_read.c +++ b/runtime/librsgt_read.c @@ -237,7 +237,7 @@ done: return r; } static int -rsgt_tlvrdREC_HASH(FILE *fp, imprint_t **imprint, uint16_t tlvlen) +rsgt_tlvrdIMPRINT(FILE *fp, imprint_t **imprint, uint16_t tlvlen) { int r = 1; imprint_t *imp; @@ -293,7 +293,11 @@ rsgt_tlvrd(FILE *fp, uint16_t *tlvtype, uint16_t *tlvlen, void *obj) if((r = rsgt_tlvrdTL(fp, tlvtype, tlvlen)) != 0) goto done; switch(*tlvtype) { case 0x0900: - r = rsgt_tlvrdREC_HASH(fp, obj, *tlvlen); + r = rsgt_tlvrdIMPRINT(fp, obj, *tlvlen); + if(r != 0) goto done; + break; + case 0x0901: + r = rsgt_tlvrdIMPRINT(fp, obj, *tlvlen); if(r != 0) goto done; break; case 0x0902: @@ -345,7 +349,14 @@ rsgt_printIMPRINT(FILE *fp, char *name, imprint_t *imp, uint8_t verbose) static void rsgt_printREC_HASH(FILE *fp, imprint_t *imp, uint8_t verbose) { - rsgt_printIMPRINT(fp, "[0x0900]Record Signature Record: ", + rsgt_printIMPRINT(fp, "[0x0900]Record hash................: ", + imp, verbose); +} + +static void +rsgt_printINT_HASH(FILE *fp, imprint_t *imp, uint8_t verbose) +{ + rsgt_printIMPRINT(fp, "[0x0901]Intermediate aggregate hash: ", imp, verbose); } @@ -396,6 +407,9 @@ rsgt_tlvprint(FILE *fp, uint16_t tlvtype, void *obj, uint8_t verbose) case 0x0900: rsgt_printREC_HASH(fp, obj, verbose); break; + case 0x0901: + rsgt_printINT_HASH(fp, obj, verbose); + break; case 0x0902: rsgt_printBLOCK_SIG(fp, obj, verbose); break; |