aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-11-22 13:05:22 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-11-22 13:05:22 -0200
commitff19dbc8518d5e7f7a6535f7bf651a245de51d35 (patch)
treeb8ec6552c494e01333422033a2b3860ccb3f1710 /share
parent4d5b7821417d853b6a86fc794cc684ecc846ad6a (diff)
downloadkeyringer-ff19dbc8518d5e7f7a6535f7bf651a245de51d35.tar.gz
keyringer-ff19dbc8518d5e7f7a6535f7bf651a245de51d35.tar.bz2
Custom keyid support
Diffstat (limited to 'share')
-rwxr-xr-xshare/keyringer/decrypt2
-rwxr-xr-xshare/keyringer/edit4
-rwxr-xr-xshare/keyringer/encrypt2
-rwxr-xr-xshare/keyringer/genpair10
-rwxr-xr-xshare/keyringer/recrypt2
5 files changed, 10 insertions, 10 deletions
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 <<EOF
+ $GPG --homedir "$TMPWORK" --gen-key --batch <<EOF
Key-Type: RSA
Key-Length: 4096
Subkey-Type: ELG-E
@@ -66,9 +66,9 @@ EOF
# Encrypt the result
echo "Encrypting secret key into keyringer..."
- gpg --armor --homedir "$TMPWORK" --export-secret-keys | keyringer_exec encrypt "$BASEDIR" "$FILE"
+ $GPG --armor --homedir "$TMPWORK" --export-secret-keys | keyringer_exec encrypt "$BASEDIR" "$FILE"
echo "Encrypting public key into keyringer..."
- gpg --armor --homedir "$TMPWORK" --export | keyringer_exec encrypt "$BASEDIR" "$FILE.pub"
+ $GPG --armor --homedir "$TMPWORK" --export | keyringer_exec encrypt "$BASEDIR" "$FILE.pub"
echo "Encrypting passphrase into keyringer..."
echo "Passphrase for $FILE: $passphrase" | keyringer_exec encrypt "$BASEDIR" "$FILE.passwd"
@@ -76,8 +76,8 @@ EOF
if [ ! -z "$OUTFILE" ]; then
mkdir -p `dirname $OUTFILE`
printf "Saving copies at %s and %s.pub\n" "$OUTFILE" "$OUTFILE"
- gpg --armor --homedir "$TMPWORK" --export-secret-keys > "$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