diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-08-16 17:34:35 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-08-16 17:34:35 +0200 |
commit | f00f6c53195363dc58dfae27966cc01594ccf16e (patch) | |
tree | 2e2b44bfa881564e3748fe7f7c782e12d7fcb24e /tool/src/sq.rs | |
parent | 739a00bcc10d36d250dd7c28b26be4ce9cd45307 (diff) |
tool: Implement sq verify.
- Fixes #16.
Diffstat (limited to 'tool/src/sq.rs')
-rw-r--r-- | tool/src/sq.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tool/src/sq.rs b/tool/src/sq.rs index 98f3a447..07b7a26b 100644 --- a/tool/src/sq.rs +++ b/tool/src/sq.rs @@ -127,6 +127,19 @@ fn real_main() -> Result<(), failure::Error> { .unwrap_or(Ok(vec![]))?; commands::sign(&mut input, &mut output, secrets, detached)?; }, + ("verify", Some(m)) => { + let input = open_or_stdin(m.value_of("input"))?; + let mut input = openpgp::Reader::from_reader(input)?; + let mut output = create_or_stdout(m.value_of("output"))?; + let detached = m.is_present("detached"); + if detached { + unimplemented!("Detached signature generation not implemented"); + } + let tpks = m.values_of("public-key-file") + .map(load_tpks) + .unwrap_or(Ok(vec![]))?; + commands::verify(&mut input, &mut output, tpks)?; + }, ("enarmor", Some(m)) => { let mut input = open_or_stdin(m.value_of("input"))?; |