]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add EDDSA variant of mkeys system test
authorMichal Nowak <mnowak@isc.org>
Tue, 20 Dec 2022 08:06:14 +0000 (09:06 +0100)
committerMichal Nowak <mnowak@isc.org>
Wed, 21 Dec 2022 15:43:09 +0000 (16:43 +0100)
In order to trigger the EDDSA verify memory leak, use the algorithm in
the mkeys system test accordingly.

bin/tests/system/conf.sh.in
bin/tests/system/mkeys-eddsa [new symlink]
bin/tests/system/mkeys/ns1/sign.sh
bin/tests/system/mkeys/ns6/setup.sh
bin/tests/system/mkeys/prereq.sh
bin/tests/system/mkeys/tests.sh

index 85792a9f079704becfe3fdcc145d083b07615533..96c82477bbf67f6799e6c92f799cd642534390ce 100644 (file)
@@ -104,7 +104,7 @@ RANDOMSIZE=4096
 #
 # List of tests hard-coded to use ports 5300 and 9953. For this
 # reason, these must be run sequentially.
-SEQUENTIALDIRS="ecdsa eddsa gost lwresd @PKCS11_TEST@ tkey"
+SEQUENTIALDIRS="ecdsa eddsa gost lwresd mkeys-eddsa @PKCS11_TEST@ tkey"
 
 # List of tests that use ports assigned by caller (other than 5300
 # and 9953). Because separate blocks of ports can be used for teach
diff --git a/bin/tests/system/mkeys-eddsa b/bin/tests/system/mkeys-eddsa
new file mode 120000 (symlink)
index 0000000..7a2467a
--- /dev/null
@@ -0,0 +1 @@
+mkeys/
\ No newline at end of file
index 2dc7e45bcd9df3b5003cad5204114b6e2ffa8da5..22552eee11cfd86e0870f17bdd630a7a61f514b1 100644 (file)
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
+symlink_alg=$(basename $(dirname $PWD) | awk -F- '{ print $2 }')
+if [ "$symlink_alg" == "eddsa" ]; then
+       echo_i "Setting algorithm to ED25519"
+       DEFAULT_ALGORITHM=ED25519
+fi
+
 zone=.
 zonefile=root.db
 
index 1553bb43a27edbf2e819aabd683c1a8696c22809..ca89acddaad35758edc5375da79ad0ecb78e1798 100644 (file)
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
+symlink_alg=$(basename $(dirname $PWD) | awk -F- '{ print $2 }')
+if [ "$symlink_alg" == "eddsa" ]; then
+       echo_i "Setting algorithm to ED25519"
+       DEFAULT_ALGORITHM=ED25519
+fi
+
 zone=.
 zonefile=root.db
 
index f3e74853457dfb39428bba43e8afd2c6047ddf0d..a38f7091e2d7104643c37b32dea2f9532716f7b3 100644 (file)
@@ -12,4 +12,9 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-exec $SHELL ../testcrypto.sh
+symlink_alg=$(basename $PWD | awk -F- '{ print $2 }')
+if [ "$symlink_alg" == "eddsa" ]; then
+       exec $SHELL ../testcrypto.sh eddsa
+else
+       exec $SHELL ../testcrypto.sh
+fi
index d5a79a65b5a0146f8f7732d68caec9f18690029e..f42f6e90eedb6621e0d340f64cef574f23be16ae 100644 (file)
@@ -13,6 +13,12 @@ SYSTEMTESTTOP=..
 #shellcheck source=conf.sh
 . "$SYSTEMTESTTOP/conf.sh"
 
+symlink_alg=$(basename $PWD | awk -F- '{ print $2 }')
+if [ "$symlink_alg" == "eddsa" ]; then
+    echo_i "Setting algorithm to ED25519"
+    DEFAULT_ALGORITHM=ED25519
+fi
+
 dig_with_opts() (
        "$DIG" +tcp +noadd +nosea +nostat +nocmd +dnssec -p "${PORT}" "$@"
 )