diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-09-27 11:32:26 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-09-27 11:32:26 +0200 |
commit | 80964e359cab4f8af96f7e3246a27bb95d27b424 (patch) | |
tree | e705e071aa8480f85a60a6415cf739299b5dd6fa /openpgp/src | |
parent | 181758cd99d245c598a7c7f91729c428fb1b9060 (diff) |
openpgp: Only mark creation time as overwritten once it really is.
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index bf683bfa..d6b47ea2 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -4254,13 +4254,12 @@ impl signature::SignatureBuilder { -> Result<Self> where T: Into<time::SystemTime> { - self.overrode_creation_time = true; - self.hashed_area.replace(Subpacket::new( SubpacketValue::SignatureCreationTime( creation_time.into().try_into()?), true)?)?; + self.overrode_creation_time = true; Ok(self) } @@ -4389,11 +4388,10 @@ impl signature::SignatureBuilder { pub fn suppress_signature_creation_time(mut self) -> Result<Self> { - self.overrode_creation_time = true; - self.hashed_area.remove_all(SubpacketTag::SignatureCreationTime); self.unhashed_area.remove_all(SubpacketTag::SignatureCreationTime); + self.overrode_creation_time = true; Ok(self) } |