use super::name::GeneralName;
use alloc::vec::Vec;
use const_oid::{
db::rfc5280::{ID_PE_AUTHORITY_INFO_ACCESS, ID_PE_SUBJECT_INFO_ACCESS},
AssociatedOid,
};
use der::{asn1::ObjectIdentifier, Sequence, ValueOrd};
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct AuthorityInfoAccessSyntax(pub Vec<AccessDescription>);
impl AssociatedOid for AuthorityInfoAccessSyntax {
const OID: ObjectIdentifier = ID_PE_AUTHORITY_INFO_ACCESS;
}
impl_newtype!(AuthorityInfoAccessSyntax, Vec<AccessDescription>);
impl_extension!(AuthorityInfoAccessSyntax, critical = false);
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct SubjectInfoAccessSyntax(pub Vec<AccessDescription>);
impl AssociatedOid for SubjectInfoAccessSyntax {
const OID: ObjectIdentifier = ID_PE_SUBJECT_INFO_ACCESS;
}
impl_newtype!(SubjectInfoAccessSyntax, Vec<AccessDescription>);
impl_extension!(SubjectInfoAccessSyntax, critical = false);
#[derive(Clone, Debug, Eq, PartialEq, Sequence, ValueOrd)]
#[allow(missing_docs)]
pub struct AccessDescription {
pub access_method: ObjectIdentifier,
pub access_location: GeneralName,
}