MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / from_der

Function from_der

ra-tls/src/attestation.rs:13–17  ·  view source on GitHub ↗

Extract attestation from x509 certificate

(cert: &[u8])

Source from the content-addressed store, hash-verified

11
12/// Extract attestation from x509 certificate
13pub fn from_der(cert: &[u8]) -> Result<Option<VersionedAttestation>> {
14 let (_, cert) =
15 x509_parser::parse_x509_certificate(cert).context("Failed to parse certificate")?;
16 from_cert(&cert)
17}
18
19/// Extract attestation from a certificate
20pub fn from_cert(cert: &impl CertExt) -> Result<Option<VersionedAttestation>> {

Callers 4

decode_keyMethod · 0.85
sign_csrMethod · 0.85
verifyMethod · 0.85
handle_prpc_implFunction · 0.85

Calls 1

from_certFunction · 0.85

Tested by

no test coverage detected