lib/deltas: Add inline signature for static-delta superblock
authorFrédéric Danis <frederic.danis@collabora.com>
Wed, 8 Jul 2020 10:15:15 +0000 (12:15 +0200)
committerFrédéric Danis <frederic.danis@collabora.com>
Mon, 14 Sep 2020 07:27:19 +0000 (09:27 +0200)
commit46667567c5a1f17ecb2efbf8fd21e7711539003e
treeb2532abe88ffac490e699cf1dfcc3f998c34b5f9
parent9c040c1a73f6258878905192ba56c46b951f1893
lib/deltas: Add inline signature for static-delta superblock

While the commits contained in the single static-delta file are signed so
we can check them and operate on trusted data, the superblock isn't signed
in any way, so it end up operating on untrusted data to:
 1. actually find where the trusted data is, and
 2. check whether the update is fit for the current device by looking at
    the collection id stored in the metadata

This commit generates signatures of all static data, and concatenate them
to the existing static delta format, i.e. as a GVariant layout `a{sv}ay`
where
 - a{sv}: signatures
 - ay: existing delta variant

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
src/libostree/ostree-repo-static-delta-compilation.c
src/libostree/ostree-repo-static-delta-private.h