pub struct DistinguishedName { /* private fields */ }Expand description
A distinguished name (DN).
DNs are composed of a sequence of key-value pairs called relative distinguished names (RDNs).
Implementations§
Source§impl DistinguishedName
impl DistinguishedName
Sourcepub fn find(&self, ty: RdnType) -> Option<&str>
pub fn find(&self, ty: RdnType) -> Option<&str>
Find the value of the first occurence of the given RDN type.
Sourcepub fn iter(&self) -> impl Iterator<Item = &RelativeDistinguishedName>
pub fn iter(&self) -> impl Iterator<Item = &RelativeDistinguishedName>
Returns an iterator over all RDNs of this DN.
Sourcepub fn organization_id(&self) -> Result<Option<Cow<'_, str>>>
pub fn organization_id(&self) -> Result<Option<Cow<'_, str>>>
Get the organization ID of this certificate. The way organization IDs are specified in OpenFinance certificates is a special kind of mess so we need a specific function for this.
Sourcepub fn comparator(&self) -> Result<DnComparator>
pub fn comparator(&self) -> Result<DnComparator>
Create a comparator for this DN. RFC4518 requires that DNs be transformed before comparison, which is implemented by this comparator.
Sourcepub fn to_of_string(&self) -> String
pub fn to_of_string(&self) -> String
Serialize into the OpenFinance variant string format: https://openfinancebrasil.atlassian.net/wiki/spaces/OF/pages/240649661/EN+Open+Finance+Brasil+Financial-grade+API+Dynamic+Client+Registration+1.0+Implementers+Draft+3#7.1.2.-Certificate-Distinguished-Name-Parsing.
Trait Implementations§
Source§impl Clone for DistinguishedName
impl Clone for DistinguishedName
Source§fn clone(&self) -> DistinguishedName
fn clone(&self) -> DistinguishedName
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DistinguishedName
impl Debug for DistinguishedName
Source§impl FromStr for DistinguishedName
Parse from the canonical string format:
https://datatracker.ietf.org/doc/html/rfc4514.
impl FromStr for DistinguishedName
Parse from the canonical string format: https://datatracker.ietf.org/doc/html/rfc4514.