summaryrefslogtreecommitdiffstats
path: root/tool/src/sq_cli.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-10-04 15:31:28 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-12-06 15:11:54 +0100
commit30b37711392468161817653211754601f4f52057 (patch)
tree4060e00c6a3a9d18ec759e95d954a77f389f7a57 /tool/src/sq_cli.rs
parent149f252e5d1f6e30869f7981622322ab345cd2fc (diff)
tool: Add packet decrypt that unwraps encryption containers.
Diffstat (limited to 'tool/src/sq_cli.rs')
-rw-r--r--tool/src/sq_cli.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/tool/src/sq_cli.rs b/tool/src/sq_cli.rs
index d247e6d7..06ccde14 100644
--- a/tool/src/sq_cli.rs
+++ b/tool/src/sq_cli.rs
@@ -450,6 +450,36 @@ pub fn build() -> App<'static, 'static> {
.long("hex")
.short("x")
.help("Print a hexdump")))
+
+ .subcommand(SubCommand::with_name("decrypt")
+ .display_order(10)
+ .about("Decrypts an OpenPGP message, dumping \
+ the content of the encryption \
+ container without further processing")
+ .arg(Arg::with_name("input").value_name("FILE")
+ .help("Sets the input file to use"))
+ .arg(Arg::with_name("output").value_name("FILE")
+ .long("output")
+ .short("o")
+ .help("Sets the output file to use"))
+ .arg(Arg::with_name("binary")
+ .long("binary")
+ .short("B")
+ .help("Don't ASCII-armor encode the \
+ OpenPGP data"))
+ .arg(Arg::with_name("secret-key-file")
+ .long("secret-key-file")
+ .multiple(true)
+ .takes_value(true)
+ .value_name("TSK-FILE")
+ .number_of_values(1)
+ .help("Secret key to decrypt with, given \
+ as a file \
+ (can be given multiple times)"))
+ .arg(Arg::with_name("dump-session-key")
+ .long("dump-session-key")
+ .help("Prints the session key to stderr")))
+
.subcommand(SubCommand::with_name("split")
.about("Splits a message into OpenPGP packets")
.arg(Arg::with_name("input").value_name("FILE")