Change nsec3param salt config to saltlen
Upon request from Mark, change the configuration of salt to salt length. Introduce a new function 'dns_zone_checknsec3aram' that can be used upon reconfiguration to check if the existing NSEC3 parameters are in sync with the configuration. If a salt is used that matches the configured salt length, don't change the NSEC3 parameters.
This commit is contained in:
@@ -38,11 +38,14 @@ set_zone_policy() {
|
||||
ZONE=$1
|
||||
POLICY=$2
|
||||
}
|
||||
# Set expected NSEC3 parameters: flags ($1), iterations ($2), and salt ($3).
|
||||
# Set expected NSEC3 parameters: flags ($1), iterations ($2), and
|
||||
# salt length ($3).
|
||||
set_nsec3param() {
|
||||
FLAGS=$1
|
||||
ITERATIONS=$2
|
||||
SALT=$3
|
||||
SALTLEN=$3
|
||||
SALT=""
|
||||
test "$SALTLEN" = "0" && SALT="-"
|
||||
}
|
||||
|
||||
# The apex NSEC3PARAM record indicates that it is signed.
|
||||
@@ -167,7 +170,7 @@ dnssec_verify
|
||||
|
||||
# Zone: nsec3.kasp.
|
||||
set_zone_policy "nsec3.kasp" "nsec3"
|
||||
set_nsec3param "0" "5" "-"
|
||||
set_nsec3param "0" "5" "8"
|
||||
echo_i "initial check zone ${ZONE}"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
@@ -192,14 +195,14 @@ dnssec_verify
|
||||
|
||||
# Zone: nsec3-from-optout.kasp.
|
||||
set_zone_policy "nsec3-from-optout.kasp" "optout"
|
||||
set_nsec3param "1" "5" "-"
|
||||
set_nsec3param "1" "5" "8"
|
||||
echo_i "initial check zone ${ZONE}"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
|
||||
# Zone: nsec3-other.kasp.
|
||||
set_zone_policy "nsec3-other.kasp" "nsec3-other"
|
||||
set_nsec3param "1" "11" "DEADBEEF"
|
||||
set_nsec3param "1" "11" "0"
|
||||
echo_i "initial check zone ${ZONE}"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
@@ -213,7 +216,7 @@ rndc_reconfig ns3 10.53.0.3
|
||||
|
||||
# Zone: nsec-to-nsec3.kasp. (reconfigured)
|
||||
set_zone_policy "nsec-to-nsec3.kasp" "nsec3"
|
||||
set_nsec3param "0" "5" "-"
|
||||
set_nsec3param "0" "5" "8"
|
||||
echo_i "check zone ${ZONE} after reconfig"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
@@ -226,7 +229,7 @@ dnssec_verify
|
||||
|
||||
# Zone: nsec3-change.kasp. (reconfigured)
|
||||
set_zone_policy "nsec3-change.kasp" "nsec3-other"
|
||||
set_nsec3param "1" "11" "DEADBEEF"
|
||||
set_nsec3param "1" "11" "0"
|
||||
echo_i "check zone ${ZONE} after reconfig"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
@@ -238,25 +241,28 @@ check_nsec
|
||||
dnssec_verify
|
||||
|
||||
# Zone: nsec3-to-optout.kasp. (reconfigured)
|
||||
set_zone_policy "nsec3-to-optout.kasp" "optout"
|
||||
set_nsec3param "1" "5" "-"
|
||||
echo_i "check zone ${ZONE} after reconfig"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
# DISABLED:
|
||||
# There is a bug in the nsec3param building code that thinks when the
|
||||
# optout bit is changed, the chain already exists. [GL #2216]
|
||||
#set_zone_policy "nsec3-to-optout.kasp" "optout"
|
||||
#set_nsec3param "1" "5" "8"
|
||||
#echo_i "check zone ${ZONE} after reconfig"
|
||||
#check_nsec3
|
||||
#dnssec_verify
|
||||
|
||||
# Zone: nsec3-from-optout.kasp. (reconfigured)
|
||||
# DISABLED:
|
||||
# There is a bug in the nsec3param building code that thinks when the
|
||||
# optout bit is removed, the chain already exists. [GL #2216]
|
||||
# optout bit is changed, the chain already exists. [GL #2216]
|
||||
#set_zone_policy "nsec3-from-optout.kasp" "nsec3"
|
||||
#set_nsec3param "0" "5" "-"
|
||||
#set_nsec3param "0" "5" "8"
|
||||
#echo_i "check zone ${ZONE} after reconfig"
|
||||
#check_nsec3
|
||||
#dnssec_verify
|
||||
|
||||
# Zone: nsec3-other.kasp. (same)
|
||||
set_zone_policy "nsec3-other.kasp" "nsec3-other"
|
||||
set_nsec3param "1" "11" "DEADBEEF"
|
||||
set_nsec3param "1" "11" "0"
|
||||
echo_i "check zone ${ZONE} after reconfig"
|
||||
check_nsec3
|
||||
dnssec_verify
|
||||
|
||||
Reference in New Issue
Block a user