diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2022-07-06 09:11:42 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2022-07-06 09:11:45 +0200 |
commit | a0c0b65360f6905eb1bf0e2b9ce540f27c78b525 (patch) | |
tree | 7f01f221f9c7dfba97f841211bd93742167e28f3 | |
parent | 8b8cf3b788b01e5adee6de2570c27c6c4f104b75 (diff) |
sq: Rename network-policy argument.
- The network policy argument of sq wkd and sq keyserver is --policy
or -p, leading to possible confusion with sequoia's openpgp policy.
- Rename the argument to --network-policy and -n.
-rw-r--r-- | sq/src/commands/net.rs | 4 | ||||
-rw-r--r-- | sq/src/sq-usage.rs | 2 | ||||
-rw-r--r-- | sq/src/sq_cli.rs | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sq/src/commands/net.rs b/sq/src/commands/net.rs index 8865af1e..f7a93bed 100644 --- a/sq/src/commands/net.rs +++ b/sq/src/commands/net.rs @@ -34,7 +34,7 @@ use crate::sq_cli::WkdCommand; use crate::sq_cli::WkdSubcommands; pub fn dispatch_keyserver(config: Config, c: KeyserverCommand) -> Result<()> { - let network_policy = c.policy.into(); + let network_policy = c.network_policy.into(); let mut ks = if let Some(uri) = c.server { KeyServer::new(network_policy, &uri) } else { @@ -90,7 +90,7 @@ pub fn dispatch_keyserver(config: Config, c: KeyserverCommand) -> Result<()> { } pub fn dispatch_wkd(config: Config, c: WkdCommand) -> Result<()> { - let network_policy: net::Policy = c.policy.into(); + let network_policy: net::Policy = c.network_policy.into(); let rt = tokio::runtime::Builder::new_current_thread() .enable_io() diff --git a/sq/src/sq-usage.rs b/sq/src/sq-usage.rs index e9d9cd4a..0bfec102 100644 --- a/sq/src/sq-usage.rs +++ b/sq/src/sq-usage.rs @@ -1213,7 +1213,7 @@ //! -h, --help //! Print help information //! -//! -p, --policy <NETWORK-POLICY> +//! -n, --network-policy <NETWORK-POLICY> //! Sets the network policy to use [default: encrypted] [possible //! values: offline, anonymized, encrypted, insecure] //! diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs index 076259ba..98db4f14 100644 --- a/sq/src/sq_cli.rs +++ b/sq/src/sq_cli.rs @@ -2116,14 +2116,14 @@ pub struct KeyAttestCertificationsCommand { )] pub struct WkdCommand { #[clap( - short = 'p', - long = "policy", + short, + long, value_name = "NETWORK-POLICY", default_value_t = NetworkPolicy::Encrypted, arg_enum, help = "Sets the network policy to use", )] - pub policy: NetworkPolicy, + pub network_policy: NetworkPolicy, #[clap(subcommand)] pub subcommand: WkdSubcommands, } @@ -2254,14 +2254,14 @@ pub struct WkdGenerateCommand { )] pub struct KeyserverCommand { #[clap( - short, - long, + short = 'p', + long = "policy", value_name = "NETWORK-POLICY", default_value_t = NetworkPolicy::Encrypted, help = "Sets the network policy to use", arg_enum, )] - pub policy: NetworkPolicy, + pub network_policy: NetworkPolicy, #[clap( short, long, |