x509_cert/ext/pkix/name/dp.rs
1use super::GeneralNames;
2use crate::name::RelativeDistinguishedName;
3
4use der::{Choice, ValueOrd};
5
6/// DistributionPointName as defined in [RFC 5280 Section 4.2.1.13].
7///
8/// ```text
9/// DistributionPointName ::= CHOICE {
10/// fullName [0] GeneralNames,
11/// nameRelativeToCRLIssuer [1] RelativeDistinguishedName
12/// }
13/// ```
14///
15/// [RFC 5280 Section 4.2.1.13]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.13
16#[derive(Clone, Debug, Eq, PartialEq, Choice, ValueOrd)]
17#[allow(missing_docs)]
18pub enum DistributionPointName {
19 #[asn1(context_specific = "0", tag_mode = "IMPLICIT", constructed = "true")]
20 FullName(GeneralNames),
21
22 #[asn1(context_specific = "1", tag_mode = "IMPLICIT", constructed = "true")]
23 NameRelativeToCRLIssuer(RelativeDistinguishedName),
24}