summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-09-02 22:54:32 +0200
committerGravatar Matt Colyer2008-09-11 22:05:45 -0700
commit3287ba4cb6f6e1a268dba039853c633938c6e200 (patch)
tree13fd1f95d6a8cc1b3bfc60c6f0f7ce07d1339546 /src/lockdown.c
parentb61d63f43f28d2ec94f750753b1d6d4748fd944b (diff)
downloadlibimobiledevice-3287ba4cb6f6e1a268dba039853c633938c6e200.tar.gz
libimobiledevice-3287ba4cb6f6e1a268dba039853c633938c6e200.tar.bz2
Setup a very basic lockdownd command line client
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/lockdown.c')
-rw-r--r--src/lockdown.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 80974d2..ffabd88 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -265,7 +265,7 @@ iphone_error_t lockdownd_hello(iphone_lckd_client_t control)
265 * 265 *
266 * @return IPHONE_E_SUCCESS on success. 266 * @return IPHONE_E_SUCCESS on success.
267 */ 267 */
268iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *req_key, char **value) 268iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *req_key, char *req_string, char **value)
269{ 269{
270 if (!control || !req_key || !value || (value && *value)) 270 if (!control || !req_key || !value || (value && *value))
271 return IPHONE_E_INVALID_ARG; 271 return IPHONE_E_INVALID_ARG;
@@ -280,7 +280,7 @@ iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *r
280 280
281 /* Setup DevicePublicKey request plist */ 281 /* Setup DevicePublicKey request plist */
282 dict = add_child_to_plist(plist, "dict", "\n", NULL, 0); 282 dict = add_child_to_plist(plist, "dict", "\n", NULL, 0);
283 key = add_key_str_dict_element(plist, dict, "Key", req_key, 1); 283 key = add_key_str_dict_element(plist, dict, req_key, req_string, 1);
284 key = add_key_str_dict_element(plist, dict, "Request", "GetValue", 1); 284 key = add_key_str_dict_element(plist, dict, "Request", "GetValue", 1);
285 xmlDocDumpMemory(plist, (xmlChar **) & XML_content, &length); 285 xmlDocDumpMemory(plist, (xmlChar **) & XML_content, &length);
286 286
@@ -343,7 +343,7 @@ iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *r
343 */ 343 */
344iphone_error_t lockdownd_get_device_uid(iphone_lckd_client_t control, char **uid) 344iphone_error_t lockdownd_get_device_uid(iphone_lckd_client_t control, char **uid)
345{ 345{
346 return lockdownd_generic_get_value(control, "UniqueDeviceID", uid); 346 return lockdownd_generic_get_value(control, "Key", "UniqueDeviceID", uid);
347} 347}
348 348
349/** Askes for the device's public key. Part of the lockdownd handshake. 349/** Askes for the device's public key. Part of the lockdownd handshake.
@@ -354,7 +354,7 @@ iphone_error_t lockdownd_get_device_uid(iphone_lckd_client_t control, char **uid
354 */ 354 */
355iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, char **public_key) 355iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, char **public_key)
356{ 356{
357 return lockdownd_generic_get_value(control, "DevicePublicKey", public_key); 357 return lockdownd_generic_get_value(control, "Key", "DevicePublicKey", public_key);
358} 358}
359 359
360/** Completes the entire lockdownd handshake. 360/** Completes the entire lockdownd handshake.