aboutsummaryrefslogtreecommitdiff
path: root/cmd/acmed/config.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-17 01:44:48 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-17 01:44:48 +0100
commit3e1a89a27dcd7847e80dd717bbed8360b322240c (patch)
tree788b4bb28af97ec572264e749e46d44636332895 /cmd/acmed/config.go
parenteda16bf12a72e1426d1f45eb07ce847d4b3e6882 (diff)
Catch more errors
Diffstat (limited to 'cmd/acmed/config.go')
-rw-r--r--cmd/acmed/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/acmed/config.go b/cmd/acmed/config.go
index f1529b2..7f5ffbe 100644
--- a/cmd/acmed/config.go
+++ b/cmd/acmed/config.go
@@ -63,6 +63,7 @@ var (
errNoKey = errors.New("no key specified")
errNoCert = errors.New("no cert specified")
errNoAltNames = errors.New("no altnames specified")
+ errNoMail = errors.New("no mail specified")
)
func LoadConfig(fname string) (*Config, error) {
@@ -79,6 +80,9 @@ func LoadConfig(fname string) (*Config, error) {
if v.KeySize == 0 {
v.KeySize = c.Defaults.KeySize
}
+ if v.Mail == "" {
+ return nil, errNoMail
+ }
if v.Key == "" {
return nil, errNoKey
}