integrity_copy_test.sh (173009) | integrity_copy_test.sh (182452) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/tools/regression/geom_eli/integrity-copy.t 173009 2007-10-26 08:31:11Z pjd $ | 2# $FreeBSD: head/tools/regression/geom_eli/integrity-copy.t 182452 2008-08-29 18:10:18Z pjd $ |
3 4base=`basename $0` 5no=45 6sectors=100 7keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1 8sector=`mktemp /tmp/$base.XXXXXX` || exit 1 9 10echo "1..2640" --- 9 unchanged lines hidden (view full) --- 20 keylen=${cipher##*:} 21 for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do 22 for secsize in 512 1024 2048 4096 8192; do 23 #mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 24 mdconfig -a -t malloc -s $sectors -u $no || exit 1 25 26 dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 27 | 3 4base=`basename $0` 5no=45 6sectors=100 7keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1 8sector=`mktemp /tmp/$base.XXXXXX` || exit 1 9 10echo "1..2640" --- 9 unchanged lines hidden (view full) --- 20 keylen=${cipher##*:} 21 for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do 22 for secsize in 512 1024 2048 4096 8192; do 23 #mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 24 mdconfig -a -t malloc -s $sectors -u $no || exit 1 25 26 dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 27 |
28 geli init -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null | 28 geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null |
29 geli attach -p -k $keyfile md${no} 30 31 dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 32 33 dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 34 if [ $? -eq 0 ]; then 35 echo "ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" 36 else --- 55 unchanged lines hidden --- | 29 geli attach -p -k $keyfile md${no} 30 31 dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 32 33 dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 34 if [ $? -eq 0 ]; then 35 echo "ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" 36 else --- 55 unchanged lines hidden --- |