Enum sequoia_openpgp::packet::signature::subpacket::SubpacketValue
source · [−]#[non_exhaustive]
pub enum SubpacketValue {
Show 28 variants
Unknown {
tag: SubpacketTag,
body: Vec<u8>,
},
SignatureCreationTime(Timestamp),
SignatureExpirationTime(Duration),
ExportableCertification(bool),
TrustSignature {
level: u8,
trust: u8,
},
RegularExpression(Vec<u8>),
Revocable(bool),
KeyExpirationTime(Duration),
PreferredSymmetricAlgorithms(Vec<SymmetricAlgorithm>),
RevocationKey(RevocationKey),
Issuer(KeyID),
NotationData(NotationData),
PreferredHashAlgorithms(Vec<HashAlgorithm>),
PreferredCompressionAlgorithms(Vec<CompressionAlgorithm>),
KeyServerPreferences(KeyServerPreferences),
PreferredKeyServer(Vec<u8>),
PrimaryUserID(bool),
PolicyURI(Vec<u8>),
KeyFlags(KeyFlags),
SignersUserID(Vec<u8>),
ReasonForRevocation {
code: ReasonForRevocation,
reason: Vec<u8>,
},
Features(Features),
SignatureTarget {
pk_algo: PublicKeyAlgorithm,
hash_algo: HashAlgorithm,
digest: Vec<u8>,
},
EmbeddedSignature(Signature),
IssuerFingerprint(Fingerprint),
PreferredAEADAlgorithms(Vec<AEADAlgorithm>),
IntendedRecipient(Fingerprint),
AttestedCertifications(Vec<Box<[u8]>>),
}
Expand description
Holds an arbitrary, well-structured subpacket.
The SubpacketValue
enum holds a Subpacket
’s value. The
values are well structured in the sense that they have been parsed
into Sequoia’s native data types rather than just holding the raw
byte vector. For instance, the Issuer
variant holds a
KeyID
.
Note: This enum cannot be exhaustively matched to allow future extensions.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Unknown
Fields
tag: SubpacketTag
The unknown subpacket’s tag.
An unknown subpacket.
SignatureCreationTime(Timestamp)
The time the signature was made.
See Section 5.2.3.4 of RFC 4880 for details.
SignatureExpirationTime(Duration)
The validity period of the signature.
The validity is relative to the time stored in the signature’s Signature Creation Time subpacket.
See Section 5.2.3.10 of RFC 4880 for details.
ExportableCertification(bool)
Whether a signature should be published.
See Section 5.2.3.11 of RFC 4880 for details.
TrustSignature
Fields
level: u8
Trust level, or depth.
Level 0 has the same meaning as an ordinary validity signature. Level 1 means that the signed key is asserted to be a valid trusted introducer, with the 2nd octet of the body specifying the degree of trust. Level 2 means that the signed key is asserted to be trusted to issue level 1 trust signatures, i.e., that it is a “meta introducer”.
trust: u8
Trust amount.
This is interpreted such that values less than 120 indicate partial trust and values of 120 or greater indicate complete trust. Implementations SHOULD emit values of 60 for partial trust and 120 for complete trust.
Signer asserts that the key is not only valid but also trustworthy at the specified level.
See Section 5.2.3.13 of RFC 4880 for details.
RegularExpression(Vec<u8>)
Used in conjunction with Trust Signature packets (of level > 0) to limit the scope of trust that is extended.
See Section 5.2.3.14 of RFC 4880 for details.
Note: The RFC requires that the serialized form includes a trailing NUL byte. When Sequoia parses the regular expression subpacket, it strips the trailing NUL. (If it doesn’t include a NUL, then parsing fails.) Likewise, when it serializes a regular expression subpacket, it unconditionally adds a NUL.
Revocable(bool)
Whether a signature can later be revoked.
See Section 5.2.3.12 of RFC 4880 for details.
KeyExpirationTime(Duration)
The validity period of the key.
The validity period is relative to the key’s (not the signature’s) creation time.
See Section 5.2.3.6 of RFC 4880 for details.
PreferredSymmetricAlgorithms(Vec<SymmetricAlgorithm>)
The Symmetric algorithms that the certificate holder prefers.
See Section 5.2.3.7 of RFC 4880 for details.
RevocationKey(RevocationKey)
Authorizes the specified key to issue revocation signatures for this certificate.
See Section 5.2.3.15 of RFC 4880 for details.
Issuer(KeyID)
The OpenPGP Key ID of the key issuing the signature.
See Section 5.2.3.5 of RFC 4880 for details.
NotationData(NotationData)
A “notation” on the signature.
See Section 5.2.3.16 of RFC 4880 for details.
PreferredHashAlgorithms(Vec<HashAlgorithm>)
The Hash algorithms that the certificate holder prefers.
See Section 5.2.3.8 of RFC 4880 for details.
PreferredCompressionAlgorithms(Vec<CompressionAlgorithm>)
The compression algorithms that the certificate holder prefers.
See Section 5.2.3.9 of RFC 4880 for details.
KeyServerPreferences(KeyServerPreferences)
A list of flags that indicate preferences that the certificate holder has about how the key is handled by a key server.
See Section 5.2.3.17 of RFC 4880 for details.
PreferredKeyServer(Vec<u8>)
The URI of a key server where the certificate holder keeps their certificate up to date.
See Section 5.2.3.18 of RFC 4880 for details.
PrimaryUserID(bool)
A flag in a User ID’s self-signature that states whether this User ID is the primary User ID for this certificate.
See Section 5.2.3.19 of RFC 4880 for details.
PolicyURI(Vec<u8>)
The URI of a document that describes the policy under which the signature was issued.
See Section 5.2.3.20 of RFC 4880 for details.
KeyFlags(KeyFlags)
A list of flags that hold information about a key.
See Section 5.2.3.21 of RFC 4880 for details.
SignersUserID(Vec<u8>)
The User ID that is responsible for the signature.
See Section 5.2.3.22 of RFC 4880 for details.
ReasonForRevocation
Fields
code: ReasonForRevocation
Machine-readable reason for revocation.
The reason for a revocation, used in key revocations and certification revocation signatures.
See Section 5.2.3.23 of RFC 4880 for details.
Features(Features)
The OpenPGP features a user’s implementation supports.
See Section 5.2.3.24 of RFC 4880 for details.
SignatureTarget
Fields
pk_algo: PublicKeyAlgorithm
Public-key algorithm of the target signature.
hash_algo: HashAlgorithm
Hash algorithm of the target signature.
A signature to which this signature refers.
See Section 5.2.3.25 of RFC 4880 for details.
EmbeddedSignature(Signature)
A complete Signature packet body.
This is used to store a backsig in a subkey binding signature.
See Section 5.2.3.26 of RFC 4880 for details.
IssuerFingerprint(Fingerprint)
The Fingerprint of the key that issued the signature (proposed).
See Section 5.2.3.28 of RFC 4880bis for details.
PreferredAEADAlgorithms(Vec<AEADAlgorithm>)
The AEAD algorithms that the certificate holder prefers (proposed).
See Section 5.2.3.8 of RFC 4880bis for details.
IntendedRecipient(Fingerprint)
Who the signed message was intended for (proposed).
See Section 5.2.3.29 of RFC 4880bis for details.
AttestedCertifications(Vec<Box<[u8]>>)
The Attested Certifications subpacket (proposed).
Allows the certificate holder to attest to third party certifications, allowing them to be distributed with the certificate. This can be used to address certificate flooding concerns.
See Section 5.2.3.30 of RFC 4880bis for details.
Implementations
sourceimpl SubpacketValue
impl SubpacketValue
sourcepub fn tag(&self) -> SubpacketTag
pub fn tag(&self) -> SubpacketTag
Returns the subpacket tag for this value.
Trait Implementations
sourceimpl Clone for SubpacketValue
impl Clone for SubpacketValue
sourcefn clone(&self) -> SubpacketValue
fn clone(&self) -> SubpacketValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubpacketValue
impl Debug for SubpacketValue
sourceimpl Hash for SubpacketValue
impl Hash for SubpacketValue
sourceimpl Marshal for SubpacketValue
impl Marshal for SubpacketValue
sourceimpl MarshalInto for SubpacketValue
impl MarshalInto for SubpacketValue
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
sourcefn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
sourceimpl Ord for SubpacketValue
impl Ord for SubpacketValue
sourceimpl PartialEq<SubpacketValue> for SubpacketValue
impl PartialEq<SubpacketValue> for SubpacketValue
sourcefn eq(&self, other: &SubpacketValue) -> bool
fn eq(&self, other: &SubpacketValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SubpacketValue) -> bool
fn ne(&self, other: &SubpacketValue) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SubpacketValue> for SubpacketValue
impl PartialOrd<SubpacketValue> for SubpacketValue
sourcefn partial_cmp(&self, other: &SubpacketValue) -> Option<Ordering>
fn partial_cmp(&self, other: &SubpacketValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for SubpacketValue
impl StructuralEq for SubpacketValue
impl StructuralPartialEq for SubpacketValue
Auto Trait Implementations
impl RefUnwindSafe for SubpacketValue
impl Send for SubpacketValue
impl Sync for SubpacketValue
impl Unpin for SubpacketValue
impl UnwindSafe for SubpacketValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more