summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert/revoke.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-03 12:50:10 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-03 12:50:10 +0100
commit20ae3ec8a5ae7d594643f3949693d64a24791f2c (patch)
tree2874fd480aead1ec31cd9892c48537fd84fac7b4 /openpgp/src/cert/revoke.rs
parentc0c2c235d0d90c7a56b763b08fa8c909aa389c82 (diff)
openpgp: Remove all calls to Time::canonicalize.
- Now that we store timestamps in OpenPGP's native encoding, the canonicalization happens when converting to it.
Diffstat (limited to 'openpgp/src/cert/revoke.rs')
-rw-r--r--openpgp/src/cert/revoke.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/openpgp/src/cert/revoke.rs b/openpgp/src/cert/revoke.rs
index ba3b6c6e..651c4567 100644
--- a/openpgp/src/cert/revoke.rs
+++ b/openpgp/src/cert/revoke.rs
@@ -2,7 +2,6 @@ use std::ops::Deref;
use std::time;
use crate::{
- conversions::Time,
HashAlgorithm,
Result,
SignatureType,
@@ -113,7 +112,7 @@ impl CertRevocationBuilder {
let creation_time
= self.signature_creation_time()
- .unwrap_or_else(|| time::SystemTime::now().canonicalize());
+ .unwrap_or_else(|| time::SystemTime::now());
self.builder
// If not set, set it to now.
@@ -232,7 +231,7 @@ impl SubkeyRevocationBuilder {
let hash_algo = hash_algo.into().unwrap_or(HashAlgorithm::SHA512);
let creation_time
= self.signature_creation_time()
- .unwrap_or_else(|| time::SystemTime::now().canonicalize());
+ .unwrap_or_else(|| time::SystemTime::now());
if let Some(algo) = hash_algo.into() {
self.builder = self.builder.set_hash_algo(algo);
@@ -348,7 +347,7 @@ impl UserIDRevocationBuilder {
let hash_algo = hash_algo.into().unwrap_or(HashAlgorithm::SHA512);
let creation_time
= self.signature_creation_time()
- .unwrap_or_else(|| time::SystemTime::now().canonicalize());
+ .unwrap_or_else(|| time::SystemTime::now());
if let Some(algo) = hash_algo.into() {
self.builder = self.builder.set_hash_algo(algo);
@@ -467,7 +466,7 @@ impl UserAttributeRevocationBuilder {
let hash_algo = hash_algo.into().unwrap_or(HashAlgorithm::SHA512);
let creation_time
= self.signature_creation_time()
- .unwrap_or_else(|| time::SystemTime::now().canonicalize());
+ .unwrap_or_else(|| time::SystemTime::now());
if let Some(algo) = hash_algo.into() {
self.builder = self.builder.set_hash_algo(algo);