diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-16 23:58:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-08-16 23:58:14 +0200 |
commit | 14d10188de1fd58e663d73683a400d8d7dc67dba (patch) | |
tree | 5ae905c6b4e53a67972903b022b9b89425f35950 /src/journal/test-journal-verify.c | |
parent | a8e5f51484ba832e299a38f2a54e455e445d2896 (diff) |
journal: add FSPRG journal authentication
Diffstat (limited to 'src/journal/test-journal-verify.c')
-rw-r--r-- | src/journal/test-journal-verify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/test-journal-verify.c b/src/journal/test-journal-verify.c index bada498fab..8a7d998ff9 100644 --- a/src/journal/test-journal-verify.c +++ b/src/journal/test-journal-verify.c @@ -35,6 +35,7 @@ int main(int argc, char *argv[]) { char t[] = "/tmp/journal-XXXXXX"; unsigned n; JournalFile *f; + const char *verification_key = argv[1]; log_set_max_level(LOG_DEBUG); @@ -43,7 +44,7 @@ int main(int argc, char *argv[]) { log_info("Generating..."); - assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, true, true, NULL, NULL, NULL, &f) == 0); + assert_se(journal_file_open("test.journal", O_RDWR|O_CREAT, 0666, true, !!verification_key, NULL, NULL, NULL, &f) == 0); for (n = 0; n < N_ENTRIES; n++) { struct iovec iovec; @@ -67,7 +68,7 @@ int main(int argc, char *argv[]) { log_info("Verifying..."); assert_se(journal_file_open("test.journal", O_RDONLY, 0666, false, false, NULL, NULL, NULL, &f) == 0); - assert_se(journal_file_verify(f, NULL) >= 0); + assert_se(journal_file_verify(f, verification_key) >= 0); journal_file_close(f); log_info("Exiting..."); |