diff options
| author | 2013-08-07 05:42:36 -0400 | |
|---|---|---|
| committer | 2013-08-08 15:16:53 +0200 | |
| commit | 3d1de1b31ec2bd5e9db93dea8522743b1627675e (patch) | |
| tree | 96f89ed168e5c3fd8f3849f982233182bfc8a714 /src | |
| parent | e7e9bc8a674b6d93c28c0d2416755c0ae1c8d146 (diff) | |
| download | libimobiledevice-3d1de1b31ec2bd5e9db93dea8522743b1627675e.tar.gz libimobiledevice-3d1de1b31ec2bd5e9db93dea8522743b1627675e.tar.bz2 | |
idevicebackup2: Implement support for encrypted backups in Unback command
Allows to specify a password for the Unback request. It is also sent in the
main message, not in an options dictionary.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mobilebackup2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 594ba84..577901e 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
| @@ -458,6 +458,12 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, | |||
| 458 | if (options) { | 458 | if (options) { |
| 459 | plist_dict_insert_item(dict, "Options", plist_copy(options)); | 459 | plist_dict_insert_item(dict, "Options", plist_copy(options)); |
| 460 | } | 460 | } |
| 461 | if (!strcmp(request, "Unback") && options) { | ||
| 462 | plist_t password = plist_dict_get_item(options, "Password"); | ||
| 463 | if (password) { | ||
| 464 | plist_dict_insert_item(dict, "Password", plist_copy(password)); | ||
| 465 | } | ||
| 466 | } | ||
| 461 | mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict); | 467 | mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict); |
| 462 | plist_free(dict); | 468 | plist_free(dict); |
| 463 | 469 | ||
