Squashed commit of the following:
commit 2a0e5695da2e0f701191e2783209ac05c9d01e6c Author: Mark Andrews <marka@isc.org> Date: Thu Aug 31 12:15:05 2017 +1000 remove 'on' from error message commit f18a8d699b69be35b938cfe2b30ebb30cd78e814 Author: Mark Andrews <marka@isc.org> Date: Thu Aug 31 11:58:41 2017 +1000 add more cookie-secret named-checkconf tests commit ca8f5f5f57ccbeb970310866523a909eb411a554 Author: Mark Andrews <marka@isc.org> Date: Thu Aug 31 11:31:57 2017 +1000 properly check algorithm names
This commit is contained in:
12
bin/tests/system/cookie/bad-cookie-badsha1.conf
Normal file
12
bin/tests/system/cookie/bad-cookie-badsha1.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* 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 http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
options {
|
||||
cookie-algorithm sha1;
|
||||
cookie-secret "ebc7701beabb4a40c57d140eeb6733fafba4272fff"; // 168 bits
|
||||
};
|
||||
12
bin/tests/system/cookie/bad-cookie-badsha256.conf
Normal file
12
bin/tests/system/cookie/bad-cookie-badsha256.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* 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 http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
options {
|
||||
cookie-algorithm sha256;
|
||||
cookie-secret "ebc7701beabb4a40c57d140eeb6733fafba4272f"; // 160 bits
|
||||
};
|
||||
12
bin/tests/system/cookie/good-cookie-sha1.conf
Normal file
12
bin/tests/system/cookie/good-cookie-sha1.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* 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 http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
options {
|
||||
cookie-algorithm sha1;
|
||||
cookie-secret "ebc7701beabb4a40c57d140eeb6733fafba4272f"; // 160 bits
|
||||
};
|
||||
12
bin/tests/system/cookie/good-cookie-sha256.conf
Normal file
12
bin/tests/system/cookie/good-cookie-sha256.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* 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 http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
options {
|
||||
cookie-algorithm sha256;
|
||||
cookie-secret "b174e3800b6734f73268f15831c957860a8ee1229cfb9039c1514836f53efbed";
|
||||
};
|
||||
@@ -32,10 +32,21 @@ havetc() {
|
||||
|
||||
for bad in bad*.conf
|
||||
do
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking that named-checkconf detects error in $bad ($n)"
|
||||
ret=0
|
||||
echo "I:checking that named-checkconf detects error in $bad"
|
||||
$CHECKCONF $bad > /dev/null 2>&1
|
||||
if [ $? != 1 ]; then echo "I:failed"; ret=1; fi
|
||||
$CHECKCONF $bad > /dev/null 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
done
|
||||
|
||||
for good in good*.conf
|
||||
do
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking that named-checkconf detects accepts $good ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $good > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user