Skip to content

Commit 3361f4d

Browse files
committed
Add support for iBridge1 manifest
1 parent 31088fe commit 3361f4d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tsschecker/tsschecker.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,8 @@ int isManifestSignedForDevice(const char *buildManifestPath, t_devicevals *devVa
16771677
plist_t manifest = NULL;
16781678
plist_t ProductVersion = NULL;
16791679
plist_t SupportedProductTypes = NULL;
1680+
plist_t SupportedProductTypeIDs = NULL;
1681+
plist_t SupportedProductTypeIDsMode = NULL;
16801682
plist_t mDevice = NULL;
16811683
char *bufManifest = NULL;
16821684

@@ -1713,6 +1715,22 @@ int isManifestSignedForDevice(const char *buildManifestPath, t_devicevals *devVa
17131715
goto checkedDeviceModel;
17141716
}
17151717
}
1718+
1719+
SupportedProductTypeIDs = plist_dict_get_item(manifest, "SupportedProductTypeIDs");
1720+
if (SupportedProductTypeIDs) {
1721+
SupportedProductTypeIDsMode = plist_dict_get_item(SupportedProductTypeIDs, "DFU");
1722+
if(!SupportedProductTypeIDsMode) {
1723+
SupportedProductTypeIDsMode = plist_dict_get_item(SupportedProductTypeIDs, "Recovery");
1724+
}
1725+
if(SupportedProductTypeIDsMode)
1726+
for (int i=0; i<plist_array_get_size(SupportedProductTypeIDsMode); i++) {
1727+
mDevice = plist_array_get_item(SupportedProductTypeIDsMode, i);
1728+
int64_t lDevice = 0;
1729+
plist_get_int_val(mDevice, &lDevice);
1730+
if (lDevice)
1731+
goto checkedDeviceModel;
1732+
}
1733+
}
17161734

17171735
reterror("[TSSC] selected device can't be used with that buildmanifest\n");
17181736

0 commit comments

Comments
 (0)