diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2010-02-18 12:11:47 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2010-02-18 12:11:47 -0500 |
commit | e3bb810e188cae2d40a5191500a501c85cb93381 (patch) | |
tree | b6afe37b95e8898cb8dd3577b62bc7859c3e3ed4 /src/share | |
parent | 838f52739cc05bfaca19e49bc64c17b435022f1c (diff) |
enforce --no-armor when exporting to openpgp2ssh in case weird gpg.conf options (see bug 1625)
Diffstat (limited to 'src/share')
-rw-r--r-- | src/share/common | 2 | ||||
-rw-r--r-- | src/share/m/subkey_to_ssh_agent | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/share/common b/src/share/common index e735319..37f5305 100644 --- a/src/share/common +++ b/src/share/common @@ -478,7 +478,7 @@ gpg2ssh() { keyID="$1" - gpg --export "$keyID" | openpgp2ssh "$keyID" 2>/dev/null + gpg --export --no-armor "$keyID" | openpgp2ssh "$keyID" 2>/dev/null } # output known_hosts line from ssh key diff --git a/src/share/m/subkey_to_ssh_agent b/src/share/m/subkey_to_ssh_agent index edc177b..36eab4f 100644 --- a/src/share/m/subkey_to_ssh_agent +++ b/src/share/m/subkey_to_ssh_agent @@ -98,14 +98,14 @@ You might want to run 'monkeysphere gen-subkey'." if [ "$1" = '-d' ]; then # we're removing the subkey: - gpg_user --export "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" + gpg_user --export --no-armor "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" (cd "$workingdir" && ssh-add -d "$kname") || keysuccess="$?" else # we're adding the subkey: mkfifo "$workingdir/$kname" gpg_user --passphrase-fd 3 3<"$workingdir/passphrase" \ --export-options export-reset-subkey-passwd,export-minimal,no-export-attributes \ - --export-secret-subkeys "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" & + --export-secret-subkeys --no-armor "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" & (cd "$workingdir" && DISPLAY=nosuchdisplay SSH_ASKPASS=/bin/false ssh-add "$@" "$kname" </dev/null )& passphrase_prompt "Enter passphrase for key $kname: " "$workingdir/passphrase" |