summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-09-25 13:15:44 +0200
committerGravatar Nikias Bassen2022-09-25 13:15:44 +0200
commitbb7f206090649933ad616baa1b9497ee978052c8 (patch)
treeb0e1fe959eb6d9954ad4de72ff5c776997216d46
parent88aeb4ce1313a9e89209c08efa62fb6b7eb428c4 (diff)
downloadidevicerestore-bb7f206090649933ad616baa1b9497ee978052c8.tar.gz
idevicerestore-bb7f206090649933ad616baa1b9497ee978052c8.tar.bz2
tss: Add preliminary code to set UID_MODE
-rw-r--r--src/tss.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tss.c b/src/tss.c
index f162a82..da4cf17 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -245,6 +245,11 @@ int tss_parameters_add_from_manifest(plist_t parameters, plist_t build_identity,
_plist_dict_copy_item(parameters, build_identity, "Cryptex1,MobileAssetBrainVolume", NULL);
_plist_dict_copy_item(parameters, build_identity, "Cryptex1,MobileAssetBrainTrustCache", NULL);
+ node = plist_dict_get_item(build_identity, "Info");
+ if (node) {
+ _plist_dict_copy_bool(parameters, node, "RequiresUIDMode", NULL);
+ }
+
if (include_manifest) {
/* add build identity manifest dictionary */
node = plist_dict_get_item(build_identity, "Manifest");
@@ -293,6 +298,13 @@ int tss_request_add_ap_img4_tags(plist_t request, plist_t parameters)
_plist_dict_copy_uint(request, parameters, "NeRDEpoch", NULL);
_plist_dict_copy_data(request, parameters, "PearlCertificationRootPub", NULL);
+ if (plist_dict_get_item(parameters, "UID_MODE")) {
+ _plist_dict_copy_item(request, parameters, "UID_MODE", NULL);
+ } else if (_plist_dict_get_bool(parameters, "RequiresUIDMode")) {
+ // The logic here is missing why this value is expected to be 'false'
+ plist_dict_set_item(request, "UID_MODE", plist_new_bool(0));
+ }
+
return 0;
}