]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use jinja2 templates in tsig test
authorNicki Křížek <nicki@isc.org>
Fri, 5 Dec 2025 16:05:15 +0000 (17:05 +0100)
committerNicki Křížek <nicki@isc.org>
Tue, 9 Dec 2025 13:23:14 +0000 (14:23 +0100)
- Rename ns1/named-fips.conf.in to ns1/named.conf.j2.
- Move MD5-specific stuff into ns1/named-md5.conf.j2 and include it
  conditionally.

bin/tests/system/tsig/ns1/named-md5.conf.j2 [moved from bin/tests/system/tsig/ns1/named.conf.in with 96% similarity]
bin/tests/system/tsig/ns1/named.conf.j2 [moved from bin/tests/system/tsig/ns1/named-fips.conf.in with 97% similarity]
bin/tests/system/tsig/setup.sh [deleted file]

similarity index 96%
rename from bin/tests/system/tsig/ns1/named.conf.in
rename to bin/tests/system/tsig/ns1/named-md5.conf.j2
index cae7d592f96f3e5f49a5f6611411900f671ba8e7..78d4dfe0f68cf1afd84ca1547cf04bc8bb0b1128 100644 (file)
@@ -11,8 +11,6 @@
  * information regarding copyright ownership.
  */
 
-include "named-fips.conf";
-
 key "md5" {
        secret "97rnFx24Tfna4mHPfgnerA==";
        algorithm hmac-md5;
similarity index 97%
rename from bin/tests/system/tsig/ns1/named-fips.conf.in
rename to bin/tests/system/tsig/ns1/named.conf.j2
index 6925f0f9c5133ddacffdc94899ec4bb251d98ec5..60c6a9223724bc07e1a5eaf0e9fd6ad8a462dd0a 100644 (file)
@@ -24,6 +24,10 @@ options {
        notify no;
 };
 
+{% if FEATURE_MD5 == "1" %}
+include "named-md5.conf";
+{% endif %}
+
 key "sha1" {
        secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
        algorithm hmac-sha1;
diff --git a/bin/tests/system/tsig/setup.sh b/bin/tests/system/tsig/setup.sh
deleted file mode 100644 (file)
index 37eb617..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# SPDX-License-Identifier: MPL-2.0
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, you can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-. ../conf.sh
-
-if $FEATURETEST --md5; then
-  copy_setports ns1/named-fips.conf.in ns1/named-fips.conf
-  # includes named-fips.conf
-  cp ns1/named.conf.in ns1/named.conf
-else
-  copy_setports ns1/named-fips.conf.in ns1/named.conf
-fi