diff options
Diffstat (limited to 'openpgp/src/packet/signature.rs')
-rw-r--r-- | openpgp/src/packet/signature.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/packet/signature.rs b/openpgp/src/packet/signature.rs index 4862f6a3..39d8ce96 100644 --- a/openpgp/src/packet/signature.rs +++ b/openpgp/src/packet/signature.rs @@ -2454,6 +2454,11 @@ impl crate::packet::Signature { return Ok(()); } + if self.version() == 3 { + return Err(Error::InvalidOperation( + "cannot add information to v3 signature".into()).into()); + } + /// Makes an authenticated subpacket. fn authenticated_subpacket(v: SubpacketValue) -> Result<Subpacket> { let mut p = Subpacket::new(v, false)?; |