fn configure_connector(node_cert: &[u8]) -> quinn::ClientConfig {
    let mut peer_cfg_builder = quinn::ClientConfigBuilder::default();
    let their_cert = unwrap!(quinn::Certificate::from_der(&node_cert));
    unwrap!(peer_cfg_builder.add_certificate_authority(their_cert));
    let mut peer_cfg = peer_cfg_builder.build();
    let transport_config = unwrap!(Arc::get_mut(&mut peer_cfg.transport));
    transport_config
        .idle_timeout(Some(Duration::from_secs(20)))
        .unwrap();

    peer_cfg
}
/// Builds client configuration. Trusts given node certificate.
Builds client configuration. Trusts given node certificate.
Builds client configuration . Trusts given node certificate .
fn configure_connector(node_cert: &[u8]) -> quinn::ClientConfig {
    let mut peer_cfg_builder = quinn::ClientConfigBuilder::default();
    let their_cert = unwrap!(quinn::Certificate::from_der(&node_cert));
    unwrap!(peer_cfg_builder.add_certificate_authority(their_cert));
    let mut peer_cfg = peer_cfg_builder.build();
    let transport_config = unwrap!(Arc::get_mut(&mut peer_cfg.transport));
    transport_config
        .idle_timeout(Some(Duration::from_secs(20)))
        .unwrap();
    peer_cfg
}
fn configure_connector ( node_cert : & [ u8 ] ) -> quinn :: ClientConfig { let mut peer_cfg_builder = quinn :: ClientConfigBuilder :: default ( ) ; let their_cert = unwrap ! ( quinn Certificate from_der ( node_cert ) ) ; unwrap ! ( peer_cfg_builder add_certificate_authority ( their_cert ) ) ; let mut peer_cfg = peer_cfg_builder . build ( ) ; let transport_config = unwrap ! ( Arc get_mut ( mut peer_cfg transport ) ) ; transport_config . idle_timeout ( Some ( Duration :: from_secs ( 20 ) ) ) . unwrap ( ) ; peer_cfg }
Builds client configuration.
Builds client configuration .
node_cert
&[u8]
node_cert
&[u8]