File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,13 @@ func DefaultExpires(role string) time.Time {
82
82
switch role {
83
83
case "root" :
84
84
t = time .Now ().AddDate (1 , 0 , 0 )
85
- case "targets" :
86
- t = time .Now ().AddDate (0 , 3 , 0 )
87
85
case "snapshot" :
88
86
t = time .Now ().AddDate (0 , 0 , 7 )
89
87
case "timestamp" :
90
88
t = time .Now ().AddDate (0 , 0 , 1 )
89
+ default :
90
+ // targets and delegated targets
91
+ t = time .Now ().AddDate (0 , 3 , 0 )
91
92
}
92
93
return t .UTC ().Round (time .Second )
93
94
}
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ func (r *Repo) ChangePassphrase(keyRole string) error {
332
332
}
333
333
334
334
func (r * Repo ) GenKey (role string ) ([]string , error ) {
335
- return r .GenKeyWithExpires (role , data .DefaultExpires ("root" ))
335
+ return r .GenKeyWithExpires (role , data .DefaultExpires (role ))
336
336
}
337
337
338
338
func (r * Repo ) GenKeyWithExpires (keyRole string , expires time.Time ) (keyids []string , err error ) {
You can’t perform that action at this time.
0 commit comments