pico-hsm/tests/scripts/keygen.sh
Pol Henarejos c44d7db4e1
Refactor tests
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-10-09 00:34:50 +02:00

13 lines
462 B
Bash
Executable file

#!/bin/bash
source ./tests/scripts/func.sh
reset
test $? -eq 0 || exit $?
algs=("rsa:1024" "rsa:2048" "ec:secp192r1" "ec:secp256r1" "ec:secp384r1" "ec:secp521r1" "ec:brainpoolP256r1" "ec:brainpoolP384r1" "ec:brainpoolP512r1" "ec:secp192k1" "ec:secp256k1")
for alg in ${algs[*]}; do
IFS=: read -r a s <<< "${alg}"
au=$(awk '{print toupper($0)}' <<<${a})
echo -n " Test ${au} ${s}..."
gen_and_delete ${alg} && echo -e ".\t${OK}" || exit $?
done