summaryrefslogtreecommitdiff
path: root/src/monkeysphere
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-22 00:32:02 -0700
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-08-22 00:32:02 -0700
commit75279b87bfa5c9abcc64f0a5ddd4c903e2558f70 (patch)
tree3b28a586336fd344ff20fac645ad52a7d921ed5b /src/monkeysphere
parent48067bbda5a53150ae4810544ead38c06f23c0a3 (diff)
some small changes to subkey-to-ssh-agent.
Diffstat (limited to 'src/monkeysphere')
-rwxr-xr-xsrc/monkeysphere21
1 files 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: