Skip to content

Commit ecec5d3

Browse files
Increase the default value for MaxRootRotations (#645)
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 <kommendorkapten@github.com>
1 parent 5abb621 commit ecec5d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

metadata/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error) {
5757

5858
return &UpdaterConfig{
5959
// TUF configuration
60-
MaxRootRotations: 32,
60+
MaxRootRotations: 256,
6161
MaxDelegations: 32,
6262
RootMaxLength: 512000, // bytes
6363
TimestampMaxLength: 16384, // bytes

metadata/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestNewUpdaterConfig(t *testing.T) {
4343
remoteURL: "somepath",
4444
rootBytes: []byte("somerootbytes"),
4545
config: &UpdaterConfig{
46-
MaxRootRotations: 32,
46+
MaxRootRotations: 256,
4747
MaxDelegations: 32,
4848
RootMaxLength: 512000,
4949
TimestampMaxLength: 16384,

0 commit comments

Comments
 (0)