From 75279b87bfa5c9abcc64f0a5ddd4c903e2558f70 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Fri, 22 Aug 2008 00:32:02 -0700 Subject: [PATCH] some small changes to subkey-to-ssh-agent. --- src/monkeysphere | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/monkeysphere b/src/monkeysphere index 2ca3636..8936668 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -185,6 +185,14 @@ function subkey_to_ssh_agent() { local sshaddresponse local keysuccess + if ! test_gnu_dummy_s2k_extension ; then + failure "Your version of GnuTLS does not seem capable of using with gpg's exported subkeys. +You may want to consider patching or upgrading. + +For more details, see: + http://lists.gnu.org/archive/html/gnutls-devel/2008-08/msg00005.html" + fi + # if there's no agent running, don't bother: if [ -z "$SSH_AUTH_SOCK" ] || ! which ssh-add >/dev/null ; then failure "No ssh-agent available." @@ -203,7 +211,7 @@ function subkey_to_ssh_agent() { if [ -z "$secretkeys" ]; then failure "You have no secret keys in your keyring! -You might want to 'gpg --gen-key'" +You might want to run 'gpg --gen-key'." fi authsubkeys=$(gpg --list-secret-keys --with-colons --fixed-list-mode --fingerprint --fingerprint $secretkeys | cut -f1,5,10,12 -d: | grep -A1 '^ssb:[^:]*::[^:]*a[^:]*$' | grep '^fpr::' | cut -f3 -d: | sort -u) @@ -213,14 +221,6 @@ You might want to 'gpg --gen-key'" You might want to 'monkeysphere gen-subkey'" fi - if ! test_gnu_dummy_s2k_extension ; then - failure "Your version of GnuTLS does not seem capable of using with gpg's exported subkeys. -You may want to consider patching or upgrading. - -For more details, see: - http://lists.gnu.org/archive/html/gnutls-devel/2008-08/msg00005.html" - fi - workingdir=$(mktemp -d) umask 077 mkfifo "$workingdir/passphrase" @@ -238,7 +238,8 @@ For more details, see: primaryuid=$(gpg --with-colons --list-key "0x${subkey}!" | grep '^pub:' | cut -f10 -d: | tr -d /) - kname="[monkeysphere] $primaryuid" + #kname="[monkeysphere] $primaryuid" + kname="'$primaryuid'" if [ "$1" = '-d' ]; then # we're removing the subkey: -- 2.26.2