Skip to content

Commit 960f555

Browse files
authored
fix: ensure certStore is initialised when adding custom cert (jetkvm#639)
Fixes: jetkvm#612
1 parent fe127ed commit 960f555

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_tls.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ func setTLSState(s TLSState) error {
108108
isChanged = true
109109
}
110110
// parse pem to cert and key
111+
if certStore == nil {
112+
initCertStore()
113+
}
111114
err, _ := certStore.ValidateAndSaveCertificate(webSecureCustomCertificateName, s.Certificate, s.PrivateKey, true)
112115
// warn doesn't matter as ... we don't know the hostname yet
113116
if err != nil {

0 commit comments

Comments
 (0)