From ce32f84ea0e6821c38cafe9e459965f53db9a57e Mon Sep 17 00:00:00 2001 From: Fredrik Skogman Date: Mon, 15 Jul 2024 11:20:42 +0200 Subject: [PATCH] Increase the default value for MaxRootRotations The default value of 32 is quite small, it may break certain clients that are trying to do complete tuf refresh on a large TUF repo. Signed-off-by: Fredrik Skogman --- metadata/config/config.go | 2 +- metadata/config/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index 09c9b46e..cd8cc98a 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -57,7 +57,7 @@ func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error) { return &UpdaterConfig{ // TUF configuration - MaxRootRotations: 32, + MaxRootRotations: 256, MaxDelegations: 32, RootMaxLength: 512000, // bytes TimestampMaxLength: 16384, // bytes diff --git a/metadata/config/config_test.go b/metadata/config/config_test.go index be35a877..a5d48746 100644 --- a/metadata/config/config_test.go +++ b/metadata/config/config_test.go @@ -43,7 +43,7 @@ func TestNewUpdaterConfig(t *testing.T) { remoteURL: "somepath", rootBytes: []byte("somerootbytes"), config: &UpdaterConfig{ - MaxRootRotations: 32, + MaxRootRotations: 256, MaxDelegations: 32, RootMaxLength: 512000, TimestampMaxLength: 16384,