|
/// Todo: Return a result instead of panicking XD |
|
pub fn build(self) -> Acceptor { |
|
// rustls 0.23+ requires an explicit CryptoProvider. |
|
pingora_rustls::install_default_crypto_provider(); |
|
|
|
let Ok(Some((certs, key))) = load_certs_and_key_files(&self.cert_path, &self.key_path) |
|
else { |
|
panic!( |
|
"Failed to load provided certificates \"{}\" or key \"{}\".", |
|
self.cert_path, self.key_path |
|
) |
|
}; |
Wrapping this in a Result might solve this? PR incoming soon.
pingora/pingora-core/src/listeners/tls/rustls/mod.rs
Lines 49 to 60 in e6e677f
Wrapping this in a Result might solve this? PR incoming soon.