From 086122c884086aae030d8e0a337048ee1bc5dbbd Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 21 Feb 2009 17:12:49 -0500 Subject: add FIXME to show key about how it should show revokers as well. --- src/monkeysphere-host | 1 + 1 file changed, 1 insertion(+) (limited to 'src/monkeysphere-host') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 540a8ab..baa7a87 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -184,6 +184,7 @@ show_key() { # list the host key info # FIXME: make no-show-keyring work so we don't have to do the grep'ing # FIXME: can we show uid validity somehow? + # FIXME: show revokers as well gpg --list-keys --fingerprint \ --list-options show-unusable-uids 2>/dev/null \ | grep -v "^${GNUPGHOME}/pubring.gpg$" \ -- cgit v1.2.3 From 97c0b4f9ba18f9e09b430ece4f1b762958238f31 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 21 Feb 2009 17:25:11 -0500 Subject: extend show-key to show fingerprints of revokers as well. --- src/monkeysphere-host | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/monkeysphere-host') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index baa7a87..0dba1f6 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -163,6 +163,8 @@ find_host_userid() { # show info about the host key show_key() { local GNUPGHOME + local TMPSSH + local revokers # tmp gpghome dir export GNUPGHOME=$(msmktempdir) @@ -184,12 +186,22 @@ show_key() { # list the host key info # FIXME: make no-show-keyring work so we don't have to do the grep'ing # FIXME: can we show uid validity somehow? - # FIXME: show revokers as well gpg --list-keys --fingerprint \ --list-options show-unusable-uids 2>/dev/null \ | grep -v "^${GNUPGHOME}/pubring.gpg$" \ | egrep -v '^-+$' + # list revokers, if there are any + revokers=$(gpg --list-keys --with-colons --fixed-list-mode \ + | grep '^rvk:' | cut -d: -f10) + if [ "$revokers" ] ; then + echo "The following keys are allowed to revoke this host key:" + for key in $revokers ; do + echo "revoker: $key" + done + echo + fi + # list the pgp fingerprint echo "OpenPGP fingerprint: $HOST_FINGERPRINT" -- cgit v1.2.3 From fa47d0b373ae70733c50420821cf2ef8e1ad7466 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 21 Feb 2009 17:30:54 -0500 Subject: make show-key so that it works even if there are no revokers. --- src/monkeysphere-host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/monkeysphere-host') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 0dba1f6..fc3b607 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -193,7 +193,7 @@ show_key() { # list revokers, if there are any revokers=$(gpg --list-keys --with-colons --fixed-list-mode \ - | grep '^rvk:' | cut -d: -f10) + | grep '^rvk:' | cut -d: -f10) || true if [ "$revokers" ] ; then echo "The following keys are allowed to revoke this host key:" for key in $revokers ; do -- cgit v1.2.3 From 46fe34d78ca1acb59c996064e4b85f922cf9e9e6 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sat, 21 Feb 2009 17:34:15 -0500 Subject: adjusting extraction of revokers. --- src/monkeysphere-host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/monkeysphere-host') diff --git a/src/monkeysphere-host b/src/monkeysphere-host index fc3b607..1b0de0c 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -193,7 +193,7 @@ show_key() { # list revokers, if there are any revokers=$(gpg --list-keys --with-colons --fixed-list-mode \ - | grep '^rvk:' | cut -d: -f10) || true + | awk -F: '/^rvk:/{ print $10 }' ) if [ "$revokers" ] ; then echo "The following keys are allowed to revoke this host key:" for key in $revokers ; do -- cgit v1.2.3