Skip to content

Commit

Permalink
Rename root to root_ca
Browse files Browse the repository at this point in the history
  • Loading branch information
BLYKIM committed Aug 22, 2024
1 parent d7c8453 commit 20dba02
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ processing and real-time analytics.
You can run giganto by invoking the following command:

```sh
giganto --cert <CERT_PATH> --key <KEY_PATH> --root <ROOT_PATH>
giganto --cert <CERT_PATH> --key <KEY_PATH> --root-ca <ROOT_CA_PATH>
```

If you want to run giganto with local configuration file,

```sh
giganto -c <CONFIG_PATH> --cert <CERT_PATH> --key <KEY_PATH> --root <ROOT_PATH>
giganto -c <CONFIG_PATH> --cert <CERT_PATH> --key <KEY_PATH> --root-ca <ROOT_CA_PATH>
```

In the config file, you can specify the following options:
Expand Down Expand Up @@ -77,7 +77,7 @@ certificate/key from the tests folder.)

```sh
cargo run -- -c tests/node1/config.toml --cert tests/node1/cert.pem \
--key tests/node1/key.pem --root tests/root.pem
--key tests/node1/key.pem --root-ca tests/root.pem
```

## License
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 20dba02

Please sign in to comment.