use der::{Sequence, asn1::SetOfVec};
use x509_cert::attr::Attribute;
use crate::{
authenticated_data::MessageAuthenticationCode,
content_info::CmsVersion,
enveloped_data::{EncryptedContentInfo, OriginatorInfo, RecipientInfos},
};
#[derive(Clone, Debug, Sequence)]
#[allow(missing_docs)]
pub struct AuthEnvelopedData {
pub version: CmsVersion,
#[asn1(
context_specific = "0",
tag_mode = "IMPLICIT",
constructed = "true",
optional = "true"
)]
pub originator_info: Option<OriginatorInfo>,
pub recip_infos: RecipientInfos,
pub auth_encrypted_content_info: EncryptedContentInfo,
#[asn1(
context_specific = "1",
tag_mode = "IMPLICIT",
constructed = "true",
optional = "true"
)]
pub auth_attrs: Option<AuthAttributes>,
pub mac: MessageAuthenticationCode,
#[asn1(
context_specific = "2",
tag_mode = "IMPLICIT",
constructed = "true",
optional = "true"
)]
pub unauth_attrs: Option<UnauthAttributes>,
}
pub type AuthAttributes = SetOfVec<Attribute>;
pub type UnauthAttributes = SetOfVec<Attribute>;