Use bundled certs to complete the chain
This commit is contained in:
parent
4b70b9968b
commit
2c26ced716
|
@ -58,7 +58,7 @@ func Run(dir, domain, email, port string, onChange func()) (string, string, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
func obtain(client *acme.Client, domain string) error {
|
func obtain(client *acme.Client, domain string) error {
|
||||||
cert, errors := client.ObtainCertificate([]string{domain}, false)
|
cert, errors := client.ObtainCertificate([]string{domain}, true)
|
||||||
if err := errors[domain]; err != nil {
|
if err := errors[domain]; err != nil {
|
||||||
if _, ok := err.(acme.TOSError); ok {
|
if _, ok := err.(acme.TOSError); ok {
|
||||||
err := client.AgreeToTOS()
|
err := client.AgreeToTOS()
|
||||||
|
@ -112,7 +112,7 @@ func renew(client *acme.Client, domain string) bool {
|
||||||
meta.PrivateKey = key
|
meta.PrivateKey = key
|
||||||
|
|
||||||
Renew:
|
Renew:
|
||||||
newMeta, err := client.RenewCertificate(meta, false)
|
newMeta, err := client.RenewCertificate(meta, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if _, ok := err.(acme.TOSError); ok {
|
if _, ok := err.(acme.TOSError); ok {
|
||||||
err := client.AgreeToTOS()
|
err := client.AgreeToTOS()
|
||||||
|
|
Loading…
Reference in New Issue