Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit e4ab51f

Browse files
committed
feat: convert localname from attributetypeandvalue
1 parent ff05ce8 commit e4ab51f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/types/pdn.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use x509_cert::attr::AttributeTypeAndValue;
44
use x509_cert::name::{Name, RelativeDistinguishedName};
55

66
use crate::certs::SessionId;
7+
use crate::types::local_name::LocalName;
78
use crate::types::{DomainName, FederationId};
89
use crate::{
910
Constrained, OID_RDN_COMMON_NAME, OID_RDN_DOMAIN_COMPONENT, OID_RDN_UID,
@@ -102,6 +103,14 @@ impl TryFrom<Name> for ActorDN {
102103
)));
103104
}
104105
})?;
106+
let local_name = LocalName::try_from(match maybe_local_name {
107+
Some(ln) => ln,
108+
None => {
109+
return Err(crate::errors::InvalidInput::Malformed(String::from(
110+
"Expected Local Name in ActorDN, found none",
111+
)));
112+
}
113+
})?;
105114
todo!()
106115
}
107116
}

0 commit comments

Comments
 (0)