diff options
author | Nikias Bassen | 2013-11-20 21:37:19 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-11-20 21:37:19 +0100 |
commit | d0f4512a38c0f1be90b39cc774ad16f28d8bec23 (patch) | |
tree | 6feca7b18be77c01e95dc60596fb5fb9277d84fa /src/idevicerestore.c | |
parent | 17ecc7b0a4f8d9eececd5317bbed30ce09c5ec85 (diff) | |
download | idevicerestore-d0f4512a38c0f1be90b39cc774ad16f28d8bec23.tar.gz idevicerestore-d0f4512a38c0f1be90b39cc774ad16f28d8bec23.tar.bz2 |
get baseband ticket in normal mode and pass preflight info to StartRestore request
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r-- | src/idevicerestore.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index e5e46c5..84cded0 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -1482,6 +1482,38 @@ int get_tss_response(struct idevicerestore_client_t* client, plist_t build_ident } } + if (client->mode->index == MODE_NORMAL) { + /* normal mode; request baseband ticket aswell */ + plist_free(parameters); + parameters = plist_new_dict(); + plist_t pinfo = NULL; + normal_get_preflight_info(client, &pinfo); + if (pinfo) { + plist_t node; + node = plist_dict_get_item(pinfo, "Nonce"); + if (node) { + plist_dict_insert_item(parameters, "BbNonce", plist_copy(node)); + } + node = plist_dict_get_item(pinfo, "ChipID"); + if (node) { + plist_dict_insert_item(parameters, "BbChipID", plist_copy(node)); + } + node = plist_dict_get_item(pinfo, "CertID"); + if (node) { + plist_dict_insert_item(parameters, "BbGoldCertId", plist_copy(node)); + } + node = plist_dict_get_item(pinfo, "ChipSerialNo"); + if (node) { + plist_dict_insert_item(parameters, "BbSNUM", plist_copy(node)); + } + + /* add baseband parameters */ + tss_request_add_baseband_tags_from_manifest(request, build_identity, NULL); + tss_request_add_baseband_tags(request, parameters); + } + client->preflight_info = pinfo; + } + /* send request and grab response */ response = tss_request_send(request, client->tss_url); if (response == NULL) { |