mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +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 {
|
impl<'a> Into<TrustAnchor<'a>> for OwnedTrustAnchor {
|
||||||
fn into(self) -> TrustAnchor<'a> {
|
fn into(self) -> TrustAnchor<'a> {
|
||||||
TrustAnchor {
|
TrustAnchor {
|
||||||
subject: Der::from_slice(self.subject.as_slice()),
|
subject: Der::from(self.subject),
|
||||||
subject_public_key_info: Der::from_slice(self.spki.as_slice()),
|
subject_public_key_info: Der::from(self.spki),
|
||||||
name_constraints: if self.name_constraints.is_some() {
|
name_constraints: self.name_constraints.map_or(None, |nc| Some(Der::from(nc))),
|
||||||
Some(Der::from_slice(self.name_constraints.as_deref().unwrap()))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
.to_owned()
|
.to_owned()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue