diff --git a/idevice/src/lib.rs b/idevice/src/lib.rs index 26704fd..c529207 100644 --- a/idevice/src/lib.rs +++ b/idevice/src/lib.rs @@ -327,7 +327,14 @@ impl Idevice { pairing_file: &pairing_file::PairingFile, ) -> Result<(), IdeviceError> { if CryptoProvider::get_default().is_none() { - CryptoProvider::install_default(rustls::crypto::aws_lc_rs::default_provider()).unwrap(); + if let Err(e) = + CryptoProvider::install_default(rustls::crypto::aws_lc_rs::default_provider()) + { + // For whatever reason, getting the default provider will return None on iOS at + // random. Installing the default provider a second time will return an error, so + // we will log it but not propogate it. An issue should be opened with rustls. + log::error!("Failed to set crypto provider: {e:?}"); + } } let config = sni::create_client_config(pairing_file)?; let connector = tokio_rustls::TlsConnector::from(Arc::new(config));