diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/acme/main.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/acme/main.go b/cmd/acme/main.go index e99d65e..669aebc 100644 --- a/cmd/acme/main.go +++ b/cmd/acme/main.go @@ -45,7 +45,7 @@ func register(prov *acme.Provider, a account) (*acme.Signer, error) { } defer a.Save(key) - acc, err := acme.NewSigner(key) + sig, err := acme.NewSigner(key) if err != nil { return nil, err } @@ -61,29 +61,29 @@ func register(prov *acme.Provider, a account) (*acme.Signer, error) { } log.Println("Register", con) - if err := prov.Register(acc, con, agree); err != nil { + if err := prov.Register(sig, con, agree); err != nil { return nil, err } - return acc, nil + return sig, nil } func loadAccount(prov *acme.Provider, a account) error { - acc, err := load(a) + sig, err := load(a) if err != nil { - acc, err = register(prov, a) + sig, err = register(prov, a) if err != nil { return err } } for _, d := range a.Domain { - if err := requestCert(prov, acc, d); err != nil { + if err := requestCert(prov, sig, d); err != nil { return err } } return nil } -func requestCert(prov *acme.Provider, acc *acme.Signer, d domain) error { +func requestCert(prov *acme.Provider, sig *acme.Signer, d domain) error { c, err := d.Load() if err != nil { c.PrivateKey, err = acme.NewKey(d.KeySize) @@ -112,13 +112,13 @@ func requestCert(prov *acme.Provider, acc *acme.Signer, d domain) error { for _, alt := range d.Altnames { log.Println("Authorize", alt) - if err := prov.Authorize(acc, sols, alt); err != nil { + if err := prov.Authorize(sig, sols, alt); err != nil { return err } } log.Println("Request bundle for", d.Altnames) - cert, err := prov.Bundle(acc, c.PrivateKey, d.Altnames) + cert, err := prov.Bundle(sig, c.PrivateKey, d.Altnames) if err != nil { return err } |