diff options
author | Nikias Bassen | 2013-11-20 13:18:16 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-11-20 13:18:16 +0100 |
commit | 9b4c896d989587fb76c3059773a3d5fe8ed11606 (patch) | |
tree | e47c1ad389005f717e1918889b97db1c647ca246 | |
parent | 781e740ffb287960f3ecfb96ec66a545054d9b2a (diff) | |
download | idevicerestore-9b4c896d989587fb76c3059773a3d5fe8ed11606.tar.gz idevicerestore-9b4c896d989587fb76c3059773a3d5fe8ed11606.tar.bz2 |
restore: send correct image4 ticket in response to RootTicket request
-rw-r--r-- | src/restore.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/restore.c b/src/restore.c index fde5fbd..f5cc360 100644 --- a/src/restore.c +++ b/src/restore.c @@ -737,9 +737,16 @@ int restore_send_root_ticket(restored_client_t restore, struct idevicerestore_cl return -1; } - if (!(client->flags & FLAG_CUSTOM) && (tss_response_get_ap_ticket(client->tss, &data, &len) < 0)) { - error("ERROR: Unable to get ticket from TSS\n"); - return -1; + if (client->image4supported) { + if (!tss_response_get_ap_img4_ticket(client->tss, &data, &len) < 0) { + error("ERROR: Unable to get ApImg4Ticket from TSS\n"); + return -1; + } + } else { + if (!(client->flags & FLAG_CUSTOM) && (tss_response_get_ap_ticket(client->tss, &data, &len) < 0)) { + error("ERROR: Unable to get ticket from TSS\n"); + return -1; + } } dict = plist_new_dict(); |