btrfs-progs/tests/hash-tests.sh
David Sterba 32880fa518 btrfs-progs: crypto: add openssl as crypto provider
https://www.openssl.org/ Is a well known cryptography library and since
freshly released version 3.2 it also supports variable digest size of
blake2b, so we can now add it among the crypto providers.

Configure with --with-crypto=openssl.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-11-30 22:04:45 +01:00

44 lines
761 B
Bash
Executable File

#!/bin/sh
# Test all supported hash algorithms on all backends on the sample test vectors
# This requires all crypto backends available for full coverage.
make=make
opts="-j16 $@"
verdict=
die() {
echo "ERROR: $@"
exit 1
}
buildme() {
make clean-all
echo "BUILD WITH: $1"
./autogen.sh && configure \
--disable-documentation --disable-convert --disable-python \
--with-crypto="$1" || die "configure not working with: $@"
$make clean
$make $opts hash-vectest
if ./hash-vectest; then
verdict="$verdict
$1: OK"
fi
}
# main()
if ! [ -f configure.ac ]; then
echo "Please run me from the top directory"
exit 1
fi
buildme builtin
buildme libgcrypt
buildme libsodium
buildme libkcapi
buildme botan
buildme openssl
echo "VERDICT:"
echo "$verdict"