mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +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,
|
ChallengeMethod: certModel.ChallengeMethod,
|
||||||
DNSCredentialID: certModel.DnsCredentialID,
|
DNSCredentialID: certModel.DnsCredentialID,
|
||||||
KeyType: certModel.GetKeyType(),
|
KeyType: certModel.GetKeyType(),
|
||||||
Resource: &model.CertificateResource{
|
NotBefore: cert.NotBefore,
|
||||||
|
}
|
||||||
|
|
||||||
|
if certModel.Resource != nil {
|
||||||
|
payload.Resource = &model.CertificateResource{
|
||||||
Resource: certModel.Resource.Resource,
|
Resource: certModel.Resource.Resource,
|
||||||
PrivateKey: certModel.Resource.PrivateKey,
|
PrivateKey: certModel.Resource.PrivateKey,
|
||||||
Certificate: certModel.Resource.Certificate,
|
Certificate: certModel.Resource.Certificate,
|
||||||
IssuerCertificate: certModel.Resource.IssuerCertificate,
|
IssuerCertificate: certModel.Resource.IssuerCertificate,
|
||||||
CSR: certModel.Resource.CSR,
|
CSR: certModel.Resource.CSR,
|
||||||
},
|
}
|
||||||
NotBefore: cert.NotBefore,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// errChan will be closed inside IssueCert
|
// errChan will be closed inside IssueCert
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue