MCPcopy Create free account
hub / github.com/ElementsProject/lightning / do_certificates_exist

Function do_certificates_exist

plugins/rest-plugin/src/certs.rs:101–115  ·  view source on GitHub ↗
(cert_dir: &Path)

Source from the content-addressed store, hash-verified

99}
100
101pub fn do_certificates_exist(cert_dir: &Path) -> bool {
102 let required_files = [
103 "server.pem",
104 "server-key.pem",
105 "client.pem",
106 "client-key.pem",
107 "ca.pem",
108 "ca-key.pem",
109 ];
110
111 required_files.iter().all(|file| {
112 let path = cert_dir.join(file);
113 path.exists() && path.metadata().map(|m| m.len() > 0).unwrap_or(false)
114 })
115}

Callers 1

run_rest_serverFunction · 0.70

Calls 2

joinMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected