diff --git a/src/main.rs b/src/main.rs index ff656a9..88376df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -535,24 +535,8 @@ async fn run_client(mut args: std::env::Args) -> Result<()> { let conn_str = args.next().expect("USERNAME@HOST"); let (username, host) = conn_str.split_once('@').expect("USERNAME@HOST"); - let mut roots = rustls::RootCertStore::empty(); - match std::fs::read("cert.der") { - Ok(cert) => { - roots.add(&rustls::Certificate(cert))?; - } - Err(ref e) if e.kind() == std::io::ErrorKind::NotFound => { - info!("local server certificate not found"); - } - Err(e) => { - error!("failed to open local server certificate: {}", e); - } - } - - info!("read roots"); - let mut client_crypto = rustls::ClientConfig::builder() .with_safe_defaults() - //.with_root_certificates(roots) .with_custom_certificate_verifier(Arc::new(InformedServerCertVerifier { cfg }) as _) .with_no_client_auth();