Skip to content

Commit

Permalink
changes after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Folkert de Vries committed Dec 7, 2023
1 parent dfdcd3b commit 76786f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ntp-proto/src/nts_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ pub struct NtsKeys {
}

impl NtsKeys {
#[cfg(feature = "nts-pool")]
pub fn as_fixed_key_request(&self) -> NtsRecord {
NtsRecord::FixedKeyRequest {
c2s: self.c2s.key_bytes().to_vec(),
Expand Down Expand Up @@ -1532,7 +1533,7 @@ impl KeyExchangeServer {
// So then, the other reason we could end up here is if the buffer is
// full. But 512 bytes is a lot of space for this interaction, and
// should be sufficient in most cases.
self.progress()
ControlFlow::Continue(self)
}
ControlFlow::Break(Ok(data)) => {
// all records have been decoded; send a response
Expand Down Expand Up @@ -1600,7 +1601,6 @@ impl KeyExchangeServer {
#[cfg(feature = "nts-pool")]
fn extract_nts_keys(&self, data: &ServerKeyExchangeData) -> Result<NtsKeys, KeyExchangeError> {
if let Some(keys) = &data.fixed_keys {
// TODO remove "true" here when the connection checking works
if self.privileged_connection() {
tracing::debug!("using fixed keys for AEAD algorithm");
data.algorithm
Expand Down
2 changes: 1 addition & 1 deletion ntpd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ntp-proto = { workspace = true, features = ["__internal-test",] }
tokio-rustls.workspace = true

[features]
default = ["unstable_nts-pool"]
default = []
hardware-timestamping = []
__internal-fuzz = []
unstable_ntpv5 = ["ntp-proto/ntpv5"]
Expand Down

0 comments on commit 76786f3

Please sign in to comment.