X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournal-authenticate.c;h=64bf96874e6490485f58a65b146d60e3f4e86425;hb=641906e9366891e0ad3e6e38b7396a427678c4cf;hp=674f81218f4c3489fb570f8461e7e62ea58a8537;hpb=5996c7c295e073ce21d41305169132c8aa993ad0;p=elogind.git diff --git a/src/journal/journal-authenticate.c b/src/journal/journal-authenticate.c index 674f81218..64bf96874 100644 --- a/src/journal/journal-authenticate.c +++ b/src/journal/journal-authenticate.c @@ -260,6 +260,12 @@ int journal_file_hmac_put_object(JournalFile *f, int type, Object *o, uint64_t p gcry_md_write(f->hmac, o->data.payload, le64toh(o->object.size) - offsetof(DataObject, payload)); break; + case OBJECT_FIELD: + /* Same here */ + gcry_md_write(f->hmac, &o->field.hash, sizeof(o->field.hash)); + gcry_md_write(f->hmac, o->field.payload, le64toh(o->object.size) - offsetof(FieldObject, payload)); + break; + case OBJECT_ENTRY: /* All */ gcry_md_write(f->hmac, &o->entry.seqnum, le64toh(o->object.size) - offsetof(EntryObject, seqnum)); @@ -484,7 +490,6 @@ int journal_file_append_first_tag(JournalFile *f) { return 0; } - int journal_file_parse_verification_key(JournalFile *f, const char *key) { uint8_t *seed; size_t seed_size, c;