xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/tsig/setup.sh (revision 70f7362772ba52b749c976fb5e86e39a8b2c9afc)
1#!/bin/sh
2
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# SPDX-License-Identifier: MPL-2.0
6#
7# This Source Code Form is subject to the terms of the Mozilla Public
8# License, v. 2.0.  If a copy of the MPL was not distributed with this
9# file, you can obtain one at https://mozilla.org/MPL/2.0/.
10#
11# See the COPYRIGHT file distributed with this work for additional
12# information regarding copyright ownership.
13
14. ../conf.sh
15
16$SHELL clean.sh
17
18copy_setports ns1/named.conf.in ns1/named.conf
19
20if $FEATURETEST --md5; then
21  cat >>ns1/named.conf <<EOF
22# Conditionally included when support for MD5 is available
23key "md5" {
24        secret "97rnFx24Tfna4mHPfgnerA==";
25        algorithm hmac-md5;
26};
27
28key "hmac-md5-legacy" {
29	algorithm "hmac-md5";
30	secret "B7HCXJs0XnSPzypG5oHuGw==";
31};
32
33key "md5-trunc" {
34        secret "97rnFx24Tfna4mHPfgnerA==";
35        algorithm hmac-md5-80;
36};
37EOF
38fi
39