aboutsummaryrefslogtreecommitdiffstats
path: root/checks/encrypt.test
diff options
context:
space:
mode:
Diffstat (limited to 'checks/encrypt.test')
-rwxr-xr-xchecks/encrypt.test34
1 files changed, 29 insertions, 5 deletions
diff --git a/checks/encrypt.test b/checks/encrypt.test
index 4e5c5c042..44f26a17a 100755
--- a/checks/encrypt.test
+++ b/checks/encrypt.test
@@ -8,9 +8,33 @@ for i in $plain_files $data_files ; do
$GPG -o y --yes x
cmp $i y || error "$i: mismatch"
done
-for i in $plain_files $data_files ; do
- $GPG --always-trust -e -o x --yes -r "$usrname2" --cipher-algo cast5 $i
- $GPG -o y --yes x
- cmp $i y || error "$i: mismatch"
-done
+algos="3des"
+
+if have_cipher_algo "idea"; then
+ algos="$algos idea"
+fi
+
+if have_cipher_algo "cast5"; then
+ algos="$algos idea"
+fi
+
+if have_cipher_algo "blowfish"; then
+ algos="$algos idea"
+fi
+
+if have_cipher_algo "aes"; then
+ algos="$algos aes aes192 aes256"
+fi
+
+if have_cipher_algo "twofish"; then
+ algos="$algos twofish"
+fi
+
+for ca in $algos ; do
+ for i in $plain_files $data_files ; do
+ $GPG --always-trust -e -o x --yes -r "$usrname2" --cipher-algo $ca $i
+ $GPG -o y --yes x
+ cmp $i y || error "$i: mismatch"
+ done
+done