2023-02-26 10:02:30 +00:00
|
|
|
package certs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/url"
|
|
|
|
|
|
|
|
"github.com/go-acme/lego/v4/lego"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
email = "admin@local-ip.sh"
|
2023-02-26 13:06:15 +00:00
|
|
|
caDirUrl = lego.LEDirectoryProduction
|
2023-02-26 10:02:30 +00:00
|
|
|
)
|
|
|
|
|
2023-12-12 21:25:39 +00:00
|
|
|
var (
|
|
|
|
parsedCaDirUrl, _ = url.Parse(caDirUrl)
|
|
|
|
caDirHostname = parsedCaDirUrl.Hostname()
|
|
|
|
accountFilePath = fmt.Sprintf("./.lego/accounts/%s/%s/account.json", caDirHostname, email)
|
|
|
|
keyFilePath = fmt.Sprintf("./.lego/accounts/%s/%s/keys/%s.key", caDirHostname, email, email)
|
|
|
|
)
|