mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: using renewal api to renew certificate #319
This commit is contained in:
parent
e3876cffaf
commit
e16b077d20
11 changed files with 173 additions and 71 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue