[Pkg-privacy-commits] [monkeysign] 03/03: monkeysign: GtkUI: Detecting revoked keys
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:34:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch dev/revoked
in repository monkeysign.
commit 1452c3d55a026701c36a3d08e301f4030922bc9b
Author: Tobias Mueller <muelli at cryptobitch.de>
Date: Mon Feb 16 12:32:29 2015 +0100
monkeysign: GtkUI: Detecting revoked keys
This requires a bit of a dance because of GnuPG not exporting the revoked
status on secret keys. So we need to fetch relevant public key and
check that for revocation.
---
monkeysign/gtkui.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/monkeysign/gtkui.py b/monkeysign/gtkui.py
index 394ba1e..ab25eb0 100644
--- a/monkeysign/gtkui.py
+++ b/monkeysign/gtkui.py
@@ -275,8 +275,12 @@ class MonkeysignScan(gtk.Window):
"""list the secret keys for selection somewhere"""
i = 0
radiogroup = None
- for key in Keyring().get_keys(None, True, False).values():
- if key.invalid or key.disabled or key.expired or key.revoked:
+ for fpr, key in Keyring().get_keys(None, True, False).items():
+ pub_keys = Keyring().get_keys(fpr, public=True, secret=False)
+ assert len(pub_keys) == 1
+ pub_key = pub_keys[fpr]
+ if pub_key.invalid or pub_key.disabled \
+ or pub_key.expired or pub_key.revoked:
continue
uid = key.uidslist[0].uid
self.uimanager.add_ui(self.uimanager.new_merge_id(), '/menu/identity', key.fpr, key.fpr, gtk.UI_MANAGER_AUTO, True)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/monkeysign.git
More information about the Pkg-privacy-commits
mailing list