From 85222fbaada115a53f55d33fbb9d3f7ab71f1e37 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 26 Feb 2016 00:22:45 +0100 Subject: Default provider --- cmd/acme/config.go | 8 +++++++- cmd/acme/dim13.yml | 11 ++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'cmd/acme') diff --git a/cmd/acme/config.go b/cmd/acme/config.go index 85d6600..be830fd 100644 --- a/cmd/acme/config.go +++ b/cmd/acme/config.go @@ -9,6 +9,8 @@ import ( "strings" "time" + "dim13.org/acme" + "gopkg.in/yaml.v2" ) @@ -91,7 +93,11 @@ func LoadConfig(fname string) (*Config, error) { if c.KeySize == 0 { c.KeySize = defKeySize } - for _, pro := range c.Provider { + for i, pro := range c.Provider { + if pro.Directory == "" { + pro.Directory = acme.LE1 + } + c.Provider[i] = pro for i, acc := range pro.Account { if acc.KeySize == 0 { acc.KeySize = c.KeySize diff --git a/cmd/acme/dim13.yml b/cmd/acme/dim13.yml index 1215621..209ea74 100644 --- a/cmd/acme/dim13.yml +++ b/cmd/acme/dim13.yml @@ -3,8 +3,7 @@ listentls: localhost:8443 basedir: ~/.acme provider: -- directory: https://acme-v01.api.letsencrypt.org/directory - account: +- account: - mail: postmaster@dim13.org keyfile: private/postmaster.key desire: @@ -20,12 +19,14 @@ provider: desire: - altnames: - www.dim13.org - - mail.dim13.org - - git.dim13.org - - cvs.dim13.org keyfile: private/www_dim13_org.key crtfile: certs/www_dim13_org.pem hook: [ nginx ] + - altnames: + - git.dim13.org + - cvs.dim13.org + keyfile: private/wiki_dim13_org.key + crtfile: certs/wiki_dim13_org.pem hook: nginx: /etc/rc.d/nginx restart -- cgit v1.2.3