When trying to load a TUF repo with delegated targets, if a delegated role has a longer configuration file than the targets.json it will be unable to be loaded.
In the load_targets function, the max_targets_length variable is changed to the actual length of the targets metadata -
|
let (max_targets_size, specifier) = match targets_meta.length { |
That updated max_targets_size is then passed when loading delegated roles -