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

Function cert_to_certificate

crates/stdlib/src/openssl/cert.rs:345–347  ·  view source on GitHub ↗

Helper to create Certificate object from X509

(vm: &VirtualMachine, cert: X509)

Source from the content-addressed store, hash-verified

343
344 // Helper to create Certificate object from X509
345 pub(crate) fn cert_to_certificate(vm: &VirtualMachine, cert: X509) -> PyResult {
346 Ok(PySSLCertificate { cert }.into_ref(&vm.ctx).into())
347 }
348
349 // For getpeercert() - returns bytes or dict depending on binary flag
350 pub(crate) fn cert_to_py(vm: &VirtualMachine, cert: &X509Ref, binary: bool) -> PyResult {

Callers 2

get_unverified_chainMethod · 0.85
get_verified_chainMethod · 0.85

Calls 1

into_refMethod · 0.45

Tested by

no test coverage detected