(workdir: impl AsRef<Path>)
| 263 | } |
| 264 | |
| 265 | pub 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)] |
| 276 | mod tests; |
no test coverage detected