mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
fix: auto cert nil ptr issue
This commit is contained in:
parent
621772bafa
commit
c18f8f0b27
1 changed files with 6 additions and 3 deletions
|
@ -75,14 +75,17 @@ func autoCert(certModel *model.Cert) {
|
|||
ChallengeMethod: certModel.ChallengeMethod,
|
||||
DNSCredentialID: certModel.DnsCredentialID,
|
||||
KeyType: certModel.GetKeyType(),
|
||||
Resource: &model.CertificateResource{
|
||||
NotBefore: cert.NotBefore,
|
||||
}
|
||||
|
||||
if certModel.Resource != nil {
|
||||
payload.Resource = &model.CertificateResource{
|
||||
Resource: certModel.Resource.Resource,
|
||||
PrivateKey: certModel.Resource.PrivateKey,
|
||||
Certificate: certModel.Resource.Certificate,
|
||||
IssuerCertificate: certModel.Resource.IssuerCertificate,
|
||||
CSR: certModel.Resource.CSR,
|
||||
},
|
||||
NotBefore: cert.NotBefore,
|
||||
}
|
||||
}
|
||||
|
||||
// errChan will be closed inside IssueCert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue