MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse

Method parse

crates/stdlib/src/ssl.rs:5089–5094  ·  view source on GitHub ↗

Parse the certificate lazily

(&self)

Source from the content-addressed store, hash-verified

5087 impl PySSLCertificate {
5088 // Parse the certificate lazily
5089 fn parse(&self) -> Result<x509_parser::certificate::X509Certificate<'_>, String> {
5090 match x509_parser::parse_x509_certificate(&self.der_bytes) {
5091 Ok((_, cert)) => Ok(cert),
5092 Err(e) => Err(format!("Failed to parse certificate: {e}")),
5093 }
5094 }
5095 }
5096
5097 #[pyclass(with(Comparable, Hashable, Representable))]

Callers 3

compileMethod · 0.45
get_infoMethod · 0.45
repr_strMethod · 0.45

Calls 1

ErrClass · 0.50

Tested by 1

compileMethod · 0.36