2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 03:07:20 +08:00

feat: 添加LiteSSL支持

This commit is contained in:
2026-01-25 03:10:18 +08:00
parent 18ed104a5a
commit b1077d1d7a
5 changed files with 16 additions and 5 deletions

View File

@@ -515,6 +515,8 @@ func (r *certRepo) getClient(cert *biz.Cert) (*acme.Client, error) {
eab = &acme.EAB{KeyID: cert.Account.Kid, MACKey: cert.Account.HmacEncoded}
case "letsencrypt":
ca = acme.CALetsEncrypt
case "litessl":
ca = acme.CALiteSSL
case "buypass":
ca = acme.CABuypass
case "zerossl":

View File

@@ -88,6 +88,8 @@ func (r certAccountRepo) Create(ctx context.Context, req *request.CertAccountCre
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CAGoogle, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
case "letsencrypt":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALetsEncrypt, nil, acme.KeyType(account.KeyType), r.log)
case "litessl":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALiteSSL, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
case "buypass":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CABuypass, nil, acme.KeyType(account.KeyType), r.log)
case "zerossl":
@@ -150,6 +152,8 @@ func (r certAccountRepo) Update(ctx context.Context, req *request.CertAccountUpd
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CAGoogle, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
case "letsencrypt":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALetsEncrypt, nil, acme.KeyType(account.KeyType), r.log)
case "litessl":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALiteSSL, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
case "buypass":
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CABuypass, nil, acme.KeyType(account.KeyType), r.log)
case "zerossl":

View File

@@ -30,6 +30,14 @@ func (s *CertService) CAProviders(w http.ResponseWriter, r *http.Request) {
Label: "Let's Encrypt",
Value: "letsencrypt",
},
{
Label: "GoogleCN",
Value: "googlecn",
},
{
Label: "LiteSSL",
Value: "litessl",
},
{
Label: "ZeroSSL",
Value: "zerossl",
@@ -38,10 +46,6 @@ func (s *CertService) CAProviders(w http.ResponseWriter, r *http.Request) {
Label: "SSL.com",
Value: "sslcom",
},
{
Label: "GoogleCN",
Value: "googlecn",
},
{
Label: "Google",
Value: "google",

View File

@@ -22,6 +22,7 @@ const (
CAGoogle = "https://dv.acme-v02.api.pki.goog/directory"
CALetsEncryptStaging = "https://acme-staging-v02.api.letsencrypt.org/directory"
CALetsEncrypt = "https://acme-v02.api.letsencrypt.org/directory"
CALiteSSL = "https://acme.litessl.com/acme/v2/directory"
CAZeroSSL = "https://acme.zerossl.com/v2/DV90"
CABuypass = "https://api.buypass.com/acme/directory"
CASSLcom = "https://acme.ssl.com/sslcom-dv-rsa"

View File

@@ -31,7 +31,7 @@ const model = ref<any>({
})
const showEAB = computed(() => {
return model.value.ca === 'google' || model.value.ca === 'sslcom'
return model.value.ca === 'google' || model.value.ca === 'litessl' || model.value.ca === 'sslcom'
})
const handleCreateAccount = () => {