]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace testcrypto.sh invocations in tests
authorTom Krizek <tkrizek@isc.org>
Wed, 24 Jan 2024 14:38:55 +0000 (15:38 +0100)
committerNicki Křížek <nicki@isc.org>
Mon, 5 Aug 2024 15:54:11 +0000 (17:54 +0200)
Use the provided environment variables instead.

(cherry picked from commit fc84bf80e476d7c2748565814875b9d89782d4d6)

24 files changed:
bin/tests/system/autosign/ns3/keygen.sh
bin/tests/system/autosign/tests.sh
bin/tests/system/checkconf/tests.sh
bin/tests/system/dnssec/tests.sh
bin/tests/system/ecdsa/clean.sh
bin/tests/system/ecdsa/ns1/sign.sh
bin/tests/system/ecdsa/setup.sh
bin/tests/system/ecdsa/tests.sh
bin/tests/system/eddsa/clean.sh
bin/tests/system/eddsa/ns1/sign.sh
bin/tests/system/eddsa/ns2/sign.sh
bin/tests/system/eddsa/ns3/sign.sh
bin/tests/system/eddsa/prereq.sh
bin/tests/system/eddsa/setup.sh
bin/tests/system/eddsa/tests.sh
bin/tests/system/enginepkcs11/setup.sh
bin/tests/system/kasp/clean.sh
bin/tests/system/kasp/ns3/setup.sh
bin/tests/system/kasp/setup.sh
bin/tests/system/kasp/tests.sh
bin/tests/system/keyfromlabel/tests.sh
bin/tests/system/nsec3/ns3/setup.sh
bin/tests/system/nsec3/setup.sh
bin/tests/system/nsec3/tests.sh

index bc4dd5d8c2cf9774bea917822eb352c2a72dfaae..54f53a46c82e4b3198cbdaf3c181851d551ae2a5 100644 (file)
@@ -157,10 +157,7 @@ $DSFROMKEY $ksk.key >dsset-${zone}.
 # None of these algorithms are supported for signing in FIPS mode
 # as they are MD5 and SHA1 based.
 #
-if (
-  cd ..
-  $SHELL ../testcrypto.sh -q RSASHA1
-); then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   setup nsec-only.example
   cp $infile $zonefile
   ksk=$($KEYGEN -q -a RSASHA1 -fk $zone 2>kg.out) || dumpit kg.out
index 3b7613226dd3daf3dd14c3b386b15bb23c3067d3..14064affe2bc9a4167d7b302e39bd25dc4f4c329 100755 (executable)
@@ -892,7 +892,7 @@ checkprivate nsec3.nsec3.example 10.53.0.3 || ret=1
 checkprivate nsec3.optout.example 10.53.0.3 || ret=1
 checkprivate nsec3-to-nsec.example 10.53.0.3 2 || ret=1  # automatically removed
 checkprivate nsec3-to-nsec3.example 10.53.0.3 2 || ret=1 # automatically removed
-if $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   checkprivate nsec-only.example 10.53.0.3 || ret=1
 fi
 checkprivate oldsigs.example 10.53.0.3 2 || ret=1 # pre-signed
@@ -1252,7 +1252,7 @@ del=$(grep "DNSKEY .* is now deleted" ns2/named.run | wc -l)
 [ "$del" -eq 0 ] || ret=1
 pub=$(grep "DNSKEY .* is now published" ns3/named.run | grep -v "CDNSKEY" | wc -l)
 act=$(grep "DNSKEY .* is now active" ns3/named.run | wc -l)
-if $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   # Include two log lines for nsec-only zone.
   [ "$pub" -eq 53 ] || ret=1
   [ "$act" -eq 53 ] || ret=1
index c995890aaa69c80edf0dd878b04a990e881362db..ad7e2fbb477840c242c4e47437a45e00cbca6542 100644 (file)
@@ -642,7 +642,7 @@ status=$((status + ret))
 n=$((n + 1))
 echo_i "checking named-checkconf kasp nsec3 iterations errors ($n)"
 ret=0
-if ! ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   conf=kasp-bad-nsec3-iter-fips.conf
   expect=2
 else
