all: fix tls warning

This commit is contained in:
Stanislav Chzhen
2025-08-27 13:42:25 +03:00
parent 613a4b97b9
commit ab84e3be17
2 changed files with 9 additions and 3 deletions

View File

@@ -17,6 +17,11 @@ See also the [v0.107.66 GitHub milestone][ms-v0.107.66].
NOTE: Add new changes BELOW THIS COMMENT. NOTE: Add new changes BELOW THIS COMMENT.
--> -->
### Fixed
- Missing warning on the *Encryption Settings* page when using a certificate without an IP address.
<!-- <!--
NOTE: Add new changes ABOVE THIS COMMENT. NOTE: Add new changes ABOVE THIS COMMENT.
--> -->

View File

@@ -907,11 +907,12 @@ func (m *tlsManager) validateCertificate(
certChain []byte, certChain []byte,
serverName string, serverName string,
) (ok bool, err error) { ) (ok bool, err error) {
var parseErr error
var certs []*x509.Certificate var certs []*x509.Certificate
certs, status.ValidCert, err = m.parseCertChain(ctx, certChain) certs, status.ValidCert, parseErr = m.parseCertChain(ctx, certChain)
if !status.ValidCert { if !status.ValidCert {
// Don't wrap the error, since it's informative enough as is. // Don't wrap the error, since it's informative enough as is.
return false, err return false, parseErr
} }
mainCert := certs[0] mainCert := certs[0]
@@ -930,7 +931,7 @@ func (m *tlsManager) validateCertificate(
status.ValidChain = true status.ValidChain = true
return true, nil return true, parseErr
} }
// Key types. // Key types.