pub struct Limits {
pub max_root_size: u64,
pub max_targets_size: u64,
pub max_timestamp_size: u64,
pub max_root_updates: u64,
}
Expand description
Limits used when fetching repository metadata.
These limits are implemented to prevent endless data attacks. Clients must ensure these values are set higher than what would reasonably be expected by a repository, but not so high that the amount of data could interfere with the system.
max_root_size
and max_timestamp_size
are the maximum size for the root.json
and
timestamp.json
files, respectively, downloaded from the repository. These must be
sufficiently large such that future updates to your repository’s key management strategy
will still be supported, but sufficiently small such that you are protected against an
endless data attack (defined by TUF as an attacker responding to clients with extremely
large files that interfere with the client’s system).
The Default
implementation sets the following values:
max_root_size
: 1 MiBmax_targets_size
: 10 MiBmax_timestamp_size
: 1 MiBmax_root_updates
: 1024
Fields
max_root_size: u64
The maximum allowable size in bytes for downloaded root.json files.
max_targets_size: u64
The maximum allowable size in bytes for downloaded targets.json file if the size is not listed in snapshots.json. This setting is ignored if the size of targets.json is in the signed snapshots.json file.
max_timestamp_size: u64
The maximum allowable size in bytes for the downloaded timestamp.json file.
max_root_updates: u64
The maximum number of updates to root.json to download.
Trait Implementations
impl Copy for Limits
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more