X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fm%2Fimport_subkey;h=8d60f26aaa849cbeeabbeccd8fc2a6f3ea01a9b7;hb=2401c44bf177ca12f135109eb03b8610313f0218;hp=f3ca957092bc7001e538f8ba02ff1714364463d3;hpb=0d07156e8db60611c28e5f440ff5f6a39d655ff6;p=monkeysphere.git diff --git a/src/share/m/import_subkey b/src/share/m/import_subkey index f3ca957..8d60f26 100644 --- a/src/share/m/import_subkey +++ b/src/share/m/import_subkey @@ -13,12 +13,20 @@ # import an existing ssh key as a gpg subkey +## 2009-02-20 00:49:11-0500: This is not implemented yet, because we +## don't currently have a good way to manipulate the user's OpenPGP +## secret key such that we could make a proper subkey binding +## signature. + import_subkey() { local sshKeyFile local keyID local gpgSecOut local fifoDir + # FIXME: implement! + failure "import-subkey is not implemented yet. We welcome patches. Sorry!" + sshKeyFile="$1" shift @@ -42,11 +50,11 @@ import_subkey() { # import ssh key to as authentication subkey if [ "$sshKeyFile" = '-' ] ; then log verbose "importing ssh key from stdin..." - ssh2openpgp \ + PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" \ | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & else log verbose "importing ssh key from file '$sshKeyFile'..." - ssh2openpgp <"$sshKeyFile" \ + PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" <"$sshKeyFile" \ | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & fi