aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/batch/main.go6
-rw-r--r--signer.go4
2 files changed, 8 insertions, 2 deletions
diff --git a/cmd/batch/main.go b/cmd/batch/main.go
index 964f6f3..58f437e 100644
--- a/cmd/batch/main.go
+++ b/cmd/batch/main.go
@@ -36,7 +36,11 @@ func main() {
log.Println("Skip", c)
continue
}
- csr, err := acme.NewCSR(c.PrivateKey, c.Leaf.DNSNames, acme.GetMail(c.Leaf))
+ mail := acme.GetMail(c.Leaf)
+ if mail == "" {
+ continue
+ }
+ csr, err := acme.NewCSR(c.PrivateKey, c.Leaf.DNSNames, mail)
if err != nil {
log.Println(err)
continue
diff --git a/signer.go b/signer.go
index f72cd3c..f9c0378 100644
--- a/signer.go
+++ b/signer.go
@@ -83,7 +83,9 @@ func (s Signer) RoundTrip(req *http.Request) (*http.Response, error) {
if err != nil {
return nil, err
}
- req.Body = ioutil.NopCloser(strings.NewReader(obj.FullSerialize()))
+ signed := obj.FullSerialize()
+ req.ContentLength = int64(len(signed))
+ req.Body = ioutil.NopCloser(strings.NewReader(signed))
}
resp, err := http.DefaultTransport.RoundTrip(req)
if err != nil {