lib/pull: Use ostree_repo_verify_summary() to verify summary on pull
authorPhilip Withnall <withnall@endlessm.com>
Fri, 23 Jun 2017 15:10:03 +0000 (16:10 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 27 Jun 2017 19:19:32 +0000 (19:19 +0000)
Rather than duplicating the code. This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #961
Approved by: cgwalters

src/libostree/ostree-repo-pull.c

index 0b7dae17b3f85356fcb786e1876f87ad2490356b..fc29a2ecc5f360bc26c9593ad8cd38c350ac254f 100644 (file)
@@ -3341,18 +3341,11 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
     if (pull_data->gpg_verify_summary && bytes_summary && bytes_sig)
       {
-        g_autoptr(GVariant) sig_variant = 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_gpg_verify_with_metadata (self,
-                                                        bytes_summary,
-                                                        sig_variant,
-                                                        pull_data->remote_name,
-                                                        NULL,
-                                                        NULL,
-                                                        cancellable,
-                                                        error);
+        g_autoptr(OstreeGpgVerifyResult) result = NULL;
+
+        result = ostree_repo_verify_summary (self, pull_data->remote_name,
+                                             bytes_summary, bytes_sig,
+                                             cancellable, error);
         if (!ostree_gpg_verify_result_require_valid_signature (result, error))
           goto out;
       }