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

Function do_certificates_exist

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

Source from the content-addressed store, hash-verified

108}
109
110pub fn do_certificates_exist(cert_dir: &Path) -> bool {
111 let required_files = [
112 "server.pem",
113 "server-key.pem",
114 "client.pem",
115 "client-key.pem",
116 "ca.pem",
117 "ca-key.pem",
118 ];
119
120 required_files.iter().all(|file| {
121 let path = cert_dir.join(file);
122 path.exists() && path.metadata().map(|m| m.len() > 0).unwrap_or(false)
123 })
124}
125
126pub async fn get_tls_config(wss_proxy_options: &WssproxyOptions) -> Result<ServerConfig, Error> {
127 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