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>
This commit is contained in:
Frédéric Danis committed 2020-09-14 09:27:19 +02:00
1 parent 869dbc037e
commit fb1faf17d6
4 files changed
+108 -34

No files matched your search

+1
View File
@@ -412,6 +412,7 @@ ostree_repo_list_commit_objects_starting_with
ostree_repo_list_static_delta_names
OstreeStaticDeltaGenerateOpt
ostree_repo_static_delta_generate
ostree_repo_static_delta_execute_offline_with_signature
ostree_repo_static_delta_execute_offline
ostree_repo_static_delta_verify_signature
ostree_repo_traverse_new_reachable