[][src]Module sequoia_openpgp::packet::signature::subpacket

Signature subpackets.

OpenPGP signature packets include a set of key-value attributes called subpackets. These subpackets are used to indicate when a signature was created, who created the signature, user & implementation preferences, etc. The full details are in Section 5.2.3.1 of RFC 4880.

The standard assigns each subpacket a numeric id, and describes the format of its value. One subpacket is called Notation Data and is intended as a generic key-value store. The combined size of the subpackets (including notation data) is limited to 64 KB.

Subpackets and notations can be marked as critical. If an OpenPGP implementation processes a packet that includes critical subpackets or notations that it does not understand, it is required to abort processing. This allows for forwards compatible changes by indicating whether it is safe to ignore an unknown subpacket or notation.

A number of methods are defined on Signature for working with subpackets.

Examples

If a signature packet includes an issuer fingerprint subpacket, print it:

let mut ppr = PacketParser::from_bytes(message_data)?;
while let PacketParserResult::Some(mut pp) = ppr {
    if let Packet::Signature(ref sig) = pp.packet {
        if let Some(fp) = sig.issuer_fingerprint() {
            eprintln!("Signature issued by: {}", fp.to_string());
        }
    }

    // Get the next packet.
    ppr  = pp.recurse()?.1;
}

Structs

CLOCK_SKEW_TOLERANCE

The default amount of tolerance to use when comparing some timestamps.

NotationData

Payload of a NotationData subpacket.

NotationDataFlags

Flags for the Notation Data subpacket.

Subpacket

Signature subpacket specified by Section 5.2.3.1 of RFC 4880.

SubpacketArea

Subpacket area.

SubpacketAreas

Subpacket storage.

Enums

SubpacketTag

The subpacket types specified by Section 5.2.3.1 of RFC 4880.

SubpacketValue

Struct holding an arbitrary subpacket.