aboutsummaryrefslogtreecommitdiff
path: root/cmd/acme/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/acme/config.go')
-rw-r--r--cmd/acme/config.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index 15c3403..e7a95a9 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -11,7 +11,10 @@ import (
"gopkg.in/yaml.v2"
)
-const defKeySize = 2048
+const (
+ defKeySize = 2048
+ defGrace = time.Hour * 24 * 7
+)
type Config struct {
Gracetime time.Duration
@@ -70,6 +73,9 @@ func LoadConfig(fname string) (*Config, error) {
c.BaseDir = path.Join(usr.HomeDir, c.BaseDir[1:])
}
// apply defaults
+ if c.Gracetime == 0 {
+ c.Gracetime = defGrace
+ }
if c.KeySize == 0 {
c.KeySize = defKeySize
}