DnssecPrivateKey: Updated RolloverDays to add one more validation check.

This commit is contained in:
Shreyas Zare
2022-05-21 12:58:55 +05:30
parent 9ea77190d3
commit a47bb8fc24

View File

@@ -347,10 +347,13 @@ namespace DnsServerCore.Dns.Dnssec
case DnssecPrivateKeyState.Published:
case DnssecPrivateKeyState.Ready:
case DnssecPrivateKeyState.Active:
if (_isRetiring)
throw new InvalidOperationException("Zone Signing Key (ZSK) automatic rollover cannot be set since it is set to retire.");
break;
default:
throw new ArgumentOutOfRangeException(nameof(RolloverDays), "Zone Signing Key (ZSK) automatic rollover cannot be set due to invalid key state.");
throw new InvalidOperationException("Zone Signing Key (ZSK) automatic rollover cannot be set due to invalid key state.");
}
}
else