mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
implement tls RustlsOwnedTrustAnchor to rustls::OwnedTrustAnchor
This commit is contained in:
parent
80ff0cb52a
commit
65f92453a2
1 changed files with 9 additions and 0 deletions
|
|
@ -23,6 +23,15 @@ pub struct RustlsOwnedTrustAnchor {
|
|||
name_constraints: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl RustlsOwnedTrustAnchor {
|
||||
pub fn to_owned_trust_anchor(self) -> rustls::OwnedTrustAnchor {
|
||||
rustls::OwnedTrustAnchor::from_subject_spki_name_constraints(
|
||||
self.subject,
|
||||
self.spki,
|
||||
self.name_constraints,
|
||||
)
|
||||
}
|
||||
}
|
||||
impl<'a> From<&X509Certificate<'a>> for RustlsOwnedTrustAnchor {
|
||||
fn from(x509: &X509Certificate) -> Self {
|
||||
RustlsOwnedTrustAnchor {
|
||||
|
|
|
|||
Loading…
Reference in a new issue