Skip to content

Commit

Permalink
status: Add an option to skip signature verification
Browse files Browse the repository at this point in the history
Since it's really expensive in some cases.
  • Loading branch information
cgwalters committed Jan 4, 2024
1 parent 24bf5b7 commit e95109b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/ostree/ot-admin-builtin-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
#include <glib/gi18n.h>

static gboolean opt_verify;

static GOptionEntry options[] = { { "verify", 'V', 0, G_OPTION_ARG_NONE, &opt_verify,
"Print the commit verification status", NULL },
{ NULL } };
static gboolean opt_skip_signatures;

static GOptionEntry options[]
= { { "verify", 'V', 0, G_OPTION_ARG_NONE, &opt_verify, "Print the commit verification status",
NULL },
{ "skip-signatures", 'S', 0, G_OPTION_ARG_NONE, &opt_skip_signatures,
"Print the commit verification status", NULL },
{ NULL } };
static gboolean
deployment_print_status (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeployment *deployment,
gboolean is_booted, gboolean is_pending, gboolean is_rollback,
Expand Down Expand Up @@ -116,7 +120,7 @@ deployment_print_status (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploym
gboolean gpg_verify = FALSE;
if (remote)
(void)ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL);
if (!opt_verify && gpg_verify)
if (!opt_skip_signatures && !opt_verify && gpg_verify)
{
g_assert (remote);
g_autoptr (GString) output_buffer = g_string_sized_new (256);
Expand Down

0 comments on commit e95109b

Please sign in to comment.