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 {
8282 switch role {
8383 case "root" :
8484 t = time .Now ().AddDate (1 , 0 , 0 )
85- case "targets" :
86- t = time .Now ().AddDate (0 , 3 , 0 )
8785 case "snapshot" :
8886 t = time .Now ().AddDate (0 , 0 , 7 )
8987 case "timestamp" :
9088 t = time .Now ().AddDate (0 , 0 , 1 )
89+ default :
90+ // targets and delegated targets
91+ t = time .Now ().AddDate (0 , 3 , 0 )
9192 }
9293 return t .UTC ().Round (time .Second )
9394}
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ func (r *Repo) ChangePassphrase(keyRole string) error {
332332}
333333
334334func (r * Repo ) GenKey (role string ) ([]string , error ) {
335- return r .GenKeyWithExpires (role , data .DefaultExpires ("root" ))
335+ return r .GenKeyWithExpires (role , data .DefaultExpires (role ))
336336}
337337
338338func (r * Repo ) GenKeyWithExpires (keyRole string , expires time.Time ) (keyids []string , err error ) {
You can’t perform that action at this time.
0 commit comments