diff options
author | BALATON Zoltan | 2015-05-05 01:04:22 +0200 |
---|---|---|
committer | BALATON Zoltan | 2015-05-05 01:19:12 +0200 |
commit | 5656ccf5cb0432f9ee7d1ed9fbeae7a43d5ad2dd (patch) | |
tree | 8cbf1eef72ca8c2a179cac98b1e8ab6542255981 | |
parent | ac78b820e4144617f80c27f866f153f49ffdd92e (diff) | |
download | idevicerestore-5656ccf5cb0432f9ee7d1ed9fbeae7a43d5ad2dd.tar.gz idevicerestore-5656ccf5cb0432f9ee7d1ed9fbeae7a43d5ad2dd.tar.bz2 |
tss: Fix request for older devices (such as iPhone 3G). We only need
to add digest for Trusted items.
-rw-r--r-- | src/tss.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -499,11 +499,15 @@ int tss_request_add_ap_tags(plist_t request, plist_t parameters, plist_t overrid tss_entry_apply_restore_request_rules(tss_entry, parameters, rules); } - /* Make sure we have a Digest key even if empty */ - plist_t node = plist_access_path(manifest_entry, 1, "Digest"); - if (!node) { - debug("DEBUG: No Digest data, using empty value for entry %s\n", key); - plist_dict_set_item(tss_entry, "Digest", plist_new_data(NULL, 0)); + /* Make sure we have a Digest key for Trusted items even if empty */ + plist_t node = plist_dict_get_item(manifest_entry, "Trusted"); + if (node && plist_get_node_type(node) == PLIST_BOOLEAN) { + uint8_t trusted; + plist_get_bool_val(node, &trusted); + if (trusted && !plist_access_path(manifest_entry, 1, "Digest")) { + debug("DEBUG: No Digest data, using empty value for entry %s\n", key); + plist_dict_set_item(tss_entry, "Digest", plist_new_data(NULL, 0)); + } } /* finally add entry to request */ |