From ff19dbc8518d5e7f7a6535f7bf651a245de51d35 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 22 Nov 2011 13:05:22 -0200 Subject: Custom keyid support --- share/keyringer/decrypt | 2 +- share/keyringer/edit | 4 ++-- share/keyringer/encrypt | 2 +- share/keyringer/genpair | 10 +++++----- share/keyringer/recrypt | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/keyringer/decrypt b/share/keyringer/decrypt index c0584f2..adc1134 100755 --- a/share/keyringer/decrypt +++ b/share/keyringer/decrypt @@ -11,4 +11,4 @@ source "$LIB" || exit 1 keyringer_get_file "$2" # Decrypt -gpg --quiet --use-agent -d "$KEYDIR/$FILE" +$GPG --quiet --use-agent -d "$KEYDIR/$FILE" diff --git a/share/keyringer/edit b/share/keyringer/edit index 47945f3..73a59d9 100755 --- a/share/keyringer/edit +++ b/share/keyringer/edit @@ -17,7 +17,7 @@ echo "Make sure that $BASEDIR is atop of an encrypted volume." keyringer_set_tmpfile edit # Decrypt the information to the file -gpg --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE" +$GPG --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE" # Prompt echo "Press any key to open the decrypted data in $EDITOR, Ctrl-C to abort" @@ -25,7 +25,7 @@ read key "$EDITOR" "$TMPWORK" # Encrypt again -gpg --yes -o "$KEYDIR/$FILE" --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") "$TMPWORK" +$GPG --yes -o "$KEYDIR/$FILE" --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") "$TMPWORK" # Remove temp file keyringer_unset_tmpfile "$TMPWORK" diff --git a/share/keyringer/encrypt b/share/keyringer/encrypt index 8cbf72a..709aac3 100755 --- a/share/keyringer/encrypt +++ b/share/keyringer/encrypt @@ -18,7 +18,7 @@ if [ "$BASENAME" == "encrypt" ]; then echo "Type your message and finish your input with EOF (Ctrl-D)." fi -gpg --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") - > "$KEYDIR/$FILE" +$GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") - > "$KEYDIR/$FILE" # Stage if [ -d "$BASEDIR/.git" ]; then diff --git a/share/keyringer/genpair b/share/keyringer/genpair index 065111e..a5b06cc 100755 --- a/share/keyringer/genpair +++ b/share/keyringer/genpair @@ -52,7 +52,7 @@ function genpair_gpg { # TODO: insert random bytes # TODO: custom Name-Comment and Name-Email # TODO: allow for empty passphrases - gpg --homedir "$TMPWORK" --gen-key --batch < "$OUTFILE" - gpg --armor --homedir "$TMPWORK" --export > "$OUTFILE.pub" + $GPG --armor --homedir "$TMPWORK" --export-secret-keys > "$OUTFILE" + $GPG --armor --homedir "$TMPWORK" --export > "$OUTFILE.pub" fi echo "Done" diff --git a/share/keyringer/recrypt b/share/keyringer/recrypt index dac703a..a8f5267 100755 --- a/share/keyringer/recrypt +++ b/share/keyringer/recrypt @@ -12,7 +12,7 @@ function keyringer_recrypt { keyringer_get_file "$1" # Recrypt - gpg --use-agent -d "$KEYDIR/$FILE" | gpg --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") > "$KEYDIR/$FILE" + $GPG --use-agent -d "$KEYDIR/$FILE" | $GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS") > "$KEYDIR/$FILE" } if [ ! -z "$2" ]; then -- cgit v1.2.3