diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/batch/main.go | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/cmd/batch/main.go b/cmd/batch/main.go index dbe1195..222d4d7 100644 --- a/cmd/batch/main.go +++ b/cmd/batch/main.go @@ -18,7 +18,6 @@ func main() { if err != nil { log.Fatal(err) } - _ = prov for _, c := range crt { if c.IsValid(*graceTime) && !*force { @@ -33,7 +32,33 @@ func main() { _ = csr } if len(*emails) > 0 && len(*domains) > 0 { + key, err := acme.NewKey(*keySize) + if err != nil { + log.Fatal(err) + } + sig, err := acme.NewSigner(key) + if err != nil { + log.Fatal(err) + } + var con acme.Contacts + for _, email := range *emails { + m, err := acme.NewMail(email) + if err != nil { + log.Fatal(err) + } + con = append(con, m) + } + log.Println("Register", con) + err = prov.Register(sig, con, agree) + if err != nil { + log.Fatal(err) + } log.Println(*emails) log.Println(*domains) } } + +func agree(tos string) bool { + log.Println("Agree to", tos) + return true +} |