mirror of
https://git.vectorsigma.ru/public/AdGuardHome.git
synced 2026-07-28 23:59:02 +00:00
all: fix tls warning
This commit is contained in:
@@ -17,6 +17,11 @@ See also the [v0.107.66 GitHub milestone][ms-v0.107.66].
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
@@ -907,11 +907,12 @@ func (m *tlsManager) validateCertificate(
|
||||
certChain []byte,
|
||||
serverName string,
|
||||
) (ok bool, err error) {
|
||||
var parseErr error
|
||||
var certs []*x509.Certificate
|
||||
certs, status.ValidCert, err = m.parseCertChain(ctx, certChain)
|
||||
certs, status.ValidCert, parseErr = m.parseCertChain(ctx, certChain)
|
||||
if !status.ValidCert {
|
||||
// Don't wrap the error, since it's informative enough as is.
|
||||
return false, err
|
||||
return false, parseErr
|
||||
}
|
||||
|
||||
mainCert := certs[0]
|
||||
@@ -930,7 +931,7 @@ func (m *tlsManager) validateCertificate(
|
||||
|
||||
status.ValidChain = true
|
||||
|
||||
return true, nil
|
||||
return true, parseErr
|
||||
}
|
||||
|
||||
// Key types.
|
||||
|
||||
Reference in New Issue
Block a user