@@ -660,7 +660,7 @@ n=$((n + 1))
 echo_i "checking named-checkconf kasp nsec3 algorithm errors ($n)"
 ret=0
 $CHECKCONF kasp-bad-nsec3-alg.conf >checkconf.out$n 2>&1 && ret=1
-if ! ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   grep "dnssec-policy: algorithm rsasha1 not supported" <checkconf.out$n >/dev/null || ret=1
 else
   grep "dnssec-policy: cannot use nsec3 with algorithm 'RSASHA1'" <checkconf.out$n >/dev/null || ret=1
index db6e2e5083b530a994a9e50ab585cd28004c3d81..041443271c9f2d0787a80474a00ab4bb1f17c964 100644 (file)
@@ -1462,7 +1462,7 @@ echo_ic "check that 'dnssec-signzone -F' failed with disallowed algorithm ($n)"
 ret=0
 if ! $FEATURETEST --fips-provider; then
   echo_i "skipped no FIPS provider available"
-elif ! $SHELL ../testcrypto.sh -q RSASHA1; then
+elif [ $RSASHA1_SUPPORTED = 0 ]; then
   echo_i "skipped: RSASHA1 is not supported"
 else
   (
@@ -3417,7 +3417,7 @@ if $FEATURETEST --have-fips-mode; then
   echo_i "skipped: already in FIPS mode"
 elif ! $FEATURETEST --fips-provider; then
   echo_i "skipped no FIPS provider available"
-elif ! $SHELL ../testcrypto.sh -q RSASHA1; then
+elif [ $RSASHA1_SUPPORTED = 0 ]; then
   echo_i "skipped: RSASHA1 is not supported"
 else
   $KEYGEN -F -a rsasha1 example.fips 2>keygen.err$n || true
@@ -3433,7 +3433,7 @@ if $FEATURETEST --have-fips-mode; then
   echo_i "skipped: already in FIPS mode"
 elif ! $FEATURETEST --fips-provider; then
   echo_i "skipped: cannot switch to FIPS mode"
-elif ! $SHELL ../testcrypto.sh -q RSASHA1; then
+elif [ $RSASHA1_SUPPORTED = 0 ]; then
   echo_i "skipped: RSASHA1 is not supported"
 else
   $KEYGEN -F -a nsec3rsasha1 example.fips 2>keygen.err$n || true
index 16b3aab06cafee22a94975d760792602eeca0878..7cc30b604b4c34d1f2924c2e776c3b231b60cbf1 100644 (file)
@@ -24,4 +24,3 @@ rm -f ns*/named.run
 rm -f ns*/root.db
 rm -f ns*/signer.err
 rm -f ns*/trusted.conf
-rm -f *-supported.file
index b7733442a1d93511fcfe8f788348384ef6ecaf46..2d49065639195455b65f898ee4bb013f01d90451 100644 (file)
@@ -23,14 +23,14 @@ echo_i "ns1/sign.sh"
 
 cp $infile $zonefile
 
-if [ -f ../ecdsa256-supported.file ]; then
+if [ $ECDSAP256SHA256_SUPPORTED = 1 ]; then
   zsk256=$($KEYGEN -q -a ECDSA256 -n zone "$zone")
   ksk256=$($KEYGEN -q -a ECDSA256 -n zone -f KSK "$zone")
   cat "$ksk256.key" "$zsk256.key" >>"$zonefile"
   $DSFROMKEY -a sha-256 "$ksk256.key" >>dsset-256
 fi
 
-if [ -f ../ecdsa384-supported.file ]; then
+if [ $ECDSAP384SHA384_SUPPORTED = 1 ]; then
   zsk384=$($KEYGEN -q -a ECDSA384 -n zone "$zone")
   ksk384=$($KEYGEN -q -a ECDSA384 -n zone -f KSK "$zone")
   cat "$ksk384.key" "$zsk384.key" >>"$zonefile"
@@ -38,7 +38,7 @@ if [ -f ../ecdsa384-supported.file ]; then
 fi
 
 # Configure the resolving server with a static key.
-if [ -f ../ecdsa256-supported.file ]; then
+if [ $ECDSAP256SHA256_SUPPORTED = 1 ]; then
   keyfile_to_static_ds $ksk256 >trusted.conf
   cp trusted.conf ../ns2/trusted.conf
 else
@@ -46,7 +46,7 @@ else
   cp trusted.conf ../ns2/trusted.conf
 fi
 
-if [ -f ../ecdsa384-supported.file ]; then
+if [ $ECDSAP384SHA384_SUPPORTED = 1 ]; then
   keyfile_to_static_ds $ksk384 >trusted.conf
   cp trusted.conf ../ns3/trusted.conf
 else
index 466d015983674f46bcfb90ac02bccdf8bf71e48e..89aa024bb76c98239d7517589e39c15788a4a1c6 100644 (file)
@@ -15,14 +15,6 @@ set -e
 
 . ../conf.sh
 
-if $SHELL ../testcrypto.sh ecdsap256sha256; then
-  echo "yes" >ecdsa256-supported.file
-fi
-
-if $SHELL ../testcrypto.sh ecdsap384sha384; then
-  echo "yes" >ecdsa384-supported.file
-fi
-
 copy_setports ns1/named.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf
index f596fbf78fefc07a6e39bbf6292b510c9190cd09..7016bf2ab5b9284affc305ecfaa5293c506c3b49 100644 (file)
@@ -22,7 +22,7 @@ dig_with_opts() {
   "$DIG" +tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p "$PORT" "$@"
 }
 
-if [ -f ecdsa256-supported.file ]; then
+if [ $ECDSAP256SHA256_SUPPORTED = 1 ]; then
   n=$((n + 1))
   echo_i "checking that ECDSA256 positive validation works ($n)"
   ret=0
@@ -36,7 +36,7 @@ else
   echo_i "algorithm ECDSA256 not supported, skipping test"
 fi
 
-if [ -f ecdsa384-supported.file ]; then
+if [ $ECDSAP384SHA384_SUPPORTED = 1 ]; then
   n=$((n + 1))
   echo_i "checking that ECDSA384 positive validation works ($n)"
   ret=0
index c1238313d5e975bff997d2e1eea0d2154b1add33..38be2c969dacc5d97ad89c54efec6bbce128ca3f 100644 (file)
@@ -25,4 +25,3 @@ rm -f ns*/root.db
 rm -f ns*/signer.err
 rm -f ns*/trusted.conf
 rm -f ns*/example.com.db
-rm -f *-supported.file
index f2df3284dc480e614fe1e7885be72bd6cf42d378..d1b06f7c0550a93681b120c12d2391fcb01dcfa4 100644 (file)
@@ -23,14 +23,14 @@ echo_i "ns1/sign.sh"
 
 cp $infile $zonefile
 
-if [ -f ../ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
   zsk25519=$($KEYGEN -q -a ED25519 -n zone "$zone")
   ksk25519=$($KEYGEN -q -a ED25519 -n zone -f KSK "$zone")
   cat "$ksk25519.key" "$zsk25519.key" >>"$zonefile"
   $DSFROMKEY -a sha-256 "$ksk25519.key" >>dsset-256
 fi
 
-if [ -f ../ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   zsk448=$($KEYGEN -q -a ED448 -n zone "$zone")
   ksk448=$($KEYGEN -q -a ED448 -n zone -f KSK "$zone")
   cat "$ksk448.key" "$zsk448.key" >>"$zonefile"
@@ -38,7 +38,7 @@ if [ -f ../ed448-supported.file ]; then
 fi
 
 # Configure the resolving server with a static key.
-if [ -f ../ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
   keyfile_to_static_ds $ksk25519 >trusted.conf
   cp trusted.conf ../ns2/trusted.conf
 else
@@ -46,7 +46,7 @@ else
   cp trusted.conf ../ns2/trusted.conf
 fi
 
-if [ -f ../ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   keyfile_to_static_ds $ksk448 >trusted.conf
   cp trusted.conf ../ns3/trusted.conf
 else
index 04322fd272c7b8dfd740e2a951c945a2b209c074..175263cdf9c5d2937374db662ea585a73a466db9 100644 (file)
@@ -25,7 +25,7 @@ echo_i "ns2/sign.sh"
 
 cp $infile $zonefile
 
-if [ -f ../ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
 
   for i in Xexample.com.+015+03613 Xexample.com.+015+35217; do
     cp "$i.key" "$(echo $i.key | sed s/X/K/)"
index 7c625bcd31644d82889f55fe85da24d671293dff..1245adb3ad6db7814159bee68a84770900178ad0 100644 (file)
@@ -25,7 +25,7 @@ echo_i "ns3/sign.sh"
 
 cp $infile $zonefile
 
-if [ -f ../ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   for i in Xexample.com.+016+09713 Xexample.com.+016+38353; do
     cp "$i.key" "$(echo $i.key | sed s/X/K/)"
     cp "$i.private" "$(echo $i.private | sed s/X/K/)"
index 98ed0323d4eb4083ac12d61546ed58fe6b857111..ccf967b9f294df32c4c80203f4820711842fc5ce 100644 (file)
@@ -15,12 +15,6 @@ set -e
 
 . ../conf.sh
 
-supported=0
-if $SHELL ../testcrypto.sh ed25519; then
-  supported=1
+if [ $ED25519_SUPPORTED = 0 ] && [ $ED448_SUPPORTED = 0 ]; then
+  exit 1
 fi
-if $SHELL ../testcrypto.sh ed448; then
-  supported=1
-fi
-
-[ "$supported" -eq 1 ] || exit 1
index cad2756064c18846b8ab08cc59117d1d02d7b5d9..5d25331aff12d4573847abe9bb7358075c4e2550 100644 (file)
@@ -15,14 +15,6 @@ set -e
 
 . ../conf.sh
 
-if $SHELL ../testcrypto.sh ed25519; then
-  echo "yes" >ed25519-supported.file
-fi
-
-if $SHELL ../testcrypto.sh ed448; then
-  echo "yes" >ed448-supported.file
-fi
-
 copy_setports ns1/named.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf
index 93cf5cb9c8447835fb2f464b4592318ea58d13b2..4967ff2835d77c47d1452e53c25efaa1444be034 100644 (file)
@@ -22,7 +22,7 @@ dig_with_opts() {
   "$DIG" +tcp +noau +noadd +nosea +nostat +nocmd +dnssec -p "$PORT" "$@"
 }
 
-if [ -f ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
   # Check the example. domain
   n=$((n + 1))
   echo_i "checking that Ed25519 positive validation works ($n)"
@@ -50,7 +50,7 @@ fi
 
 n=$((n + 1))
 ret=0
-if [ -f ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   # Check the example. domain
   n=$((n + 1))
   echo_i "checking that Ed448 positive validation works ($n)"
index 51d59dd854bc9b47cdc356c1b9c3a54b28dc507e..e0dd87ae49e681e72d4f6994066ca5a826fae468 100644 (file)
@@ -59,9 +59,11 @@ for algtypebits in rsasha256:rsa:2048 rsasha512:rsa:2048 \
   alg=$(echo "$algtypebits" | cut -f 1 -d :)
   type=$(echo "$algtypebits" | cut -f 2 -d :)
   bits=$(echo "$algtypebits" | cut -f 3 -d :)
+  alg_upper=$(echo "$alg" | tr '[:lower:]' '[:upper:]')
+  supported=$(eval "echo \$${alg_upper}_SUPPORTED")
 
   tld="example"
-  if $SHELL ../testcrypto.sh $alg; then
+  if [ "${supported}" = 1 ]; then
     zone="$alg.$tld"
     zonefile="zone.$alg.$tld.db"
     ret=0
@@ -191,9 +193,11 @@ algtypebits="ecdsap256sha256:EC:prime256v1"
 alg=$(echo "$algtypebits" | cut -f 1 -d :)
 type=$(echo "$algtypebits" | cut -f 2 -d :)
 bits=$(echo "$algtypebits" | cut -f 3 -d :)
+alg_upper=$(echo "$alg" | tr '[:lower:]' '[:upper:]')
+supported=$(eval "echo \$${alg_upper}_SUPPORTED")
 tld="views"
 
-if $SHELL ../testcrypto.sh $alg; then
+if [ "${supported}" = 1 ]; then
   zone="$alg.$tld"
   zonefile1="zone.$alg.$tld.view1.db"
   zonefile2="zone.$alg.$tld.view2.db"
index 8102d50597871fcebb6cf9b8285fc6aaa9245b4b..08acb23c1c4d40b3a8531149253a7693a935feac 100644 (file)
@@ -33,7 +33,6 @@ rm -rf ns3/keys/
 rm -f *.created published.test* retired.test*
 rm -f rndc.dnssec.*.out.* rndc.zonestatus.out.*
 rm -f python.out.*
-rm -f *-supported.file
 rm -f created.key-* unused.key-*
 rm -f ns3/ksk/K* ns3/zsk/K*
 rm -rf ./ns3/ksk/ ./ns3/zsk/
index dd9dc83d8f0315a9faea5c86232896821fea3fd8..69150ada52da6367423309d28710c8bfbbb760ea 100644 (file)
@@ -66,10 +66,7 @@ cp template.db.in "i-am.special.kasp.db"
 # Set up RSASHA1 based zones
 #
 for zn in rsasha1 rsasha1-nsec3; do
-  if (
-    cd ..
-    $SHELL ../testcrypto.sh -q RSASHA1
-  ); then
+  if [ $RSASHA1_SUPPORTED = 1 ]; then
     setup "${zn}.kasp"
     cp template.db.in "$zonefile"
   else
@@ -79,13 +76,13 @@ for zn in rsasha1 rsasha1-nsec3; do
   fi
 done
 
-if [ -f ../ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
   setup "ed25519.kasp"
   cp template.db.in "$zonefile"
   cat ed25519.conf >>named.conf
 fi
 
-if [ -f ../ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   setup "ed448.kasp"
   cp template.db.in "$zonefile"
   cat ed448.conf >>named.conf
index 1d11ba96fd3073c9f3f6f18273e272524bf5edf1..321fd689d735b66224b6cfdc4b9e80f98e6a175f 100644 (file)
@@ -22,7 +22,7 @@ mkdir keys
 mkdir ns3/keys
 
 copy_setports ns2/named.conf.in ns2/named.conf
-if ! $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   copy_setports ns3/named-fips.conf.in ns3/named.conf
 else
   copy_setports ns3/named-fips.conf.in ns3/named-fips.conf
@@ -32,18 +32,10 @@ copy_setports ns4/named.conf.in ns4/named.conf
 copy_setports ns5/named.conf.in ns5/named.conf
 copy_setports ns6/named.conf.in ns6/named.conf
 
-if $SHELL ../testcrypto.sh ed25519; then
-  echo "yes" >ed25519-supported.file
-fi
-
-if $SHELL ../testcrypto.sh ed448; then
-  echo "yes" >ed448-supported.file
-fi
-
 copy_setports ns3/policies/autosign.conf.in ns3/policies/autosign.conf
 copy_setports ns3/policies/kasp-fips.conf.in ns3/policies/kasp-fips.conf
 copy_setports ns3/policies/kasp.conf.in ns3/policies/kasp.conf
-if ! $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   cp ns3/policies/kasp-fips.conf ns3/policies/kasp.conf
 fi
 
@@ -51,7 +43,7 @@ copy_setports ns6/policies/csk1.conf.in ns6/policies/csk1.conf
 copy_setports ns6/policies/csk2.conf.in ns6/policies/csk2.conf
 copy_setports ns6/policies/kasp-fips.conf.in ns6/policies/kasp-fips.conf
 copy_setports ns6/policies/kasp.conf.in ns6/policies/kasp.conf
-if ! $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   cp ns6/policies/kasp-fips.conf ns6/policies/kasp.conf
 fi
 
index fb4065acd3ab7ab4292ef69b364fe56ca0493a89..8f538e4a536f94ca3b5acfe5501a75fedae04790 100644 (file)
@@ -826,7 +826,7 @@ set_keytimes_algorithm_policy() {
 #
 # Zone: rsasha1.kasp.
 #
-if $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   set_zone "rsasha1.kasp"
   set_policy "rsasha1" "3" "1234"
   set_server "ns3" "10.53.0.3"
@@ -1173,7 +1173,7 @@ status=$((status + ret))
 #
 # Zone: rsasha1-nsec3.kasp.
 #
-if $SHELL ../testcrypto.sh -q RSASHA1; then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   set_zone "rsasha1-nsec3.kasp"
   set_policy "rsasha1-nsec3" "3" "1234"
   set_server "ns3" "10.53.0.3"
@@ -1275,7 +1275,7 @@ dnssec_verify
 #
 # Zone: ed25519.kasp.
 #
-if [ -f ed25519-supported.file ]; then
+if [ $ED25519_SUPPORTED = 1 ]; then
   set_zone "ed25519.kasp"
   set_policy "ed25519" "3" "1234"
   set_server "ns3" "10.53.0.3"
@@ -1297,7 +1297,7 @@ fi
 #
 # Zone: ed448.kasp.
 #
-if [ -f ed448-supported.file ]; then
+if [ $ED448_SUPPORTED = 1 ]; then
   set_zone "ed448.kasp"
   set_policy "ed448" "3" "1234"
   set_server "ns3" "10.53.0.3"
index f29f3270985177cc1e8e6f15b71d26f8e24e133f..ae4c9a6e6e0f37ec023244ec1e9720d4c0e11d47 100644 (file)
@@ -47,8 +47,10 @@ for algtypebits in rsasha256:rsa:2048 rsasha512:rsa:2048 \
   alg=$(echo "$algtypebits" | cut -f 1 -d :)
   type=$(echo "$algtypebits" | cut -f 2 -d :)
   bits=$(echo "$algtypebits" | cut -f 3 -d :)
+  alg_upper=$(echo "$alg" | tr '[:lower:]' '[:upper:]')
+  supported=$(eval "echo \$${alg_upper}_SUPPORTED")
 
-  if $SHELL ../testcrypto.sh $alg; then
+  if [ "${supported}" = 1 ]; then
     zone="$alg.example"
     zonefile="zone.$alg.example.db"
     ret=0
index 5ddcfc01b0eee1f9f416d32deee3bcf63fadb5fe..7db6d3910c44ea89b3dc5d2066193cc483cbf15d 100644 (file)
@@ -31,10 +31,7 @@ for zn in nsec-to-nsec3 nsec3 nsec3-other nsec3-change nsec3-to-nsec \
   setup "${zn}.kasp"
 done
 
-if (
-  cd ..
-  $SHELL ../testcrypto.sh -q RSASHA1
-); then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   for zn in rsasha1-to-nsec3 rsasha1-to-nsec3-wait nsec3-to-rsasha1 \
     nsec3-to-rsasha1-ds; do
     setup "${zn}.kasp"
index b9112958e128840866882b5d68e0d1a8077462c3..33772fd3f6bfd6a1b4490d38806c1f03e91cfbc4 100644 (file)
@@ -24,7 +24,7 @@ copy_setports ns2/named.conf.in ns2/named.conf
   $SHELL setup.sh
 )
 
-if ! ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   copy_setports ns3/named-fips.conf.in ns3/named.conf
 else
   copy_setports ns3/named-fips.conf.in ns3/named-fips.conf
index f7ab72a7d4b82f521d58d1ab16a131f27d76c886..bae2279aa41c28a44e497cffa19ec4b9d920bd8e 100644 (file)
@@ -242,7 +242,7 @@ set_key_default_values "KEY1"
 echo_i "initial check zone ${ZONE}"
 check_nsec
 
-if ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   # Zone: rsasha1-to-nsec3.kasp.
   set_zone_policy "rsasha1-to-nsec3.kasp" "rsasha1" 1 3600
   set_server "ns3" "10.53.0.3"
@@ -391,7 +391,7 @@ check_nsec
 # Reconfig named.
 ret=0
 echo_i "reconfig dnssec-policy to trigger nsec3 rollovers"
-if ! ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 0 ]; then
   copy_setports ns3/named2-fips.conf.in ns3/named.conf
 else
   copy_setports ns3/named2-fips.conf.in ns3/named-fips.conf
@@ -407,7 +407,7 @@ set_key_default_values "KEY1"
 echo_i "check zone ${ZONE} after reconfig"
 check_nsec3
 
-if ($SHELL ../testcrypto.sh -q RSASHA1); then
+if [ $RSASHA1_SUPPORTED = 1 ]; then
   # Zone: rsasha1-to-nsec3.kasp.
   set_zone_policy "rsasha1-to-nsec3.kasp" "nsec3" 2 3600
   set_server "ns3" "10.53.0.3"