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

Function _test_decode_cert

crates/stdlib/src/openssl/cert.rs:360–365  ·  view source on GitHub ↗
(path: FsPath, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

358
359 #[pyfunction]
360 pub(crate) fn _test_decode_cert(path: FsPath, vm: &VirtualMachine) -> PyResult {
361 let path = path.to_path_buf(vm)?;
362 let pem = std::fs::read(path).map_err(|e| e.to_pyexception(vm))?;
363 let x509 = X509::from_pem(&pem).map_err(|e| convert_openssl_error(vm, e))?;
364 cert_to_py(vm, &x509, false)
365 }
366}

Callers

nothing calls this directly

Calls 5

convert_openssl_errorFunction · 0.85
cert_to_pyFunction · 0.85
to_path_bufMethod · 0.80
readFunction · 0.50
to_pyexceptionMethod · 0.45

Tested by

no test coverage detected