This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a prefix for client session cache keys
This prevents cross-protocol ticket reuse (when the same Config is used for TCP and QUIC).
- Loading branch information
1 parent
97fbf25
commit 9b58331
Showing
4 changed files
with
38 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//go:build !js | ||
// +build !js | ||
|
||
package qtls | ||
|
||
import ( | ||
"runtime" | ||
|
||
"golang.org/x/sys/cpu" | ||
) | ||
|
||
var ( | ||
hasGCMAsmAMD64 = cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ | ||
hasGCMAsmARM64 = cpu.ARM64.HasAES && cpu.ARM64.HasPMULL | ||
// Keep in sync with crypto/aes/cipher_s390x.go. | ||
hasGCMAsmS390X = cpu.S390X.HasAES && cpu.S390X.HasAESCBC && cpu.S390X.HasAESCTR && | ||
(cpu.S390X.HasGHASH || cpu.S390X.HasAESGCM) | ||
|
||
hasAESGCMHardwareSupport = runtime.GOARCH == "amd64" && hasGCMAsmAMD64 || | ||
runtime.GOARCH == "arm64" && hasGCMAsmARM64 || | ||
runtime.GOARCH == "s390x" && hasGCMAsmS390X | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build js | ||
// +build js | ||
|
||
package qtls | ||
|
||
var ( | ||
hasGCMAsmAMD64 = false | ||
hasGCMAsmARM64 = false | ||
hasGCMAsmS390X = false | ||
|
||
hasAESGCMHardwareSupport = false | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters