summaryrefslogtreecommitdiff
path: root/src/journal/journal-authenticate.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-13 11:15:41 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-13 11:15:41 +0100
commit91ba5ac7d0196074863ff08f5251689d324a6550 (patch)
treec12c05be46f21a42d30f2bf1b46d1207db49db89 /src/journal/journal-authenticate.c
parent6c3bedd5cfef5c70185fbbac33829c5c11686669 (diff)
parent718af59e9ac1a525b0a73b99a74bc376f1b4d49d (diff)
Merge pull request #2589 from keszybz/resolve-tool-2
Better support of OPENPGPKEY, CAA, TLSA packets and tests
Diffstat (limited to 'src/journal/journal-authenticate.c')
-rw-r--r--src/journal/journal-authenticate.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/journal/journal-authenticate.c b/src/journal/journal-authenticate.c
index 49f3c8f0f4..d8af113d3f 100644
--- a/src/journal/journal-authenticate.c
+++ b/src/journal/journal-authenticate.c
@@ -22,6 +22,7 @@
#include "fd-util.h"
#include "fsprg.h"
+#include "gcrypt-util.h"
#include "hexdecoct.h"
#include "journal-authenticate.h"
#include "journal-def.h"
@@ -424,25 +425,13 @@ finish:
return r;
}
-static void initialize_libgcrypt(void) {
- const char *p;
-
- if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P))
- return;
-
- p = gcry_check_version("1.4.5");
- assert(p);
-
- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
-}
-
int journal_file_hmac_setup(JournalFile *f) {
gcry_error_t e;
if (!f->seal)
return 0;
- initialize_libgcrypt();
+ initialize_libgcrypt(true);
e = gcry_md_open(&f->hmac, GCRY_MD_SHA256, GCRY_MD_FLAG_HMAC);
if (e != 0)