(cert_pem: &str)
| 243 | } |
| 244 | |
| 245 | pub 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 | |
| 251 | pub fn list_certs(workdir: impl AsRef<Path>) -> Result<Vec<PathBuf>> { |
| 252 | let mut certs = vec![]; |
no test coverage detected