mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-20 16:37:43 +02:00
Ignore key roll activation when there is no new key to activate. (interop #3)
This commit is contained in:
@@ -481,4 +481,12 @@ impl KeyState {
|
||||
_ => Err(Error::ResourceClassNoNewKey),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if there is a new key
|
||||
pub fn has_new_key(&self) -> bool {
|
||||
match self {
|
||||
KeyState::RollNew(_, _) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -693,7 +693,7 @@ impl ResourceClass {
|
||||
staging: Duration,
|
||||
signer: &S,
|
||||
) -> ca::Result<Vec<EvtDet>> {
|
||||
if self.last_key_change + staging > Time::now() {
|
||||
if !self.key_state.has_new_key() || self.last_key_change + staging > Time::now() {
|
||||
return Ok(vec![]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user