1
mirror of https://github.com/XTLS/Xray-core.git synced 2025-12-12 20:49:48 +04:00

fix: darwin arm64 always has AESGCMHardwareSupport (#5176)

https://github.com/refraction-networking/utls/pull/371
This commit is contained in:
wwqgtxx
2025-10-06 08:14:45 +08:00
committed by GitHub
parent 514c9e5a22
commit 4a825c0260

View File

@@ -73,7 +73,7 @@ type ResponseHeader struct {
var (
// Keep in sync with crypto/tls/cipher_suites.go.
hasGCMAsmAMD64 = cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ && cpu.X86.HasSSE41 && cpu.X86.HasSSSE3
hasGCMAsmARM64 = cpu.ARM64.HasAES && cpu.ARM64.HasPMULL
hasGCMAsmARM64 = (cpu.ARM64.HasAES && cpu.ARM64.HasPMULL) || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm64")
hasGCMAsmS390X = cpu.S390X.HasAES && cpu.S390X.HasAESCTR && cpu.S390X.HasGHASH
hasGCMAsmPPC64 = runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"