signapi: Change API to also return a success message
This is the dual of https://github.com/ostreedev/ostree/pull/2129/commits/1f3c8c5b3de978f6e069c24938967f823cce7ee8 where we output more detail when signapi fails to validate. Extend the API to return a string for success, which we output to stdout. This will help the test suite *and* end users validate that the expected thing is happening. In order to make this cleaner, split the "verified commit" set in the pull code into GPG and signapi verified sets, and have the signapi verified set contain the verification string. We're not doing anything with the verification string in the pull code *yet* but I plan to add something like `ostree pull --verbose` which would finally print this.
This commit is contained in:
1 parent
b2dde24f00
commit
36258036ae
11 files changed
+68
-19
No files matched your search
@@ -72,6 +72,7 @@ struct _OstreeSignInterface
|
||||
gboolean (* data_verify) (OstreeSign *self,
|
||||
GBytes *data,
|
||||
GVariant *signatures,
|
||||
char **out_success_message,
|
||||
GError **error);
|
||||
const gchar *(* metadata_key) (OstreeSign *self);
|
||||
const gchar *(* metadata_format) (OstreeSign *self);
|
||||
@@ -105,6 +106,7 @@ _OSTREE_PUBLIC
|
||||
gboolean ostree_sign_data_verify (OstreeSign *self,
|
||||
GBytes *data,
|
||||
GVariant *signatures,
|
||||
char **out_success_message,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
@@ -124,6 +126,7 @@ _OSTREE_PUBLIC
|
||||
gboolean ostree_sign_commit_verify (OstreeSign *self,
|
||||
OstreeRepo *repo,
|
||||
const gchar *commit_checksum,
|
||||
char **out_success_message,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
Reference in new issue
Block a user