Teach dnssec-settime to read times that it writes
The dnssec-settime -p and -up options print times in asctime() and UNIX time_t formats, respectively. The asctime() format can also be found inside K*.key public key files. Key files also contain times in the YYYYMMDDHHMMSS format that can be used in timing parameter options. The dnssec-settime -p and -up time formats are now acceptable in timing parameter options to dnssec-settime and dnssec-keygen, so it is no longer necessary to parse key files to retrieve times that are acceptable in timing parameter options.
This commit is contained in:
@@ -208,5 +208,21 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
key=`$KEYGEN -q -a RSASHA1 $czone`
|
||||
|
||||
echo_i "checking -p output time is accepted ($n)"
|
||||
t=`$SETTIME -pA $key | sed 's/.*: //'`
|
||||
$SETTIME -Psync "$t" $key > /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 -up output time is accepted ($n)"
|
||||
t=`$SETTIME -upA $key | sed 's/.*: //'`
|
||||
$SETTIME -Dsync "$t" $key > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
Reference in New Issue
Block a user