fix_windows.go 422 B

1234567891011121314
  1. package ca
  2. import (
  3. "github.com/metacubex/mihomo/constant/features"
  4. )
  5. func init() {
  6. // crypto/x509: certificate validation in Windows fails to validate IP in SAN
  7. // https://github.com/golang/go/issues/37176
  8. // As far as I can tell this is still the case on most older versions of Windows (but seems to be fixed in 10)
  9. if features.WindowsMajorVersion < 10 && len(_CaCertificates) > 0 {
  10. DisableSystemCa = true
  11. }
  12. }