pub struct SignedData {
pub version: u32,
pub digest_algorithms: Vec<AlgorithmIdentifier>,
pub encap_content_info: EncapContentInfo,
pub certificates: Vec<Vec<u8>>,
pub signer_infos: Vec<SignerInfo>,
}Expand description
SignedData structure as defined in RFC 5652 §5.1.
Fields§
§version: u32CMS version (typically 1 for typical SignedData).
digest_algorithms: Vec<AlgorithmIdentifier>Digest algorithms used by signerInfos.
encap_content_info: EncapContentInfoThe encapsulated content (the payload being signed).
certificates: Vec<Vec<u8>>Certificates (X.509) associated with the signers.
signer_infos: Vec<SignerInfo>Signer info entries — one per signer.
Implementations§
Source§impl SignedData
impl SignedData
Sourcepub fn new(content_type: impl Into<String>, content: Option<Vec<u8>>) -> Self
pub fn new(content_type: impl Into<String>, content: Option<Vec<u8>>) -> Self
Construct a new SignedData with the given encapsulated content.
Sourcepub fn add_signer(&mut self, signer_info: SignerInfo)
pub fn add_signer(&mut self, signer_info: SignerInfo)
Add a signer.
Sourcepub fn add_certificate(&mut self, cert_der: Vec<u8>)
pub fn add_certificate(&mut self, cert_der: Vec<u8>)
Add a certificate (DER bytes).
Sourcepub fn signer_count(&self) -> usize
pub fn signer_count(&self) -> usize
Number of signers.
Sourcepub fn signing_time(&self) -> Option<DateTime<Utc>>
pub fn signing_time(&self) -> Option<DateTime<Utc>>
When was this signed? (uses the first signer’s signing time if available)
Trait Implementations§
Source§impl Clone for SignedData
impl Clone for SignedData
Source§fn clone(&self) -> SignedData
fn clone(&self) -> SignedData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignedData
impl Debug for SignedData
Source§impl<'de> Deserialize<'de> for SignedData
impl<'de> Deserialize<'de> for SignedData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SignedData
impl RefUnwindSafe for SignedData
impl Send for SignedData
impl Sync for SignedData
impl Unpin for SignedData
impl UnsafeUnpin for SignedData
impl UnwindSafe for SignedData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more