Default EnableServiceSSL to false

This commit is contained in:
Jackson Coxson
2025-02-01 17:10:59 -07:00
parent 1cea2130e2
commit 1b5b4b1be0

View File

@@ -132,11 +132,16 @@ impl LockdowndClient {
.send_plist(plist::Value::Dictionary(req))
.await?;
let response = self.idevice.read_plist().await?;
match response.get("EnableServiceSSL") {
Some(plist::Value::Boolean(ssl)) => match response.get("Port") {
let ssl = match response.get("EnableServiceSSL") {
Some(plist::Value::Boolean(ssl)) => ssl.to_owned(),
_ => false, // over USB, this option won't exist
};
match response.get("Port") {
Some(plist::Value::Integer(port)) => {
if let Some(port) = port.as_unsigned() {
Ok((port as u16, *ssl))
Ok((port as u16, ssl))
} else {
error!("Port isn't an unsiged integer!");
Err(IdeviceError::UnexpectedResponse)
@@ -146,11 +151,6 @@ impl LockdowndClient {
error!("Response didn't contain an integer port");
Err(IdeviceError::UnexpectedResponse)
}
},
_ => {
error!("Response didn't contain EnableServiceSSL bool!");
Err(IdeviceError::UnexpectedResponse)
}
}
}
}