fn load_certs(file: PathBuf) -> io::Result<Vec<rustls::Certificate>> {
    // Open certificate file.
    let certfile = get_tls_file(file)?;
    let mut reader = io::BufReader::new(certfile);

    // Load and return certificate.
    pemfile::certs(&mut reader).map_err(|_| io_error("failed to load certificate".into()))
}
// Load public certificate from file.
Load public certificate from file.
Load public certificate from file .
fn load_certs(file: PathBuf) -> io::Result<Vec<rustls::Certificate>> {
    // Open certificate file.
    let certfile = get_tls_file(file)?;
    let mut reader = io::BufReader::new(certfile);
    // Load and return certificate.
    pemfile::certs(&mut reader).map_err(|_| io_error("failed to load certificate".into()))
}
fn load_certs ( file : PathBuf ) -> io :: Result < Vec < rustls :: Certificate > > { // Open certificate file. let certfile = get_tls_file ( file ) ? ; let mut reader = io :: BufReader :: new ( certfile ) ; // Load and return certificate. pemfile :: certs ( & mut reader ) . map_err ( | _ | io_error ( " " . into ( ) ) ) }
Load public certificate from file.
Load public certificate from file .
file
PathBuf
file
PathBuf