Skip to content

Commit 0829f37

Browse files
committed
Define a default crl cache duration
1 parent 4a4f7ca commit 0829f37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

authority/config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ var (
3535
// DefaultEnableSSHCA enable SSH CA features per provisioner or globally
3636
// for all provisioners.
3737
DefaultEnableSSHCA = false
38+
// DefaultCRLCacheDuration is the default cache duration for the CRL.
39+
DefaultCRLCacheDuration = &provisioner.Duration{Duration: 24 * time.Hour}
3840
// GlobalProvisionerClaims default claims for the Authority. Can be overridden
3941
// by provisioner specific claims.
4042
GlobalProvisionerClaims = provisioner.Claims{
@@ -190,6 +192,9 @@ func (c *Config) Init() {
190192
if c.CommonName == "" {
191193
c.CommonName = "Step Online CA"
192194
}
195+
if c.CRL != nil && c.CRL.Generate && c.CRL.CacheDuration == nil {
196+
c.CRL.CacheDuration = DefaultCRLCacheDuration
197+
}
193198
c.AuthorityConfig.init()
194199
}
195200

0 commit comments

Comments
 (0)