-
Notifications
You must be signed in to change notification settings - Fork 71
/
runtests.sh
executable file
·84 lines (73 loc) · 2.29 KB
/
runtests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh
provider2openssl() {
echo
echo "Testing oqsprovider->oqs-openssl interop for $1:"
./scripts/oqsprovider-certgen.sh $1 && ./scripts/oqsprovider-cmssign.sh $1 && ./scripts/oqs-openssl-certverify.sh $1 && ./scripts/oqs-openssl-cmsverify.sh $1
}
openssl2provider() {
echo
echo "Testing oqs-openssl->oqsprovider interop for $1:"
./scripts/oqs-openssl-certgen.sh $1 && ./scripts/oqs-openssl-cmssign.sh $1 && ./scripts/oqsprovider-certverify.sh $1 && ./scripts/oqsprovider-cmsverify.sh $1
}
interop() {
# check if we can use docker or not:
docker info 2>&1 | grep Server > /dev/null
if [ $? -ne 0 ]; then
echo "Running local test only due to absence of docker:"
./scripts/oqsprovider-certgen.sh $1 && ./scripts/oqsprovider-certverify.sh $1
else
provider2openssl $1 && openssl2provider $1
fi
if [ $? -ne 0 ]; then
echo "Test for $1 failed. Terminating testing."
exit -1
fi
}
# Output version:
LD_LIBRARY_PATH=.local/lib64 .local/bin/openssl list -providers -verbose -provider-path _build/oqsprov -provider oqsprovider
# Run built-in tests:
(cd _build; ctest $@)
# Run interop-tests:
##### OQS_TEMPLATE_FRAGMENT_ALGS_START
interop dilithium2
interop p256_dilithium2
interop rsa3072_dilithium2
interop dilithium3
interop p384_dilithium3
interop dilithium5
interop p521_dilithium5
interop dilithium2_aes
interop p256_dilithium2_aes
interop rsa3072_dilithium2_aes
interop dilithium3_aes
interop p384_dilithium3_aes
interop dilithium5_aes
interop p521_dilithium5_aes
interop falcon512
interop p256_falcon512
interop rsa3072_falcon512
interop falcon1024
interop p521_falcon1024
interop picnicl1full
interop p256_picnicl1full
interop rsa3072_picnicl1full
interop picnic3l1
interop p256_picnic3l1
interop rsa3072_picnic3l1
interop rainbowIclassic
interop p256_rainbowIclassic
interop rsa3072_rainbowIclassic
interop rainbowVclassic
interop p521_rainbowVclassic
interop sphincsharaka128frobust
interop p256_sphincsharaka128frobust
interop rsa3072_sphincsharaka128frobust
interop sphincssha256128frobust
interop p256_sphincssha256128frobust
interop rsa3072_sphincssha256128frobust
interop sphincsshake256128frobust
interop p256_sphincsshake256128frobust
interop rsa3072_sphincsshake256128frobust
##### OQS_TEMPLATE_FRAGMENT_ALGS_END
# cleanup
rm -rf tmp