diff options
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/parse.rs | 5 | ||||
-rw-r--r-- | openpgp/src/parse/stream.rs | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs index b49f5139..4776ba0a 100644 --- a/openpgp/src/parse/parse.rs +++ b/openpgp/src/parse/parse.rs @@ -36,7 +36,6 @@ use crate::types::{ SymmetricAlgorithm, Timestamp, }; -use crate::conversions::Time; use crate::crypto::{self, mpis::{PublicKey, MPI}}; use crate::crypto::symmetric::{Decryptor, BufferedReaderDecryptor}; use crate::message; @@ -1530,7 +1529,7 @@ impl Key4<key::UnspecifiedParts, key::UnspecifiedRole> -> Result<Key4<key::PublicParts, R>> where R: key::KeyRole { - Key4::new(std::time::SystemTime::from_pgp(creation_time), + Key4::new(Timestamp::from(creation_time), pk_algo, mpis) } fn s<R>(creation_time: u32, @@ -1540,7 +1539,7 @@ impl Key4<key::UnspecifiedParts, key::UnspecifiedRole> -> Result<Key4<key::SecretParts, R>> where R: key::KeyRole { - Key4::with_secret(std::time::SystemTime::from_pgp(creation_time), + Key4::with_secret(Timestamp::from(creation_time), pk_algo, mpis, secret) } diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 7f0e5196..c272078d 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -1887,8 +1887,6 @@ mod test { // This test is relatively long running in debug mode. Split it // up. fn detached_verifier_read_size(l: usize) { - use crate::conversions::Time; - struct Test<'a> { sig: &'a [u8], content: &'a [u8], @@ -1905,7 +1903,8 @@ mod test { sig: crate::tests::message( "emmelie-dorothea-dina-samantha-awina-detached-signature-of-100MB-of-zeros.sig"), content: &vec![ 0; 100 * 1024 * 1024 ][..], - reference: time::SystemTime::from_pgp(1572602018), + reference: + crate::types::Timestamp::try_from(1572602018).unwrap().into(), }, ]; |