From cc0c5f1e734db8dde65b55462843c278244c640e Mon Sep 17 00:00:00 2001 From: Bly Kim Date: Thu, 22 Aug 2024 15:40:44 +0900 Subject: [PATCH] Rename `root` to `root_ca` --- CHANGELOG.md | 1 + src/main.rs | 4 ++-- src/settings.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ae9fcc..fecc5a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Versioning](https://semver.org/spec/v2.0.0.html). - Removed `cert`, `key`, `root` fields from config file. - Changed `set_giganto_config` to receive toml-string with full configuration. - Updated `giganto_config` to respond full configuration. +- Renamed `root` to `root_ca`. ## [0.20.0] - 2024-05-17 diff --git a/src/main.rs b/src/main.rs index 19ed1db..e876342 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,8 +73,8 @@ async fn main() -> Result<()> { let key_pem = fs::read(&args.key) .with_context(|| format!("failed to read private key file: {}", args.key))?; let key = to_private_key(&key_pem).context("cannot read private key")?; - let root_pem = fs::read(&args.root) - .with_context(|| format!("failed to read root certificate file: {}", args.root))?; + let root_pem = fs::read(&args.root_ca) + .with_context(|| format!("failed to read root certificate file: {}", args.root_ca))?; let root_cert = to_root_cert(&root_pem)?; let certs = Arc::new(Certs { certs: cert.clone(), diff --git a/src/settings.rs b/src/settings.rs index f008553..4f0443c 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -34,8 +34,8 @@ pub struct Args { pub key: String, /// Path to the root CA file - #[arg(long, value_name = "ROOT_PATH")] - pub root: String, + #[arg(long, value_name = "ROOT_CA_PATH")] + pub root_ca: String, /// Enable the repair mode #[arg(long)]