Skip to content

Commit 5b8b0f0

Browse files
committed
feat: 移除buypass
1 parent 1a4b377 commit 5b8b0f0

File tree

6 files changed

+3
-14
lines changed

6 files changed

+3
-14
lines changed

internal/biz/cert_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type CertAccount struct {
1111
ID uint `gorm:"primaryKey" json:"id"`
1212
Email string `gorm:"not null;default:''" json:"email"`
13-
CA string `gorm:"not null;default:'letsencrypt'" json:"ca"` // CA 提供商 (letsencrypt, zerossl, sslcom, google, buypass)
13+
CA string `gorm:"not null;default:'letsencrypt'" json:"ca"` // CA 提供商 (letsencrypt, zerossl, sslcom, google)
1414
Kid string `gorm:"not null;default:''" json:"kid"`
1515
HmacEncoded string `gorm:"not null;default:''" json:"hmac_encoded"`
1616
PrivateKey string `gorm:"not null;default:''" json:"private_key"`

internal/data/cert.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,6 @@ func (r *certRepo) getClient(cert *biz.Cert) (*acme.Client, error) {
582582
ca = acme.CALetsEncrypt
583583
case "litessl":
584584
ca = acme.CALiteSSL
585-
case "buypass":
586-
ca = acme.CABuypass
587585
case "zerossl":
588586
ca = acme.CAZeroSSL
589587
eab = &acme.EAB{KeyID: cert.Account.Kid, MACKey: cert.Account.HmacEncoded}

internal/data/cert_account.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ func (r certAccountRepo) Create(ctx context.Context, req *request.CertAccountCre
9090
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALetsEncrypt, nil, acme.KeyType(account.KeyType), r.log)
9191
case "litessl":
9292
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALiteSSL, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
93-
case "buypass":
94-
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CABuypass, nil, acme.KeyType(account.KeyType), r.log)
9593
case "zerossl":
9694
eab, eabErr := r.getZeroSSLEAB(account.Email)
9795
if eabErr != nil {
@@ -154,8 +152,6 @@ func (r certAccountRepo) Update(ctx context.Context, req *request.CertAccountUpd
154152
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALetsEncrypt, nil, acme.KeyType(account.KeyType), r.log)
155153
case "litessl":
156154
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CALiteSSL, &acme.EAB{KeyID: account.Kid, MACKey: account.HmacEncoded}, acme.KeyType(account.KeyType), r.log)
157-
case "buypass":
158-
client, err = acme.NewRegisterAccount(context.Background(), account.Email, acme.CABuypass, nil, acme.KeyType(account.KeyType), r.log)
159155
case "zerossl":
160156
eab, eabErr := r.getZeroSSLEAB(account.Email)
161157
if eabErr != nil {

internal/http/request/cert_account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package request
22

33
type CertAccountCreate struct {
4-
CA string `form:"ca" json:"ca" validate:"required|in:googlecn,google,letsencrypt,litessl,buypass,zerossl,sslcom"`
4+
CA string `form:"ca" json:"ca" validate:"required|in:googlecn,google,letsencrypt,litessl,zerossl,sslcom"`
55
Email string `form:"email" json:"email" validate:"required"`
66
Kid string `form:"kid" json:"kid"`
77
HmacEncoded string `form:"hmac_encoded" json:"hmac_encoded"`
@@ -10,7 +10,7 @@ type CertAccountCreate struct {
1010

1111
type CertAccountUpdate struct {
1212
ID uint `form:"id" json:"id" validate:"required|exists:cert_accounts,id"`
13-
CA string `form:"ca" json:"ca" validate:"required|in:googlecn,google,letsencrypt,litessl,buypass,zerossl,sslcom"`
13+
CA string `form:"ca" json:"ca" validate:"required|in:googlecn,google,letsencrypt,litessl,zerossl,sslcom"`
1414
Email string `form:"email" json:"email" validate:"required"`
1515
Kid string `form:"kid" json:"kid"`
1616
HmacEncoded string `form:"hmac_encoded" json:"hmac_encoded"`

internal/service/cert.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ func (s *CertService) CAProviders(w http.ResponseWriter, r *http.Request) {
5050
Label: "Google",
5151
Value: "google",
5252
},
53-
{
54-
Label: "Buypass",
55-
Value: "buypass",
56-
},
5753
})
5854

5955
}

pkg/acme/acme.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const (
2424
CALetsEncrypt = "https://acme-v02.api.letsencrypt.org/directory"
2525
CALiteSSL = "https://acme.litessl.com/acme/v2/directory"
2626
CAZeroSSL = "https://acme.zerossl.com/v2/DV90"
27-
CABuypass = "https://api.buypass.com/acme/directory"
2827
CASSLcom = "https://acme.ssl.com/sslcom-dv-rsa"
2928
)
3029

0 commit comments

Comments
 (0)