Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/units/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,10 @@ impl HttpServer {
}
}

// We should have an on_zone_policy_changed per zone. For now, just
// call it once.
center.signer.on_zone_policy_changed();

let mut changes: Vec<(String, _)> =
changes.into_iter().map(|(p, c)| (p.into(), c)).collect();
changes.sort_unstable_by(|l, r| l.0.cmp(&r.0));
Expand Down
7 changes: 7 additions & 0 deletions src/units/zone_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ impl ZoneSigner {
let _ = self.next_resign_time_tx.send(self.next_resign_time(center));
}

pub fn on_zone_policy_changed(&self) {
// Just recompute the resign timer. In the future we may want to
// react to changes in policy, for example, whether NSEC is used
// or NSEC3.
let _ = self.next_resign_time_tx.send(Some(Instant::now()));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I read "recompute" I expected something more than "now". Is that correct?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would some policy changes require notifying dnst keyset of changes? If so, would that result in dnst keyset deciding re-signing needs to happen now, and thus is an alternative way to do this be to nudge the Cascade key manager to invoke dnst keyset to find out if re-signing is needed?

}

/// Enqueue a zone for signing, waiting until it can begin.
pub async fn wait_to_sign(
&self,
Expand Down
Loading