diff options
author | Dan Nicholson <nicholson@endlessm.com> | 2019-06-10 12:15:04 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2019-06-19 17:17:11 +0000 |
commit | d0ec319b6b763deb8f25226175e7ff709a4af8c8 (patch) | |
tree | 781fb0ebfa58074219b6216d0d9fe8999a13385b | |
parent | d714e622b8318f38007d50471b8e3bc565f3c0b6 (diff) | |
download | ostree-d0ec319b6b763deb8f25226175e7ff709a4af8c8.tar.gz |
lib/gpg: Show if GPG key has been revoked
Rather then showing the incorrect `BAD signature`.
Closes: #1872
Approved by: cgwalters
-rw-r--r-- | src/libostree/ostree-gpg-verify-result.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libostree/ostree-gpg-verify-result.c b/src/libostree/ostree-gpg-verify-result.c index 5a8888e7..d4d1cef6 100644 --- a/src/libostree/ostree-gpg-verify-result.c +++ b/src/libostree/ostree-gpg-verify-result.c @@ -621,6 +621,7 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, gboolean valid; gboolean sig_expired; gboolean key_expired; + gboolean key_revoked; gboolean key_missing; gsize len; @@ -642,6 +643,8 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, "b", &sig_expired); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED, "b", &key_expired); + g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED, + "b", &key_revoked); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING, "b", &key_missing); g_variant_get_child (variant, OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT, @@ -703,6 +706,10 @@ ostree_gpg_verify_result_describe_variant (GVariant *variant, "Good signature from \"%s <%s>\"\n", user_name, user_email); } + else if (key_revoked) + { + g_string_append (output_buffer, "Key revoked\n"); + } else if (sig_expired) { g_string_append_printf (output_buffer, |