feat: using renewal api to renew certificate #319

This commit is contained in:
Jacky 2024-04-30 19:48:48 +08:00
parent e3876cffaf
commit e16b077d20
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
11 changed files with 173 additions and 71 deletions

View file

@ -83,6 +83,14 @@ func IssueCert(c *gin.Context) {
return
}
certInfo, err := cert.GetCertInfo(certModel.SSLCertificatePath)
if err != nil {
logger.Error("get certificate info error", err)
return
}
payload.Resource = certModel.Resource
payload.NotBefore = certInfo.NotBefore
logChan := make(chan string, 1)
errChan := make(chan error, 1)
@ -126,6 +134,7 @@ func IssueCert(c *gin.Context) {
KeyType: payload.KeyType,
ChallengeMethod: payload.ChallengeMethod,
DnsCredentialID: payload.DNSCredentialID,
Resource: payload.Resource,
})
if err != nil {