summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tss.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/tss.c b/src/tss.c
index ae46e15..069e5ed 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -837,13 +837,17 @@ int tss_request_add_ap_recovery_tags(plist_t request, plist_t parameters, plist_
continue;
}
+ plist_t info_dict = plist_dict_get_item(manifest_entry, "Info");
+ if (!info_dict) {
+ continue;
+ }
+
if (_plist_dict_get_bool(parameters, "_OnlyFWComponents")) {
if (!_plist_dict_get_bool(manifest_entry, "Trusted")) {
debug("DEBUG: %s: Skipping '%s' as it is not trusted\n", __func__, key);
continue;
}
- plist_t info_dict = plist_dict_get_item(manifest_entry, "Info");
if (!_plist_dict_get_bool(info_dict, "IsFirmwarePayload") && !_plist_dict_get_bool(info_dict, "IsSecondaryFirmwarePayload") && !_plist_dict_get_bool(info_dict, "IsFUDFirmware")) {
debug("DEBUG: %s: Skipping '%s' as it is neither firmware nor secondary nor FUD firmware payload\n", __func__, key);
continue;
@@ -933,13 +937,24 @@ int tss_request_add_ap_tags(plist_t request, plist_t parameters, plist_t overrid
continue;
}
+ plist_t info_dict = plist_dict_get_item(manifest_entry, "Info");
+ if (!info_dict) {
+ continue;
+ }
+
+ if (_plist_dict_get_bool(parameters, "ApSupportsImg4")) {
+ if (!plist_dict_get_item(info_dict, "RestoreRequestRules")) {
+ debug("DEBUG: %s: Skipping '%s' as it doesn't have RestoreRequestRules\n", __func__, key);
+ continue;
+ }
+ }
+
if (_plist_dict_get_bool(parameters, "_OnlyFWComponents")) {
if (!_plist_dict_get_bool(manifest_entry, "Trusted")) {
- debug("DEBUG: %s: Skipping '%s' as it is not trusted", __func__, key);
+ debug("DEBUG: %s: Skipping '%s' as it is not trusted\n", __func__, key);
continue;
}
- plist_t info_dict = plist_dict_get_item(manifest_entry, "Info");
if (!_plist_dict_get_bool(info_dict, "IsFirmwarePayload") && !_plist_dict_get_bool(info_dict, "IsSecondaryFirmwarePayload") && !_plist_dict_get_bool(info_dict, "IsFUDFirmware")) {
debug("DEBUG: %s: Skipping '%s' as it is neither firmware nor secondary nor FUD firmware payload\n", __func__, key);
continue;