diff options
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)); |