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