7 # We need to use linear probing in order to detect the first available md(4)
8 # device instead of using mdconfig -a -t, because geli(8) attachs md(4) devices
10 while [ -c /dev/md$no ]; do
14 # Execute `func` for each combination of cipher, sectorsize, and hmac algo
15 # `func` usage should be:
16 # func <cipher> <aalgo> <secsize>
17 for_each_geli_config() {
20 for cipher in aes-xts:128 aes-xts:256 \
21 aes-cbc:128 aes-cbc:192 aes-cbc:256 \
23 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
24 blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
25 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
26 blowfish-cbc:416 blowfish-cbc:448 \
27 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
30 for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 \
31 hmac/sha384 hmac/sha512; do
32 for secsize in 512 1024 2048 4096 8192; do
33 ${func} $cipher $aalgo $secsize
39 # Execute `func` for each combination of cipher, and sectorsize, with no hmac
40 # `func` usage should be:
41 # func <cipher> <secsize>
42 for_each_geli_config_nointegrity() {
45 for cipher in aes-xts:128 aes-xts:256 \
46 aes-cbc:128 aes-cbc:192 aes-cbc:256 \
48 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
49 blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
50 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
51 blowfish-cbc:416 blowfish-cbc:448 \
52 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
55 for secsize in 512 1024 2048 4096 8192; do
56 ${func} $cipher $aalgo $secsize
64 [ -c /dev/md${no}.eli ] && geli detach md${no}.eli
67 trap geli_test_cleanup ABRT EXIT INT TERM
69 . `dirname $0`/../geom_subr.sh