X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=inline;f=src%2Fshare%2Fm%2Fsubkey_to_ssh_agent;h=ec596bd76e148eadf4380dda3793dd79a8a62df0;hb=183d64eed7eb9724ca6c96f656cb02f475158d0e;hp=a2cf9a0c5b42d9ad13a255e090ba8f2448a80cdc;hpb=ff8383ce9092335de6c00447bb45a2a7fbbf8685;p=monkeysphere.git diff --git a/src/share/m/subkey_to_ssh_agent b/src/share/m/subkey_to_ssh_agent index a2cf9a0..ec596bd 100644 --- a/src/share/m/subkey_to_ssh_agent +++ b/src/share/m/subkey_to_ssh_agent @@ -13,6 +13,9 @@ # try to add all authentication subkeys to the agent +# FIXME: what if you only want to add one authentication subkey to the +# agent? + subkey_to_ssh_agent() { local sshaddresponse=0 local secretkeys @@ -23,14 +26,6 @@ subkey_to_ssh_agent() { local publine local kname - 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 to GnuTLS 2.6 or later. - -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." @@ -68,7 +63,6 @@ You might want to 'monkeysphere gen-subkey'" trap "rm -rf $workingdir" EXIT umask 077 mkfifo "$workingdir/passphrase" - keysuccess=1 # FIXME: we're currently allowing any other options to get passed # through to ssh-add. should we limit it to known ones? For @@ -88,7 +82,7 @@ You might want to 'monkeysphere gen-subkey'" if [ "$1" = '-d' ]; then # we're removing the subkey: gpg_user --export "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" - (cd "$workingdir" && ssh-add -d "$kname") + (cd "$workingdir" && ssh-add -d "$kname") || keysuccess="$?" else # we're adding the subkey: mkfifo "$workingdir/$kname" @@ -98,8 +92,8 @@ You might want to 'monkeysphere gen-subkey'" (cd "$workingdir" && DISPLAY=nosuchdisplay SSH_ASKPASS=/bin/false ssh-add "$@" "$kname"