From 3d1de1b31ec2bd5e9db93dea8522743b1627675e Mon Sep 17 00:00:00 2001 From: Aaron Burghardt Date: Wed, 7 Aug 2013 05:42:36 -0400 Subject: 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. --- src/mobilebackup2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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, if (options) { plist_dict_insert_item(dict, "Options", plist_copy(options)); } + if (!strcmp(request, "Unback") && options) { + plist_t password = plist_dict_get_item(options, "Password"); + if (password) { + plist_dict_insert_item(dict, "Password", plist_copy(password)); + } + } mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict); plist_free(dict); -- cgit v1.1-32-gdbae