mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Don't panic on crypto provider installation
This commit is contained in:
@@ -327,7 +327,14 @@ impl Idevice {
|
|||||||
pairing_file: &pairing_file::PairingFile,
|
pairing_file: &pairing_file::PairingFile,
|
||||||
) -> Result<(), IdeviceError> {
|
) -> Result<(), IdeviceError> {
|
||||||
if CryptoProvider::get_default().is_none() {
|
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 config = sni::create_client_config(pairing_file)?;
|
||||||
let connector = tokio_rustls::TlsConnector::from(Arc::new(config));
|
let connector = tokio_rustls::TlsConnector::from(Arc::new(config));
|
||||||
|
|||||||
Reference in New Issue
Block a user