summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2022-06-30 14:48:25 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2022-07-04 19:07:06 +0200
commit279f3fce87e2f6f04526a94c2de26ab199d7103e (patch)
tree7468284127e9c3e7cd35a3a519814ba16326bb40
parent9d4be0b243b6a0d61c7fa1b33d6b1f978f1b6601 (diff)
sq: Use default input argument for key password.
- Fixes #890
-rw-r--r--sq/src/commands/key.rs2
-rw-r--r--sq/src/sq_cli.rs14
2 files changed, 3 insertions, 13 deletions
diff --git a/sq/src/commands/key.rs b/sq/src/commands/key.rs
index 99e849d9..8fca5e20 100644
--- a/sq/src/commands/key.rs
+++ b/sq/src/commands/key.rs
@@ -227,7 +227,7 @@ fn generate(config: Config, m: &ArgMatches) -> Result<()> {
}
fn password(config: Config, m: &ArgMatches) -> Result<()> {
- let input = open_or_stdin(m.value_of("certificate"))?;
+ let input = open_or_stdin(m.value_of("input"))?;
let key = Cert::from_reader(input)?;
if ! key.is_tsk() {
diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs
index 5896ea25..d012e6c6 100644
--- a/sq/src/sq_cli.rs
+++ b/sq/src/sq_cli.rs
@@ -1828,29 +1828,19 @@ $ sq key password --clear < juliet.encrypted_key.pgp > juliet.decrypted_key.pgp
",
)]
pub struct KeyPasswordCommand {
+ #[clap(flatten)]
+ pub io: IoArgs,
#[clap(
long = "clear",
help = "Emit a key with unencrypted secrets",
)]
pub clear: bool,
#[clap(
- short,
- long,
- value_name = "FILE",
- help = "Writes to FILE or stdout if omitted"
- )]
- pub output: Option<String>,
- #[clap(
short = 'B',
long,
help = "Emits binary data",
)]
pub binary: bool,
- #[clap(
- value_name = "FILE",
- help = "Reads from FILE or stdin if omitted",
- )]
- key: Option<String>
}
#[derive(Debug, Args)]