diff options
author | BALATON Zoltan | 2014-10-06 12:05:24 +0200 |
---|---|---|
committer | BALATON Zoltan | 2014-10-21 01:14:45 +0200 |
commit | 2d1cb444b1227787eebe29b11a04b190c1b5adf6 (patch) | |
tree | 341a7d878a9152dd4acbde22f67541fb8f28a986 /src/tss.c | |
parent | 0c7b0a6f79c8fa5d16d6f5da064b11d2e1f84920 (diff) | |
download | idevicerestore-2d1cb444b1227787eebe29b11a04b190c1b5adf6.tar.gz idevicerestore-2d1cb444b1227787eebe29b11a04b190c1b5adf6.tar.bz2 |
tss: Fix request xml adding new tags and missing parts
Diffstat (limited to 'src/tss.c')
-rw-r--r-- | src/tss.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -184,6 +184,15 @@ int tss_parameters_add_from_manifest(plist_t parameters, plist_t build_identity) } node = NULL; + /* BbFDRSecurityKeyHash */ + node = plist_dict_get_item(build_identity, "BbFDRSecurityKeyHash"); + if (node && plist_get_node_type(node) == PLIST_DATA) { + plist_dict_set_item(parameters, "BbFDRSecurityKeyHash", plist_copy(node)); + } else { + debug("NOTE: Unable to find BbFDRSecurityKeyHash node\n"); + } + node = NULL; + /* BbSkeyId - Used by XMM 6180/GSM */ node = plist_dict_get_item(build_identity, "BbSkeyId"); if (node && plist_get_node_type(node) == PLIST_DATA) { @@ -499,6 +508,13 @@ 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)); + } + /* finally add entry to request */ plist_dict_set_item(request, key, tss_entry); @@ -551,6 +567,13 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters, plist_t o } node = NULL; + /* BbFDRSecurityKeyHash */ + node = plist_dict_get_item(parameters, "BbFDRSecurityKeyHash"); + if (node) { + plist_dict_set_item(request, "BbFDRSecurityKeyHash", plist_copy(node)); + } + node = NULL; + /* BbSkeyId - Used by XMM 6180/GSM */ node = plist_dict_get_item(parameters, "BbSkeyId"); if (node) { @@ -574,7 +597,11 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters, plist_t o error("ERROR: Unable to find required BbGoldCertId in parameters\n"); return -1; } - plist_dict_set_item(request, "BbGoldCertId", plist_copy(node)); + node = plist_copy(node); + uint64_t val; + plist_get_uint_val(node, &val); + plist_set_uint_val(node, (int32_t)val); + plist_dict_set_item(request, "BbGoldCertId", node); node = NULL; /* BbSNUM */ |