summaryrefslogtreecommitdiffstats
path: root/tests/sys/geom/class/eli/conf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/geom/class/eli/conf.sh')
-rwxr-xr-xtests/sys/geom/class/eli/conf.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/sys/geom/class/eli/conf.sh b/tests/sys/geom/class/eli/conf.sh
index 0646e83..5ac291b 100755
--- a/tests/sys/geom/class/eli/conf.sh
+++ b/tests/sys/geom/class/eli/conf.sh
@@ -11,6 +11,54 @@ while [ -c /dev/md$no ]; do
: $(( no += 1 ))
done
+# Execute `func` for each combination of cipher, sectorsize, and hmac algo
+# `func` usage should be:
+# func <cipher> <aalgo> <secsize>
+for_each_geli_config() {
+ func=$1
+
+ for cipher in aes-xts:128 aes-xts:256 \
+ aes-cbc:128 aes-cbc:192 aes-cbc:256 \
+ 3des-cbc:192 \
+ blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
+ blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
+ blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
+ blowfish-cbc:416 blowfish-cbc:448 \
+ camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
+ ealgo=${cipher%%:*}
+ keylen=${cipher##*:}
+ for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 \
+ hmac/sha384 hmac/sha512; do
+ for secsize in 512 1024 2048 4096 8192; do
+ ${func} $cipher $aalgo $secsize
+ done
+ done
+ done
+}
+
+# Execute `func` for each combination of cipher, and sectorsize, with no hmac
+# `func` usage should be:
+# func <cipher> <secsize>
+for_each_geli_config_nointegrity() {
+ func=$1
+
+ for cipher in aes-xts:128 aes-xts:256 \
+ aes-cbc:128 aes-cbc:192 aes-cbc:256 \
+ 3des-cbc:192 \
+ blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
+ blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
+ blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
+ blowfish-cbc:416 blowfish-cbc:448 \
+ camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
+ ealgo=${cipher%%:*}
+ keylen=${cipher##*:}
+ for secsize in 512 1024 2048 4096 8192; do
+ ${func} $cipher $aalgo $secsize
+ done
+ done
+}
+
+
geli_test_cleanup()
{
[ -c /dev/md${no}.eli ] && geli detach md${no}.eli
OpenPOWER on IntegriCloud