From eecdd9164857b774f5f828bf6f9d76677f7aed29 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Tue, 26 May 2015 14:12:18 -0700 Subject: [PATCH] Fix some issues with expiry config field. --- ca/certificate-authority.go | 3 +++ test/boulder-config.json | 2 +- test/boulder-test-config.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ca/certificate-authority.go b/ca/certificate-authority.go index e588f062f..6eeabbc2b 100644 --- a/ca/certificate-authority.go +++ b/ca/certificate-authority.go @@ -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 diff --git a/test/boulder-config.json b/test/boulder-config.json index 0752a870a..b9a7daa8c 100644 --- a/test/boulder-config.json +++ b/test/boulder-config.json @@ -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": { diff --git a/test/boulder-test-config.json b/test/boulder-test-config.json index 40b069699..0ebaeb616 100644 --- a/test/boulder-test-config.json +++ b/test/boulder-test-config.json @@ -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": {