Fix some issues with expiry config field.
This commit is contained in:
parent
fc71c2540d
commit
eecdd91648
|
@ -130,6 +130,9 @@ func NewCertificateAuthorityImpl(cadb core.CertificateAuthorityDatabase, config
|
|||
NotAfter: issuer.NotAfter,
|
||||
}
|
||||
|
||||
if config.Expiry == "" {
|
||||
return nil, errors.New("Config must specify an expiry period.")
|
||||
}
|
||||
ca.ValidityPeriod, err = time.ParseDuration(config.Expiry)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"issuerCert": "test/test-ca.pem",
|
||||
"_comment": "This should only be present in testMode. In prod use an HSM.",
|
||||
"issuerKey": "test/test-ca.key",
|
||||
"expiry": "8760h",
|
||||
"expiry": "8760h"
|
||||
},
|
||||
|
||||
"sa": {
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
"testMode": true,
|
||||
"issuerCert": "test/test-ca.pem",
|
||||
"_comment": "This should only be present in testMode. In prod use an HSM.",
|
||||
"issuerKey": "test/test-ca.key"
|
||||
"issuerKey": "test/test-ca.key",
|
||||
"expiry": "8760h"
|
||||
},
|
||||
|
||||
"sa": {
|
||||
|
|
Loading…
Reference in New Issue