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

Function do_certificates_exist

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

Source from the content-addressed store, hash-verified

87}
88
89pub fn do_certificates_exist(cert_dir: &Path) -> bool {
90 let required_files = [
91 "server.pem",
92 "server-key.pem",
93 "client.pem",
94 "client-key.pem",
95 "ca.pem",
96 "ca-key.pem",
97 ];
98
99 required_files.iter().all(|file| {
100 let path = cert_dir.join(file);
101 path.exists() && path.metadata().map(|m| m.len() > 0).unwrap_or(false)
102 })
103}

Callers 1

run_rest_serverFunction · 0.70

Calls 2

joinMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected