Delete the overlap-CA file identified by `fp` from `tls_dir/ca.d/`. No-op (and returns `Ok(())`) when the file isn't present — applier behaviour must be idempotent across re-apply and snapshot replay.
(tls_dir: &Path, fp: &[u8; 32])
| 247 | /// No-op (and returns `Ok(())`) when the file isn't present — applier |
| 248 | /// behaviour must be idempotent across re-apply and snapshot replay. |
| 249 | pub fn remove_trusted_ca(tls_dir: &Path, fp: &[u8; 32]) -> crate::Result<()> { |
| 250 | let dir = tls_dir.join(CA_TRUST_DIR); |
| 251 | let path = dir.join(format!("{}.crt", nodedb_cluster::ca_fingerprint_hex(fp))); |
| 252 | match fs::remove_file(&path) { |
| 253 | Ok(()) => Ok(()), |
| 254 | Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), |
| 255 | Err(e) => Err(crate::Error::Config { |
| 256 | detail: format!("remove ca.d entry {}: {e}", path.display()), |
| 257 | }), |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | /// L.4 joiner-side helper: connect to `seed`'s bootstrap listener with |
| 262 | /// `token`, receive `(ca_cert, node_cert, node_key, cluster_secret)`, |
no test coverage detected