github.com/metacubex/mihomo@v1.18.5/component/ca/fix_windows.go (about)

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