Use jinja2 templates in tsig test

- 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.
This commit is contained in:
Nicki Křížek 2025-12-05 17:05:15 +01:00
parent 16e9ac4710
commit 8db37ac31c
3 changed files with 4 additions and 24 deletions

View file

@ -11,8 +11,6 @@
* information regarding copyright ownership.
*/
include "named-fips.conf";
key "md5" {
secret "97rnFx24Tfna4mHPfgnerA==";
algorithm hmac-md5;

View file

@ -24,6 +24,10 @@ options {
notify no;
};
{% if FEATURE_MD5 == "1" %}
include "named-md5.conf";
{% endif %}
key "sha1" {
secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
algorithm hmac-sha1;

View file

@ -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