Commit 33036556 authored by Michał Kępień's avatar Michał Kępień

[master] Prevent dnssec-settime from printing a bogus warning

4686.	[bug]		dnssec-settime -p could print a bogus warning about
			key deletion scheduled before its inactivation when a
			key had an inactivation date set but no deletion date
			set. [RT #45807]
parent 5201b96d
4686. [bug] dnssec-settime -p could print a bogus warning about
key deletion scheduled before its inactivation when a
key had an inactivation date set but no deletion date
set. [RT #45807]
4685. [bug] dnssec-settime incorrectly calculated publication and 4685. [bug] dnssec-settime incorrectly calculated publication and
activation dates for a successor key. [RT #45806] activation dates for a successor key. [RT #45806]
......
...@@ -524,7 +524,7 @@ main(int argc, char **argv) { ...@@ -524,7 +524,7 @@ main(int argc, char **argv) {
&prevdel) == ISC_R_SUCCESS && &prevdel) == ISC_R_SUCCESS &&
setinact && !setdel && !unsetdel && prevdel < inact) || setinact && !setdel && !unsetdel && prevdel < inact) ||
(!setdel && !unsetdel && !setinact && !unsetinact && (!setdel && !unsetdel && !setinact && !unsetinact &&
prevdel < previnact)) prevdel != 0 && prevdel < previnact))
fprintf(stderr, "%s: warning: Key is scheduled to " fprintf(stderr, "%s: warning: Key is scheduled to "
"be deleted before it is\n\t" "be deleted before it is\n\t"
"scheduled to be inactive.\n", "scheduled to be inactive.\n",
......
...@@ -162,6 +162,15 @@ n=`expr $n + 1` ...@@ -162,6 +162,15 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret` status=`expr $status + $ret`
echo "I:checking no warning about delete date < inactive date with dnssec-settime when delete date is unset ($n)"
ret=0
$SETTIME -D none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
$SETTIME -p all `cat oldstyle.key` > tmp.out 2>&1 || ret=1
grep "warning" tmp.out > /dev/null 2>&1 && ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking warning about delete date < inactive date with dnssec-keygen ($n)" echo "I:checking warning about delete date < inactive date with dnssec-keygen ($n)"
ret=0 ret=0
# keygen should print a warning about delete < inactive # keygen should print a warning about delete < inactive
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment