@@ -1231,9 +1231,8 @@ non-volatile storage as FILENAME.EXT.
1231
1231
and report the potential freeze attack.
1232
1232
1233
1233
* ** 4.5** . ** Perform a preorder depth-first search for metadata about the
1234
- desired target, beginning with the top-level targets role.** Note: If
1235
- any metadata requested in steps 4.5.1 - 4.5.2.3 cannot be downloaded nor
1236
- validated, end the search and report that the target cannot be found.
1234
+ desired target.** Let TARGETS be the current metadata, beginning with the
1235
+ top-level targets metadata role.
1237
1236
1238
1237
* ** 4.5.1** . If this role has been visited before, then skip this role (so
1239
1238
that cycles in the delegation graph are avoided). Otherwise, if an
@@ -1245,17 +1244,54 @@ non-volatile storage as FILENAME.EXT.
1245
1244
* ** 4.5.2** . Otherwise, recursively search the list of delegations in order
1246
1245
of appearance.
1247
1246
1248
- * ** 4.5.2.1** . If the current delegation is a multi-role delegation,
1247
+ * ** 4.5.2.1** . Let DELEGATE denote the current target role TARGETS is
1248
+ delegating to.
1249
+
1250
+ * ** 4.5.2.2** . ** Download the DELEGATE tarets metadata file** , up to either
1251
+ the number of bytes specified in the snapshot metadata file, or some Z
1252
+ number of bytes. The value for Z is set by the authors of the application
1253
+ using TUF. For example, Z may be tens of kilobytes. IF DELEGATE cannot be
1254
+ found, end the search and report the target cannot be found. If
1255
+ consistent snapshots are not used (see Section 7), then the filename used
1256
+ to download the targets metadata file is of the fixed form FILENAME.EXT
1257
+ (e.g., delegated_rol.json). Otherwise, the filename is of the form
1258
+ VERSION_NUMBER.FILENAME.EXT (e.g., 42.delegated_role.json), where
1259
+ VERSION_NUMBER is the version number of the DELEGATE metadata file listed
1260
+ in the snapshot metadata file. In either case, the client MUST write the
1261
+ file to non-volatile storage as FILENAME.EXT.
1262
+
1263
+ * ** 4.5.2.3** . ** Check against snapshot metadata.** The hashes (if any), and
1264
+ version number of the new DELEGATE metadata file MUST match the trusted
1265
+ snapshot metadata. This is done, in part, to prevent a mix-and-match
1266
+ attack by man-in-the-middle attackers. If the new DELEGATE metadata file
1267
+ does not match, discard it, end the search, and report the target cannot
1268
+ be found.
1269
+
1270
+ * ** 4.5.2.4** . ** Check for an arbitrary software attack.** The new DELEGATE
1271
+ metadata file MUST have been signed by a threshold of keys specified in the
1272
+ TARGETS metadata file. If the new DELEGATE metadata file is not signed
1273
+ as required, discard it, end the search, and report the target cannot be
1274
+ found.
1275
+
1276
+ * ** 4.5.2.5** . ** Check for a rollback attack.** The version number of the
1277
+ trusted DELEGATE metadata file, if any, MUST be less than or equal to the
1278
+ version number of the new DELEGATE metadata file. If the new DELEGATE
1279
+ `metadata file is older than the trusted DELEGATE metadata file, discard
1280
+ it, end the search, and report the target cannot be found.
1281
+
1282
+ * ** 4.5.2.6** . If the current delegation is a multi-role delegation,
1249
1283
recursively visit each role, and check that each has signed exactly the
1250
1284
same non-custom metadata (i.e., length and hashes) about the target (or
1251
- the lack of any such metadata).
1285
+ the lack of any such metadata). Otherwise, discard it, end the search,
1286
+ and report the target cannot be found.
1252
1287
1253
- * ** 4.5.2.2 ** . If the current delegation is a terminating delegation,
1288
+ * ** 4.5.2.7 ** . If the current delegation is a terminating delegation,
1254
1289
then jump to step 5.
1255
1290
1256
- * ** 4.5.2.3** . Otherwise, if the current delegation is a non-terminating
1257
- delegation, continue processing the next delegation, if any. Stop the
1258
- search, and jump to step 5 as soon as a delegation returns a result.
1291
+ * ** 4.5.2.8** . Otherwise, if the current delegation is a non-terminating
1292
+ delegation, continue processing the next delegation, if any, by repeating
1293
+ step 4.5 with DELEGATE as the current TARGET role. Stop the search, and
1294
+ jump to step 5 as soon as a delegation returns a result.
1259
1295
1260
1296
** 5** . ** Verify the desired target against its targets metadata** .
1261
1297
0 commit comments