summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/signature
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-04-21 15:25:40 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-04-26 13:14:42 +0200
commit1d06cec55ad133584c13d11f78297c7582e9acda (patch)
tree95faccd45bb813416268fa1f8f1e7166ab37ae28 /openpgp/src/packet/signature
parent710f2c60a9a00a5a4c3199f25d387fe82aa21aa0 (diff)
openpgp: New constant SubpacketAreas::MAX_SIZE.
Diffstat (limited to 'openpgp/src/packet/signature')
-rw-r--r--openpgp/src/packet/signature/subpacket.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs
index 2f9570ef..23dc1546 100644
--- a/openpgp/src/packet/signature/subpacket.rs
+++ b/openpgp/src/packet/signature/subpacket.rs
@@ -591,6 +591,9 @@ impl<'a> IntoIterator for &'a SubpacketArea {
}
impl SubpacketArea {
+ /// The maximum size of a subpacket area.
+ pub const MAX_SIZE: usize = (1 << 16) - 1;
+
/// Returns a new subpacket area containing the given `packets`.
pub fn new(packets: Vec<Subpacket>) -> Result<SubpacketArea> {
let area = SubpacketArea {