mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-22 06:37:42 -04:00
Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:
tkey-dhkey "server" ;
Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file. Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.
This commit is contained in:
parent
fd8adb1282
commit
0b7b1161c2
1 changed files with 1 additions and 1 deletions
|
|
@ -13,6 +13,6 @@ SYSTEMTESTTOP=../..
|
|||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
keyname=`$KEYGEN -T KEY -a DH -b 768 -n host server`
|
||||
keyid=`echo $keyname | $PERL -p -e 's/^.*\+0*//;'`
|
||||
keyid=`echo $keyname | $PERL -p -e 's/^.*\+0{0,4}//;'`
|
||||
rm -f named.conf
|
||||
sed -e "s;KEYID;$keyid;" < named.conf.in > named.conf
|
||||
|
|
|
|||
Loading…
Reference in a new issue