mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-13 21:48:02 +08:00
16 lines
441 B
Go
16 lines
441 B
Go
package ca
|
|
|
|
import (
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func init() {
|
|
majorVersion, _, _ := windows.RtlGetNtVersionNumbers()
|
|
// crypto/x509: certificate validation in Windows fails to validate IP in SAN
|
|
// https://github.com/golang/go/issues/37176
|
|
// As far as I can tell this is still the case on most older versions of Windows (but seems to be fixed in 10)
|
|
if majorVersion < 10 && len(_CaCertificates) > 0 {
|
|
DisableSystemCa = true
|
|
}
|
|
}
|