aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-02-03 17:45:48 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-02-03 17:45:48 +0100
commit2fc776f0fe9b25848becc0b8b73af60313b971cb (patch)
tree1ed06cbdc9ebd08cd208ac0f1de084ee48080689
parent27e126b5c6cf6358143dd5b78e8c2f88f2b5682d (diff)
Read error messages
-rw-r--r--authorize.go11
-rw-r--r--cmd/acme/main.go12
2 files changed, 18 insertions, 5 deletions
diff --git a/authorize.go b/authorize.go
index 6b3d22e..4f16df4 100644
--- a/authorize.go
+++ b/authorize.go
@@ -1,6 +1,7 @@
package acme
import (
+ "log"
"sync"
"time"
)
@@ -68,7 +69,10 @@ func (p *Provider) authz(s Signer, domain string, sol map[ChalType]Solver) error
for _, ch := range req.Supported(sol) {
wg.Add(1)
go func(ch Challenge) {
- p.solve(s, ch, sol[ch.Type])
+ err := p.solve(s, ch, sol[ch.Type])
+ if err != nil {
+ log.Println(err)
+ }
wg.Done()
}(ch)
}
@@ -81,7 +85,10 @@ func (p *Provider) Authorize(s Signer, d *Desire) error {
for _, domain := range d.altnames {
wg.Add(1)
go func(domain string) {
- p.authz(s, domain, d.solver)
+ err := p.authz(s, domain, d.solver)
+ if err != nil {
+ log.Println(err)
+ }
wg.Done()
}(domain)
}
diff --git a/cmd/acme/main.go b/cmd/acme/main.go
index 50cbd3e..2b42356 100644
--- a/cmd/acme/main.go
+++ b/cmd/acme/main.go
@@ -124,9 +124,15 @@ func main() {
wg.Add(1)
go func(name string, des *desire) {
- des.provider.Authorize(des.account, des.Desire)
- des.provider.Bundle(des.account, des.Desire)
- des.Save(des.Cert, des.Key)
+ if err := des.provider.Authorize(des.account, des.Desire); err != nil {
+ log.Fatal(err)
+ }
+ if err := des.provider.Bundle(des.account, des.Desire); err != nil {
+ log.Fatal(err)
+ }
+ if err := des.Save(des.Cert, des.Key); err != nil {
+ log.Fatal(err)
+ }
wg.Done()
}(k, des)
}