Skip to content
Snippets Groups Projects
Commit 543b68aa authored by Bob Mottram's avatar Bob Mottram
Browse files

torify gpg operations in user menu

parent 1e8197a4
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ function gpg_set_trust {
fi
if echo -e "trust\\n${TRUST_LEVEL}\\ny\\nsave\\n" | gpg --command-fd 0 --edit-key "$fpr"; then
gpg --update-trustdb
torify gpg --update-trustdb
dialog --title $"Trust a PGP/GPG key or website domain" \
--backtitle $"Freedombone User Control Panel" \
--msgbox $"$TRUST_ADDRESS was set to trust level ${TRUST_LEVEL}" 6 50
......@@ -454,9 +454,9 @@ function show_full_gpg_key {
}
function publish_gpg_key {
gpg --send-key "$GPG_ID"
torify gpg --send-key "$GPG_ID"
if [ "$GPG_BACKUP_ID" ]; then
gpg --send-key "$GPG_BACKUP_ID"
torify gpg --send-key "$GPG_BACKUP_ID"
fi
dialog --title $"Publish your PGP/GPG key" \
--msgbox $"Your key has now been published" 6 40
......@@ -500,7 +500,7 @@ function add_gpg_key {
--backtitle $"Freedombone User Control Panel" \
--msgbox $"GPG public key was imported" 6 50
else
gpg --search-keys "$ADD_EMAIL_ADDRESS"
torify gpg --search-keys "$ADD_EMAIL_ADDRESS"
gpg_set_trust "$ADD_EMAIL_ADDRESS"
fi
else
......@@ -686,11 +686,11 @@ function sign_gpg_key {
SIGN_ADDRESS=$(<"$data")
if [ ${#SIGN_ADDRESS} -gt 2 ]; then
clear
gpg --search "$SIGN_ADDRESS"
torify gpg --search "$SIGN_ADDRESS"
fpr=$(gpg --with-colons --fingerprint "$SIGN_ADDRESS" | grep fpr | head -n 1 | awk -F ':' '{print $10}')
if [ ${#fpr} -gt 2 ]; then
if gpg --sign-key "$fpr"; then
gpg --update-trustdb
if torify gpg --sign-key "$fpr"; then
torify gpg --update-trustdb
dialog --title $"Sign a PGP/GPG key" \
--backtitle $"Freedombone User Control Panel" \
--msgbox $"$SIGN_ADDRESS was signed" 6 50
......@@ -714,7 +714,7 @@ function gpg_key_trust {
TRUST_ADDRESS=$(<"$data")
if [ ${#TRUST_ADDRESS} -gt 2 ]; then
clear
gpg --search "$TRUST_ADDRESS"
torify gpg --search "$TRUST_ADDRESS"
gpg_set_trust "$TRUST_ADDRESS"
fi
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment