mirror of
https://github.com/jetkvm/kvm.git
synced 2025-09-16 08:38:14 +00:00
fix: ensure certStore is initialised when adding custom cert (#639)
Fixes: #612
This commit is contained in:
parent
fe127ed41c
commit
960f555790
@ -108,6 +108,9 @@ func setTLSState(s TLSState) error {
|
|||||||
isChanged = true
|
isChanged = true
|
||||||
}
|
}
|
||||||
// parse pem to cert and key
|
// parse pem to cert and key
|
||||||
|
if certStore == nil {
|
||||||
|
initCertStore()
|
||||||
|
}
|
||||||
err, _ := certStore.ValidateAndSaveCertificate(webSecureCustomCertificateName, s.Certificate, s.PrivateKey, true)
|
err, _ := certStore.ValidateAndSaveCertificate(webSecureCustomCertificateName, s.Certificate, s.PrivateKey, true)
|
||||||
// warn doesn't matter as ... we don't know the hostname yet
|
// warn doesn't matter as ... we don't know the hostname yet
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user