fn configure_client(server_certs: &[&[u8]]) -> Result<ClientConfig, Box<dyn Error>> {
    let mut cfg_builder = ClientConfigBuilder::default();
    for cert in server_certs {
        cfg_builder.add_certificate_authority(Certificate::from_der(&cert)?)?;
    }
    Ok(cfg_builder.build())
}
/// Builds default quinn client config and trusts given certificates.
///
/// ## Args
///
/// - server_certs: a list of trusted certificates in DER format.
Builds default quinn client config and trusts given certificates.
Builds default quinn client config and trusts given certificates .
fn configure_client(server_certs: &[&[u8]]) -> Result<ClientConfig, Box<dyn Error>> {
    let mut cfg_builder = ClientConfigBuilder::default();
    for cert in server_certs {
        cfg_builder.add_certificate_authority(Certificate::from_der(&cert)?)?;
    }
    Ok(cfg_builder.build())
}
fn configure_client ( server_certs : & [ & [ u8 ] ] ) -> Result < ClientConfig , Box < dyn Error > > { let mut cfg_builder = ClientConfigBuilder :: default ( ) ; for cert in server_certs { cfg_builder . add_certificate_authority ( Certificate :: from_der ( & cert ) ? ) ? ; } Ok ( cfg_builder . build ( ) ) }
Builds default quinn client config and trusts given certificates.
Builds default quinn client config and trusts given certificates .
server_certs
&[&[u8]]
args
a list of trusted certificates in DER format.
a list of trusted certificates in DER format .