From 120f3cb42b521b5782f2bccbabb05af7b62049f1 Mon Sep 17 00:00:00 2001 From: Justin Hart Date: Fri, 20 Mar 2015 17:38:35 -0700 Subject: [PATCH] use agent for encrypt-decrypt --- bin/_blackbox_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh index b3580c5..9e60c8a 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -169,7 +169,7 @@ function encrypt_file() { encrypted="$2" echo "========== Encrypting: $unencrypted" - gpg --yes --trust-model=always --encrypt -o "$encrypted" $(awk '{ print "-r" $1 }' < "$BB_ADMINS") "$unencrypted" + gpg --use-agent --yes --trust-model=always --encrypt -o "$encrypted" $(awk '{ print "-r" $1 }' < "$BB_ADMINS") "$unencrypted" echo '========== Encrypting: DONE' } @@ -185,7 +185,7 @@ function decrypt_file() { old_umask=$(umask) umask "$DECRYPT_UMASK" - gpg -q --decrypt -o "$unencrypted" "$encrypted" + gpg --use-agent -q --decrypt -o "$unencrypted" "$encrypted" umask "$old_umask" } @@ -207,7 +207,7 @@ function decrypt_file_overwrite() { old_umask=$(umask) umask "$DECRYPT_UMASK" - gpg --yes -q --decrypt -o "$unencrypted" "$encrypted" + gpg --use-agent --yes -q --decrypt -o "$unencrypted" "$encrypted" umask "$old_umask" new_hash=$(md5sum_file "$unencrypted")