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

Function do_certificates_exist

plugins/wss-proxy-plugin/src/certs.rs:122–136  ·  view source on GitHub ↗
(cert_dir: &Path)

Source from the content-addressed store, hash-verified

120}
121
122pub fn do_certificates_exist(cert_dir: &Path) -> bool {
123 let required_files = [
124 "server.pem",
125 "server-key.pem",
126 "client.pem",
127 "client-key.pem",
128 "ca.pem",
129 "ca-key.pem",
130 ];
131
132 required_files.iter().all(|file| {
133 let path = cert_dir.join(file);
134 path.exists() && path.metadata().map(|m| m.len() > 0).unwrap_or(false)
135 })
136}
137
138pub async fn get_tls_config(wss_proxy_options: &WssproxyOptions) -> Result<ServerConfig, Error> {
139 let max_retries = 20;

Callers 1

get_tls_configFunction · 0.70

Calls 2

joinMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected