summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-gpg-verify-result-private.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2015-03-04 12:44:47 -0500
committerMatthew Barnes <mbarnes@redhat.com>2015-03-18 11:52:22 -0400
commit4a2733f9e7e2ca127ff27433c045c977000ca346 (patch)
treed9ebb75c80aad9935c7196990847288dc47a0ca8 /src/libostree/ostree-gpg-verify-result-private.h
parent553d7840d5d5ada906da8328fc84bc8b40c6d8b1 (diff)
downloadostree-4a2733f9e7e2ca127ff27433c045c977000ca346.tar.gz
gpg: Add OstreeGpgVerifyResult
Wrappers a referenced gpgme_verify_result_t so detailed verify results can be examined independently of executing a verify operation. _ostree_gpg_verifier_check_signature() now returns this object instead of a single valid/invalid boolean, but the idea is for OstreeRepo to also return this object for commit signature verification so it can be utilized at the CLI layer (and possibly by other programs).
Diffstat (limited to 'src/libostree/ostree-gpg-verify-result-private.h')
-rw-r--r--src/libostree/ostree-gpg-verify-result-private.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/libostree/ostree-gpg-verify-result-private.h b/src/libostree/ostree-gpg-verify-result-private.h
new file mode 100644
index 00000000..a91bd534
--- /dev/null
+++ b/src/libostree/ostree-gpg-verify-result-private.h
@@ -0,0 +1,42 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ *
+ * Copyright (C) 2015 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include "ostree-gpg-verify-result.h"
+
+#include <gpgme.h>
+
+/**
+ * OstreeGpgVerifyResult:
+ *
+ * Private instance structure.
+ */
+struct OstreeGpgVerifyResult {
+ GObject parent;
+
+ gpgme_ctx_t context;
+ gpgme_verify_result_t details;
+};
+
+/* XXX Split these into a separate "GPGME utilities" file? */
+
+void _ostree_gpg_error_to_gio_error (gpgme_error_t gpg_error, GError **error);
+