mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-09-30 14:05:33 +00:00
plc: always keep signing key in rotationKeys
Lewis: May this revision serve well! <lu5a@proton.me>
This commit is contained in:
@@ -62,6 +62,12 @@ async fn main() -> ExitCode {
|
||||
eprint!("{e}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
if let Some(key) = config.secrets.plc_rotation_key.as_deref()
|
||||
&& let Err(reason) = tranquil_pds::plc::validate_rotation_did_key(key)
|
||||
{
|
||||
eprintln!("secrets.plc_rotation_key (PLC_ROTATION_KEY) {reason}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
if !*ignore_secrets
|
||||
&& let Some((cert, key)) = config.server.tls.material()
|
||||
&& let Err(e) = tls::load_certified_key(cert, key)
|
||||
@@ -90,6 +96,13 @@ async fn main() -> ExitCode {
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
|
||||
if let Some(key) = config.secrets.plc_rotation_key.as_deref()
|
||||
&& let Err(reason) = tranquil_pds::plc::validate_rotation_did_key(key)
|
||||
{
|
||||
error!("secrets.plc_rotation_key (PLC_ROTATION_KEY) {reason}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
|
||||
tranquil_config::init(config);
|
||||
|
||||
tranquil_pds::metrics::init_metrics();
|
||||
|
||||
Reference in New Issue
Block a user