diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-01-21 21:54:16 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-01-21 21:54:16 +0100 |
commit | abd25fcc62c0a5f2390f118c5ef12f427b0f5af9 (patch) | |
tree | 8356bef1c4cf3f6cf6f51d6ed3ffe1da38053921 /sq/src | |
parent | 750375ea7f1ba15a9bb7b4cfe4422d869d9ed648 (diff) |
sq: Add autocrypt decode --binary.
Diffstat (limited to 'sq/src')
-rw-r--r-- | sq/src/sq-usage.rs | 3 | ||||
-rw-r--r-- | sq/src/sq.rs | 2 | ||||
-rw-r--r-- | sq/src/sq_cli.rs | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sq/src/sq-usage.rs b/sq/src/sq-usage.rs index 6dd037be..cbf29837 100644 --- a/sq/src/sq-usage.rs +++ b/sq/src/sq-usage.rs @@ -560,9 +560,10 @@ //! Reads Autocrypt-encoded certificates //! //! USAGE: -//! sq autocrypt decode [OPTIONS] [FILE] +//! sq autocrypt decode [FLAGS] [OPTIONS] [FILE] //! //! FLAGS: +//! -B, --binary Emits binary data //! -h, --help Prints help information //! -V, --version Prints version information //! diff --git a/sq/src/sq.rs b/sq/src/sq.rs index d219c940..8d4752ac 100644 --- a/sq/src/sq.rs +++ b/sq/src/sq.rs @@ -444,7 +444,7 @@ fn main() -> Result<()> { let input = open_or_stdin(m.value_of("input"))?; let mut output = create_or_stdout_pgp(m.value_of("output"), force, - true, + m.is_present("binary"), armor::Kind::PublicKey)?; let ac = autocrypt::AutocryptHeaders::from_reader(input)?; for h in &ac.headers { diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs index de7a0817..d5dba4aa 100644 --- a/sq/src/sq_cli.rs +++ b/sq/src/sq_cli.rs @@ -248,6 +248,9 @@ pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> { .arg(Arg::with_name("output") .short("o").long("output").value_name("FILE") .help("Writes to FILE or stdout if omitted")) + .arg(Arg::with_name("binary") + .short("B").long("binary") + .help("Emits binary data")) ) .subcommand(SubCommand::with_name("encode-sender") .about("Encodes the sender's OpenPGP \ |