mirror of
https://github.com/ostreedev/ostree.git
synced 2025-08-25 13:49:24 +03:00
lib/pull: Use ostree_repo_verify_summary() to verify summary on pull
Rather than duplicating the code. This introduces no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #961 Approved by: cgwalters
This commit is contained in:
committed by
Atomic Bot
parent
4c238c350d
commit
a03f0447cb
@ -3341,18 +3341,11 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||||||
|
|
||||||
if (pull_data->gpg_verify_summary && bytes_summary && bytes_sig)
|
if (pull_data->gpg_verify_summary && bytes_summary && bytes_sig)
|
||||||
{
|
{
|
||||||
g_autoptr(GVariant) sig_variant = NULL;
|
g_autoptr(OstreeGpgVerifyResult) result = NULL;
|
||||||
glnx_unref_object OstreeGpgVerifyResult *result = NULL;
|
|
||||||
|
|
||||||
sig_variant = g_variant_new_from_bytes (OSTREE_SUMMARY_SIG_GVARIANT_FORMAT, bytes_sig, FALSE);
|
result = ostree_repo_verify_summary (self, pull_data->remote_name,
|
||||||
result = _ostree_repo_gpg_verify_with_metadata (self,
|
bytes_summary, bytes_sig,
|
||||||
bytes_summary,
|
cancellable, error);
|
||||||
sig_variant,
|
|
||||||
pull_data->remote_name,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
cancellable,
|
|
||||||
error);
|
|
||||||
if (!ostree_gpg_verify_result_require_valid_signature (result, error))
|
if (!ostree_gpg_verify_result_require_valid_signature (result, error))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user