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

Function list_cert_public_keys

certbot/src/bot.rs:265–273  ·  view source on GitHub ↗
(workdir: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

263}
264
265pub fn list_cert_public_keys(workdir: impl AsRef<Path>) -> Result<BTreeSet<Vec<u8>>> {
266 list_certs(workdir)?
267 .into_iter()
268 .map(|cert_path| {
269 let cert_pem = fs::read_to_string(&cert_path).context("failed to read cert")?;
270 read_pubkey(&cert_pem).context("failed to parse cert")
271 })
272 .collect::<Result<_>>()
273}
274
275#[cfg(test)]
276mod tests;

Callers 2

list_cert_public_keysMethod · 0.85
list_cert_public_keysMethod · 0.85

Calls 3

list_certsFunction · 0.85
read_pubkeyFunction · 0.85
into_iterMethod · 0.80

Tested by

no test coverage detected