From 543b68aaed5837aa29a07e76d45e008ab82438e0 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Mon, 2 Jul 2018 16:58:06 +0100 Subject: [PATCH] torify gpg operations in user menu --- src/freedombone-controlpanel-user | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user index beffef842..b622b35da 100755 --- a/src/freedombone-controlpanel-user +++ b/src/freedombone-controlpanel-user @@ -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 ;; -- GitLab