summaryrefslogtreecommitdiffstats
path: root/src/tss.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-28 12:53:37 +0100
committerGravatar Martin Szulecki2014-10-28 12:53:37 +0100
commit3cd5ab609e368eacd08da80e8fad55ceb71b8c4b (patch)
treea6e31d81a98b0ec7f3b58815db9e180cd5f34efc /src/tss.c
parentfbe865faa351e8b8622c0627d03d5fb56380ff7c (diff)
downloadidevicerestore-3cd5ab609e368eacd08da80e8fad55ceb71b8c4b.tar.gz
idevicerestore-3cd5ab609e368eacd08da80e8fad55ceb71b8c4b.tar.bz2
tss: Make ApECID key mandatory and also use it for baseband TSS requests
Diffstat (limited to 'src/tss.c')
-rw-r--r--src/tss.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/tss.c b/src/tss.c
index 6ec3811..ac21f74 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -221,15 +221,6 @@ int tss_request_add_ap_img4_tags(plist_t request, plist_t parameters) {
return -1;
}
- /* ApECID */
- node = plist_dict_get_item(parameters, "ApECID");
- if (!node || plist_get_node_type(node) != PLIST_UINT) {
- error("ERROR: Unable to find required ApECID in parameters\n");
- return -1;
- }
- plist_dict_set_item(request, "ApECID", plist_copy(node));
- node = NULL;
-
/* ApNonce */
node = plist_dict_get_item(parameters, "ApNonce");
if (!node || plist_get_node_type(node) != PLIST_DATA) {
@@ -300,15 +291,6 @@ int tss_request_add_ap_img3_tags(plist_t request, plist_t parameters) {
/* @APTicket */
plist_dict_set_item(request, "@APTicket", plist_new_bool(1));
- /* ApECID */
- node = plist_dict_get_item(parameters, "ApECID");
- if (!node || plist_get_node_type(node) != PLIST_UINT) {
- error("ERROR: Unable to find required ApECID in parameters\n");
- return -1;
- }
- plist_dict_set_item(request, "ApECID", plist_copy(node));
- node = NULL;
-
/* ApBoardID */
node = plist_dict_get_item(request, "ApBoardID");
if (!node || plist_get_node_type(node) != PLIST_UINT) {
@@ -348,6 +330,15 @@ int tss_request_add_ap_img3_tags(plist_t request, plist_t parameters) {
int tss_request_add_common_tags(plist_t request, plist_t parameters, plist_t overrides) {
plist_t node = NULL;
+ /* ApECID */
+ node = plist_dict_get_item(parameters, "ApECID");
+ if (!node || plist_get_node_type(node) != PLIST_UINT) {
+ error("ERROR: Unable to find required ApECID in parameters\n");
+ return -1;
+ }
+ plist_dict_set_item(request, "ApECID", plist_copy(node));
+ node = NULL;
+
/* UniqueBuildID */
node = plist_dict_get_item(parameters, "UniqueBuildID");
if (node) {