diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2012-03-20 15:24:26 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2012-03-20 15:24:26 -0400 |
commit | 8ce435fb4fcdf055db0b81007579ea76c003cdd6 (patch) | |
tree | 5876130ab7ebf3fed839a1fdd700ec1ae7e0ca5d /src/share/m | |
parent | df0fa237a75d9651a441c347ec9feaf453b30ad6 (diff) |
add --batch to gpg invocations, since gpg2 requires it to use --passphrase-* arguments
Diffstat (limited to 'src/share/m')
-rw-r--r-- | src/share/m/gen_subkey | 2 | ||||
-rw-r--r-- | src/share/m/import_subkey | 4 | ||||
-rw-r--r-- | src/share/m/subkey_to_ssh_agent | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/share/m/gen_subkey b/src/share/m/gen_subkey index cf1ed0c..f181804 100644 --- a/src/share/m/gen_subkey +++ b/src/share/m/gen_subkey @@ -80,7 +80,7 @@ save" # FIXME: are we adequately cleaning up any trailing gpg process here? trap "rm -rf $fifoDir; kill %% || true" EXIT - echo "$editCommands" | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --edit-key "$keyID" & + echo "$editCommands" | gpg_user --batch --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --edit-key "$keyID" & log debug "Prompting for passphrase" # FIXME: this needs to fail more gracefully if the passphrase is incorrect diff --git a/src/share/m/import_subkey b/src/share/m/import_subkey index 8d60f26..3571c7b 100644 --- a/src/share/m/import_subkey +++ b/src/share/m/import_subkey @@ -51,11 +51,11 @@ import_subkey() { if [ "$sshKeyFile" = '-' ] ; then log verbose "importing ssh key from stdin..." PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" \ - | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & + | gpg_user --batch --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & else log verbose "importing ssh key from file '$sshKeyFile'..." PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" <"$sshKeyFile" \ - | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & + | gpg_user --batch --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --import & fi # get the password if needed diff --git a/src/share/m/subkey_to_ssh_agent b/src/share/m/subkey_to_ssh_agent index 4bd2234..8802639 100644 --- a/src/share/m/subkey_to_ssh_agent +++ b/src/share/m/subkey_to_ssh_agent @@ -106,7 +106,7 @@ You might want to run 'monkeysphere gen-subkey'." else # we're adding the subkey: mkfifo "$workingdir/$kname" - gpg_user --passphrase-fd 3 3<"$workingdir/passphrase" \ + gpg_user --batch --passphrase-fd 3 3<"$workingdir/passphrase" \ --export-options export-reset-subkey-passwd,export-minimal,no-export-attributes \ --export-secret-subkeys --no-armor "0x${subkey}!" | openpgp2ssh "$subkey" > "$workingdir/$kname" & (cd "$workingdir" && DISPLAY=nosuchdisplay SSH_ASKPASS=/bin/false ssh-add "$@" "$kname" </dev/null )& |