diff options
author | Nikias Bassen | 2013-11-20 14:18:51 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-11-20 14:18:51 +0100 |
commit | 44516697f38fa0f096ec48ee782e3d6f954195b5 (patch) | |
tree | 7fd8c4d531fbf89992fb54a321ccfd87218e0a90 /src | |
parent | 4e2f579c646a26d1b54ad3f461c36bfdb44195ef (diff) | |
download | idevicerestore-44516697f38fa0f096ec48ee782e3d6f954195b5.tar.gz idevicerestore-44516697f38fa0f096ec48ee782e3d6f954195b5.tar.bz2 |
restore/tss: do not add an empty BbNonce node to TSS request
Diffstat (limited to 'src')
-rw-r--r-- | src/restore.c | 4 | ||||
-rw-r--r-- | src/tss.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/restore.c b/src/restore.c index b8b3c31..5978568 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1432,7 +1432,9 @@ int restore_send_baseband_data(restored_client_t restore, struct idevicerestore_ /* populate parameters */ plist_t parameters = plist_new_dict(); plist_dict_insert_item(parameters, "ApECID", plist_new_uint(client->ecid)); - plist_dict_insert_item(parameters, "BbNonce", plist_new_data((const char*)bb_nonce, bb_nonce_size)); + if (bb_nonce) { + plist_dict_insert_item(parameters, "BbNonce", plist_new_data((const char*)bb_nonce, bb_nonce_size)); + } plist_dict_insert_item(parameters, "BbChipID", plist_new_uint(bb_chip_id)); plist_dict_insert_item(parameters, "BbGoldCertId", plist_new_uint(bb_cert_id)); plist_dict_insert_item(parameters, "BbSNUM", plist_new_data((const char*)bb_snum, bb_snum_size)); @@ -222,12 +222,10 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters) { /* BbNonce */ node = plist_dict_get_item(parameters, "BbNonce"); - if (!node || plist_get_node_type(node) != PLIST_DATA) { - error("ERROR: Unable to find required BbNonce in parameters\n"); - return -1; + if (node) { + plist_dict_insert_item(request, "BbNonce", plist_copy(node)); + node = NULL; } - plist_dict_insert_item(request, "BbNonce", plist_copy(node)); - node = NULL; /* @BBTicket */ plist_dict_insert_item(request, "@BBTicket", plist_new_bool(1)); |