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

Function read_pubkey

certbot/src/bot.rs:245–249  ·  view source on GitHub ↗
(cert_pem: &str)

Source from the content-addressed store, hash-verified

243}
244
245pub fn read_pubkey(cert_pem: &str) -> Result<Vec<u8>> {
246 let cert = read_pem(cert_pem)?;
247 let public_key = cert.parse_x509().context("failed to parse x509 cert")?;
248 Ok(public_key.tbs_certificate.public_key().raw.to_vec())
249}
250
251pub fn list_certs(workdir: impl AsRef<Path>) -> Result<Vec<PathBuf>> {
252 let mut certs = vec![];

Callers 1

list_cert_public_keysFunction · 0.85

Calls 2

read_pemFunction · 0.85
to_vecMethod · 0.80

Tested by

no test coverage detected