diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-18 17:36:38 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-18 17:36:38 +0100 |
commit | 9101b00ed29145bde5b816889544eed4638f0925 (patch) | |
tree | f201e14421d349b38e60245996322d57348b3acb | |
parent | cec4c3d3a2cf429999c37d8e987d1186c0755e9b (diff) | |
download | rsyslog-9101b00ed29145bde5b816889544eed4638f0925.tar.gz rsyslog-9101b00ed29145bde5b816889544eed4638f0925.tar.bz2 rsyslog-9101b00ed29145bde5b816889544eed4638f0925.zip |
logsig: fix calculation of merkle tree at end of signature block
-rw-r--r-- | runtime/librsgt.c | 2 | ||||
-rw-r--r-- | runtime/librsgt_read.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/librsgt.c b/runtime/librsgt.c index 92b0d412..20c8fd79 100644 --- a/runtime/librsgt.c +++ b/runtime/librsgt.c @@ -649,7 +649,7 @@ sigblkFinish(gtfile gf) root = NULL; for(j = 0 ; j < gf->nRoots ; ++j) { if(root == NULL) { - root = gf->roots_hash[j]; + root = gf->roots_valid[j] ? gf->roots_hash[j] : NULL; gf->roots_valid[j] = 0; /* guess this is redundant with init, maybe del */ } else if(gf->roots_valid[j]) { rootDel = root; diff --git a/runtime/librsgt_read.c b/runtime/librsgt_read.c index 0cc5f492..32a62c65 100644 --- a/runtime/librsgt_read.c +++ b/runtime/librsgt_read.c @@ -744,7 +744,7 @@ verifySigblkFinish(gtfile gf) root = NULL; for(j = 0 ; j < gf->nRoots ; ++j) { if(root == NULL) { - root = gf->roots_hash[j]; + root = gf->roots_valid[j] ? gf->roots_hash[j] : NULL; gf->roots_valid[j] = 0; /* guess this is redundant with init, maybe del */ } else if(gf->roots_valid[j]) { rootDel = root; |