summaryrefslogtreecommitdiffstats
path: root/src/tss.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-09-27 08:27:40 +0200
committerGravatar Nikias Bassen2019-09-27 08:27:40 +0200
commit9181cd5eed8c5046133d2f2fe9cee59e52a30ccf (patch)
treeb33dad581bc9144078917b5892eb1e6f1891d798 /src/tss.c
parent8de39e81fb44d45f2daed367d770923cc2212265 (diff)
downloadidevicerestore-9181cd5eed8c5046133d2f2fe9cee59e52a30ccf.tar.gz
idevicerestore-9181cd5eed8c5046133d2f2fe9cee59e52a30ccf.tar.bz2
tss: Fix Baseband TSS request for iPhone XS
Diffstat (limited to 'src/tss.c')
-rw-r--r--src/tss.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/tss.c b/src/tss.c
index 8888ea4..05535d9 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -679,11 +679,10 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters, plist_t o
plist_t node = NULL;
/* BbChipID */
- node = plist_dict_get_item(parameters, "BbChipID");
- if (node) {
- plist_dict_set_item(request, "BbChipID", plist_copy(node));
+ uint64_t bb_chip_id = _plist_dict_get_uint(parameters, "BbChipID");
+ if (bb_chip_id) {
+ plist_dict_set_item(request, "BbChipID", plist_new_uint(bb_chip_id));
}
- node = NULL;
/* BbProvisioningManifestKeyHash */
node = plist_dict_get_item(parameters, "BbProvisioningManifestKeyHash");
@@ -770,13 +769,16 @@ int tss_request_add_baseband_tags(plist_t request, plist_t parameters, plist_t o
if (plist_dict_get_item(bbfwdict, "Info")) {
plist_dict_remove_item(bbfwdict, "Info");
}
- /* depending on the BasebandCertId remove certain nodes */
- if (bb_cert_id == 0x26F3FACC || bb_cert_id == 0x5CF2EC4E || bb_cert_id == 0x8399785A) {
- plist_dict_remove_item(bbfwdict, "PSI2-PartialDigest");
- plist_dict_remove_item(bbfwdict, "RestorePSI2-PartialDigest");
- } else {
- plist_dict_remove_item(bbfwdict, "PSI-PartialDigest");
- plist_dict_remove_item(bbfwdict, "RestorePSI-PartialDigest");
+
+ if (bb_chip_id == 0x68) {
+ /* depending on the BasebandCertId remove certain nodes */
+ if (bb_cert_id == 0x26F3FACC || bb_cert_id == 0x5CF2EC4E || bb_cert_id == 0x8399785A) {
+ plist_dict_remove_item(bbfwdict, "PSI2-PartialDigest");
+ plist_dict_remove_item(bbfwdict, "RestorePSI2-PartialDigest");
+ } else {
+ plist_dict_remove_item(bbfwdict, "PSI-PartialDigest");
+ plist_dict_remove_item(bbfwdict, "RestorePSI-PartialDigest");
+ }
}
plist_dict_set_item(request, "BasebandFirmware", bbfwdict);