summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-pull-private.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2020-05-12 01:26:00 +0000
committerColin Walters <walters@verbum.org>2020-05-12 15:20:26 +0000
commit9509a4bc948672b6bdf3ccdd0ea882a141c78974 (patch)
treea43d2b40749ecee91b1ce60ff38f114aaec4f914 /src/libostree/ostree-repo-pull-private.h
parent4293c36188143cfbe9d7932d69be0a37da3ec361 (diff)
downloadostree-9509a4bc948672b6bdf3ccdd0ea882a141c78974.tar.gz
pull: Further cleanup signapi verification
Previously in the pull code, every time we went to verify a commit we would re-initialize an `OstreeSign` instance of each time, re-parse the remote configuration and re-load its public keys etc. In most cases this doesn't matter really because we're pulling one commit, but if e.g. pulling a commit with history would get a bit silly. This changes things so that the pull code initializes the verifiers once, and reuses them thereafter. This is continuing towards changing the code to support explicitly configured verifiers, xref https://github.com/ostreedev/ostree/issues/2080
Diffstat (limited to 'src/libostree/ostree-repo-pull-private.h')
-rw-r--r--src/libostree/ostree-repo-pull-private.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libostree/ostree-repo-pull-private.h b/src/libostree/ostree-repo-pull-private.h
index b9eb2342..5bc2a33a 100644
--- a/src/libostree/ostree-repo-pull-private.h
+++ b/src/libostree/ostree-repo-pull-private.h
@@ -123,6 +123,8 @@ typedef struct {
gboolean is_commit_only;
OstreeRepoImportFlags importflags;
+ GPtrArray *signapi_verifiers;
+
GPtrArray *dirs;
gboolean have_previous_bytes;
@@ -137,18 +139,16 @@ typedef struct {
GSource *idle_src;
} OtPullData;
-gboolean
-_sign_verify_for_remote (OstreeRepo *repo,
- const gchar *remote_name,
- GBytes *signed_data,
- GVariant *metadata,
- GError **error);
+GPtrArray *
+_signapi_verifiers_for_remote (OstreeRepo *repo,
+ const char *remote_name,
+ GError **error);
gboolean
-_signapi_load_public_keys (OstreeSign *sign,
- OstreeRepo *repo,
- const gchar *remote_name,
- GError **error);
+_sign_verify_for_remote (GPtrArray *signers,
+ GBytes *signed_data,
+ GVariant *metadata,
+ GError **error);
gboolean
_verify_unwritten_commit (OtPullData *pull_data,