mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
refine tls::ota.into() TrustAnchor
This commit is contained in:
parent
e608e7bb30
commit
2cc0052d7d
1 changed files with 3 additions and 7 deletions
|
|
@ -108,13 +108,9 @@ impl<'a> From<&X509Certificate<'a>> for OwnedTrustAnchor {
|
|||
impl<'a> Into<TrustAnchor<'a>> for OwnedTrustAnchor {
|
||||
fn into(self) -> TrustAnchor<'a> {
|
||||
TrustAnchor {
|
||||
subject: Der::from_slice(self.subject.as_slice()),
|
||||
subject_public_key_info: Der::from_slice(self.spki.as_slice()),
|
||||
name_constraints: if self.name_constraints.is_some() {
|
||||
Some(Der::from_slice(self.name_constraints.as_deref().unwrap()))
|
||||
} else {
|
||||
None
|
||||
},
|
||||
subject: Der::from(self.subject),
|
||||
subject_public_key_info: Der::from(self.spki),
|
||||
name_constraints: self.name_constraints.map_or(None, |nc| Some(Der::from(nc))),
|
||||
}
|
||||
.to_owned()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue