mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
keygen -k: allow to set times, not genonly
For testing purposes mainly, we want to allow set keytimings on generated keys, such that we don't have to "keygen/settime" which can result in one second off times.
This commit is contained in:
@@ -1223,18 +1223,7 @@ main(int argc, char **argv) {
|
|||||||
fatal("-k and -3 cannot be used together");
|
fatal("-k and -3 cannot be used together");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.setpub || ctx.setact || ctx.setrev || ctx.setinact ||
|
|
||||||
ctx.setdel || ctx.unsetpub || ctx.unsetact ||
|
|
||||||
ctx.unsetrev || ctx.unsetinact || ctx.unsetdel ||
|
|
||||||
ctx.setsyncadd || ctx.setsyncdel)
|
|
||||||
{
|
|
||||||
fatal("cannot use -k together with "
|
|
||||||
"-P, -A, -R, -I, or -D options "
|
|
||||||
"(use dnssec-settime on keys afterwards)");
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.options |= DST_TYPE_STATE;
|
ctx.options |= DST_TYPE_STATE;
|
||||||
ctx.genonly = true;
|
|
||||||
|
|
||||||
if (strcmp(ctx.policy, "default") == 0) {
|
if (strcmp(ctx.policy, "default") == 0) {
|
||||||
ctx.use_nsec3 = false;
|
ctx.use_nsec3 = false;
|
||||||
|
@@ -71,8 +71,8 @@ $KEYGEN -a RSASHA1 -b 2000 -L 1234 $zone > keygen.out.$zone.1 2>&1
|
|||||||
$KEYGEN -a RSASHA1 -f KSK -L 1234 $zone > keygen.out.$zone.2 2>&1
|
$KEYGEN -a RSASHA1 -f KSK -L 1234 $zone > keygen.out.$zone.2 2>&1
|
||||||
|
|
||||||
zone="pregenerated.kasp"
|
zone="pregenerated.kasp"
|
||||||
$KEYGEN -k rsasha1 -l policies/kasp.conf $zone > keygen.out.$zone.1 2>&1
|
$KEYGEN -G -k rsasha1 -l policies/kasp.conf $zone > keygen.out.$zone.1 2>&1
|
||||||
$KEYGEN -k rsasha1 -l policies/kasp.conf $zone > keygen.out.$zone.2 2>&1
|
$KEYGEN -G -k rsasha1 -l policies/kasp.conf $zone > keygen.out.$zone.2 2>&1
|
||||||
|
|
||||||
zone="rumoured.kasp"
|
zone="rumoured.kasp"
|
||||||
Tpub="now"
|
Tpub="now"
|
||||||
|
Reference in New Issue
Block a user