summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-09-25 02:21:04 +0200
committerGravatar Nikias Bassen2019-09-25 02:21:04 +0200
commit3b746b8d0741a93aee5cd1242b6fae6a2e439a96 (patch)
treeb9640b4bf55dbc25bffe813c9be8a9692443e46c /src
parent4c2b62a9176a19f5c6c8b75831b4264a28329588 (diff)
downloadidevicerestore-3b746b8d0741a93aee5cd1242b6fae6a2e439a96.tar.gz
idevicerestore-3b746b8d0741a93aee5cd1242b6fae6a2e439a96.tar.bz2
Add new Vinyl tags to (preflight) TSS request
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 1cb1249..34e8edb 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -1920,6 +1920,34 @@ int get_tss_response(struct idevicerestore_client_t* client, plist_t build_ident
/* add baseband parameters */
tss_request_add_baseband_tags(request, parameters, NULL);
+
+ node = plist_dict_get_item(pinfo, "EUICCChipID");
+ uint64_t euiccchipid = 0;
+ if (node && plist_get_node_type(node) == PLIST_UINT) {
+ plist_get_uint_val(node, &euiccchipid);
+ plist_dict_set_item(parameters, "eUICC,ChipID", plist_copy(node));
+ }
+ if (euiccchipid >= 5) {
+ node = plist_dict_get_item(pinfo, "EUICCCSN");
+ if (node) {
+ plist_dict_set_item(parameters, "eUICC,EID", plist_copy(node));
+ }
+ node = plist_dict_get_item(pinfo, "EUICCCertIdentifier");
+ if (node) {
+ plist_dict_set_item(parameters, "eUICC,RootKeyIdentifier", plist_copy(node));
+ }
+ node = plist_dict_get_item(pinfo, "EUICCGoldNonce");
+ if (node) {
+ plist_dict_set_item(parameters, "EUICCGoldNonce", plist_copy(node));
+ }
+ node = plist_dict_get_item(pinfo, "EUICCMainNonce");
+ if (node) {
+ plist_dict_set_item(parameters, "EUICCMainNonce", plist_copy(node));
+ }
+
+ /* add vinyl parameters */
+ tss_request_add_vinyl_tags(request, parameters, NULL);
+ }
}
client->preflight_info = pinfo;
}