mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Default EnableServiceSSL to false
This commit is contained in:
@@ -132,11 +132,16 @@ impl LockdowndClient {
|
|||||||
.send_plist(plist::Value::Dictionary(req))
|
.send_plist(plist::Value::Dictionary(req))
|
||||||
.await?;
|
.await?;
|
||||||
let response = self.idevice.read_plist().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)) => {
|
Some(plist::Value::Integer(port)) => {
|
||||||
if let Some(port) = port.as_unsigned() {
|
if let Some(port) = port.as_unsigned() {
|
||||||
Ok((port as u16, *ssl))
|
Ok((port as u16, ssl))
|
||||||
} else {
|
} else {
|
||||||
error!("Port isn't an unsiged integer!");
|
error!("Port isn't an unsiged integer!");
|
||||||
Err(IdeviceError::UnexpectedResponse)
|
Err(IdeviceError::UnexpectedResponse)
|
||||||
@@ -146,11 +151,6 @@ impl LockdowndClient {
|
|||||||
error!("Response didn't contain an integer port");
|
error!("Response didn't contain an integer port");
|
||||||
Err(IdeviceError::UnexpectedResponse)
|
Err(IdeviceError::UnexpectedResponse)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
_ => {
|
|
||||||
error!("Response didn't contain EnableServiceSSL bool!");
|
|
||||||
Err(IdeviceError::UnexpectedResponse)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user