From: Jameson Graef Rollins Date: Sat, 6 Sep 2008 05:23:30 +0000 (-0700) Subject: dkg gets all of the credit for us finally being able to put to death X-Git-Tag: monkeysphere_0.16-1~86^2 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4dea1f032d70830010160d7ceca012c792648d0a;p=monkeysphere.git dkg gets all of the credit for us finally being able to put to death seckey2sshagent. If we need it, we know where it is. rip. --- diff --git a/src/seckey2sshagent b/src/seckey2sshagent deleted file mode 100755 index a516256..0000000 --- a/src/seckey2sshagent +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash - -# seckey2sshagent: this is a hack of a script to cope with the fact -# that openpgp2ssh currently cannot support encrypted secret keys. - -# the basic operating principal is: - -# export the secret key in encrypted format to a new keyring - -# remove the passphrase in that keyring - -# use that keyring with openpgp2ssh - -# Authors: Daniel Kahn Gillmor , -# Jameson Rollins - -explanation() { - - cat < - -followed by the empty string for the new password. GPG will ask you -if you're really sure. Answer yes, because this is only relevant to -the temporary keyring. Then, do: - - save - -At this point, your key will be added to your running ssh-agent with -the alias 'monkeysphere-key' and seckey2sshagent should terminate. -You can check on it with: - - ssh-add -l - -EOF -} - -cleanup() { - echo -n "removing temp gpg home... " 1>&2 - rm -rf "$TMPPRIVATE" - echo "done." 1>&2 -} - -export_sec_key() { - gpg --export-secret-key "$GPGID" | GNUPGHOME="$TMPPRIVATE" gpg --import - - GNUPGHOME="$TMPPRIVATE" gpg --edit-key "$GPGID" - - # idea to script the password stuff. not working. - # read -s -p "enter gpg password: " PASSWD; echo - # cmd=$(cat < "$TMPPRIVATE/key" - # passprotect file - ssh-keygen -f "${TMPPRIVATE}/key" -p - # move into place - mv "${TMPPRIVATE}/key" "$FILE" - - # export public key - gpg --export "$GPGID" | openpgp2ssh "$GPGID" > "${FILE}.pub" - - # otherwise add to agent - else - KEYNAME='MonkeySphere Key '$(echo "$GPGID" | tr -c -d '0-9a-fA-F')'' - - # creating this alias so the key is named "monkeysphere-key" in the - # comment stored by the agent, while never being written to disk in - # SSH form: - ln -s /dev/stdin "${TMPPRIVATE}/${KEYNAME}" - - # export secret key to agent - export_sec_key | (cd "$TMPPRIVATE" && ssh-add -c "$KEYNAME") - fi - -done