diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-03 10:37:02 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-03 10:47:56 +0100 |
commit | 693a76e66376598bddf38d0c3810d5e4800b2efe (patch) | |
tree | ae1e24ce01ee6922a6f0cf27d677614967f3d28e /tool/src | |
parent | 0266273998d5ebf74e07291225fc6b50d33bdbc9 (diff) |
openpgp: Use Timestamp in SignatureCreationTime.
Diffstat (limited to 'tool/src')
-rw-r--r-- | tool/src/commands/dump.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs index 9ae129b1..54aa407b 100644 --- a/tool/src/commands/dump.rs +++ b/tool/src/commands/dump.rs @@ -1,7 +1,7 @@ use std::io::{self, Read}; extern crate sequoia_openpgp as openpgp; -use self::openpgp::types::SymmetricAlgorithm; +use self::openpgp::types::{Timestamp, SymmetricAlgorithm}; use self::openpgp::conversions::hex; use self::openpgp::crypto::mpis; use self::openpgp::{Packet, Result}; @@ -40,6 +40,12 @@ impl Convert<chrono::DateTime<chrono::offset::Utc>> for std::time::SystemTime { } } +impl Convert<chrono::DateTime<chrono::offset::Utc>> for Timestamp { + fn convert(self) -> chrono::DateTime<chrono::offset::Utc> { + std::time::SystemTime::from(self).convert() + } +} + pub fn dump<W>(input: &mut dyn io::Read, output: &mut dyn io::Write, mpis: bool, hex: bool, sk: Option<&SessionKey>, width: W) |