Skip to content

Commit 4a825c0

Browse files
authored
fix: darwin arm64 always has AESGCMHardwareSupport (#5176)
refraction-networking/utls#371
1 parent 514c9e5 commit 4a825c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/protocol/headers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ type ResponseHeader struct {
7373
var (
7474
// Keep in sync with crypto/tls/cipher_suites.go.
7575
hasGCMAsmAMD64 = cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ && cpu.X86.HasSSE41 && cpu.X86.HasSSSE3
76-
hasGCMAsmARM64 = cpu.ARM64.HasAES && cpu.ARM64.HasPMULL
76+
hasGCMAsmARM64 = (cpu.ARM64.HasAES && cpu.ARM64.HasPMULL) || (runtime.GOOS == "darwin" && runtime.GOARCH == "arm64")
7777
hasGCMAsmS390X = cpu.S390X.HasAES && cpu.S390X.HasAESCTR && cpu.S390X.HasGHASH
7878
hasGCMAsmPPC64 = runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"
7979

0 commit comments

Comments
 (0)