Skip to main content

load_certs

Function load_certs 

Source
pub fn load_certs(file_path: &str) -> ServerResult<Vec<CertificateDer<'static>>>
Expand description

Load TLS/SSL certificates (leaf + any intermediates) from a PEM file.

ยงWhy this returns AppResult instead of panicking

In 4.6.x this function used .expect(...) and panicked on any read error. Because TLS paths come from user config, a typo was enough to abort the process with a backtrace. Returning AppResult lets the caller surface a single readable line and exit cleanly.