diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-18 15:09:29 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-18 16:21:46 +0100 |
commit | ae3294704ef83aeafd335851810d1c51f2b5fbcb (patch) | |
tree | 2ddc4fa92e8e669ea39b447778cd79c8608b6a35 | |
parent | 7a6701001a9408a8eae6faedc91b5d2c42611c5c (diff) |
openpgp: Make test more robust.
-rw-r--r-- | openpgp/src/cert/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs index 66f9fef4..a4a87c42 100644 --- a/openpgp/src/cert/mod.rs +++ b/openpgp/src/cert/mod.rs @@ -2435,11 +2435,12 @@ mod test { #[test] fn set_expiry() { - let now = time::SystemTime::now(); - let a_sec = time::Duration::new(1, 0); - let (cert, _) = CertBuilder::autocrypt(None, Some("Test")) .generate().unwrap(); + + let now = cert.primary().creation_time(); + let a_sec = time::Duration::new(1, 0); + let expiry_orig = cert.primary_key_signature(None).unwrap() .key_expiration_time() .expect("Keys expire by default."); |