summaryrefslogtreecommitdiff
path: root/src/journal/test-journal-verify.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-20 16:51:46 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-20 16:51:46 +0200
commitfeb12d3ed2c7f9132c64773c7c41b9e3a608a814 (patch)
treeb582953e06dc50d4b14b04c2b7f4738d73435c60 /src/journal/test-journal-verify.c
parent8088cbd3cfcf539c984d8042cd2b92ebbfda6d82 (diff)
journal: make libgcrypt dependency optional
Diffstat (limited to 'src/journal/test-journal-verify.c')
-rw-r--r--src/journal/test-journal-verify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/test-journal-verify.c b/src/journal/test-journal-verify.c
index ed6e21dc0c..b6677215c0 100644
--- a/src/journal/test-journal-verify.c
+++ b/src/journal/test-journal-verify.c
@@ -55,7 +55,7 @@ static int raw_verify(const char *fn, const char *verification_key) {
JournalFile *f;
int r;
- r = journal_file_open(fn, O_RDONLY, 0666, true, true, NULL, NULL, NULL, &f);
+ r = journal_file_open(fn, O_RDONLY, 0666, true, !!verification_key, NULL, NULL, NULL, &f);
if (r < 0)
return r;
@@ -107,18 +107,19 @@ int main(int argc, char *argv[]) {
log_info("Verifying...");
- assert_se(journal_file_open("test.journal", O_RDONLY, 0666, true, true, NULL, NULL, NULL, &f) == 0);
+ assert_se(journal_file_open("test.journal", O_RDONLY, 0666, true, !!verification_key, NULL, NULL, NULL, &f) == 0);
/* journal_file_print_header(f); */
journal_file_dump(f);
assert_se(journal_file_verify(f, verification_key, &from, &to, &total, true) >= 0);
- if (verification_key && journal_file_fss_enabled(f)) {
+ if (verification_key && JOURNAL_HEADER_SEALED(f->header)) {
log_info("=> Validated from %s to %s, %s missing",
format_timestamp(a, sizeof(a), from),
format_timestamp(b, sizeof(b), to),
format_timespan(c, sizeof(c), total > to ? total - to : 0));
}
+
journal_file_close(f);
if (verification_key) {