diff options
Diffstat (limited to 'checks/encrypt-dsa.test')
-rwxr-xr-x | checks/encrypt-dsa.test | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/checks/encrypt-dsa.test b/checks/encrypt-dsa.test index 27891bf01..0c6333c21 100755 --- a/checks/encrypt-dsa.test +++ b/checks/encrypt-dsa.test @@ -9,11 +9,33 @@ for i in $plain_files $data_files ; do cmp $i y || error "$i: mismatch" done -# and with cast -for i in $plain_files $data_files ; do - $GPG $dsa_keyrings --always-trust --cipher-algo cast5 -e \ - -o x --yes -r "$dsa_usrname2" $i - $GPG $dsa_keyrings -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 $dsa_keyrings --always-trust --cipher-algo $ca -e \ + -o x --yes -r "$dsa_usrname2" $i + $GPG $dsa_keyrings -o y --yes x + cmp $i y || error "$i: mismatch" + done +done |