Skip to content

Commit

Permalink
Rename timing_config to ta_config and alias (#1242)
Browse files Browse the repository at this point in the history
This PR renames the `timing_config` options in the Krill config to
`ta_timing`. It was already required to have this name if the config
was used by the Krill TA signer. The `timing_config` name is allowed
as an alias in both cases now.

This a backport of #1241 to the 0.14 series of Krill.
  • Loading branch information
Koenvh1 authored Dec 4, 2024
1 parent a87d9e2 commit 23ac9fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cli/ta_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ impl TrustAnchorSignerManager {
tal_rsync: info.tal_rsync,
private_key_pem: info.private_key_pem,
ta_mft_nr_override: info.ta_mft_nr_override,
timing: self.config.timing_config,
timing: self.config.ta_timing,
signer: self.signer.clone(),
},
&self.actor,
Expand All @@ -1099,7 +1099,7 @@ impl TrustAnchorSignerManager {
let cmd = TrustAnchorSignerCommand::make_process_request_command(
&self.ta_handle,
signed_request,
self.config.timing_config,
self.config.ta_timing,
ta_mft_number_override,
self.signer.clone(),
&self.actor,
Expand Down
5 changes: 4 additions & 1 deletion src/daemon/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,10 @@ pub struct Config {

pub benchmark: Option<Benchmark>,

#[serde(default)]
#[serde(
default,
alias="timing_config"
)]
pub ta_timing: TaTimingConfig,
}

Expand Down
7 changes: 5 additions & 2 deletions src/ta/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ pub struct Config {
#[serde(default = "crate::daemon::config::ConfigDefaults::signers")]
pub signers: Vec<SignerConfig>,

#[serde(default)]
pub timing_config: TaTimingConfig,
#[serde(
default,
alias="timing_config"
)]
pub ta_timing: TaTimingConfig,
}

impl Config {
Expand Down

0 comments on commit 23ac9fd

Please sign in to comment.