lib/deltas: Check signed delta in execute_offline
authorFrédéric Danis <frederic.danis@collabora.com>
Tue, 25 Aug 2020 07:26:09 +0000 (09:26 +0200)
committerFrédéric Danis <frederic.danis@collabora.com>
Mon, 14 Sep 2020 07:27:19 +0000 (09:27 +0200)
commitfb1faf17d6f9cefd349c46f48f7a28f269f07576
tree04b4c03a2a143d281bbb0c901ef1f77caf692848
parent869dbc037e92fbe2d859e8fda97bc4a287160770
lib/deltas: Check signed delta in execute_offline

Add a new function `ostree_repo_static_delta_execute_offline_with_signature`
which takes a signature engine to verify the delta before applying it.
The `ostree_repo_static_delta_execute_offline` is just a wrapper to this
new function, passing a NULL signature engine.
When this function is called without signature engine, but with a sign
delta, it will only fails if `sign-verify-deltas` is set to true in repo
core options.

This commits move signature existence check and delta signature
verification to share common parts between existing APIs and the new
function.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
apidoc/ostree-sections.txt
src/libostree/libostree-devel.sym
src/libostree/ostree-repo-static-delta-core.c
src/libostree/ostree-repo.h