aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/internal/cipherhw/cipherhw_amd64.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/internal/cipherhw/cipherhw_amd64.go')
-rw-r--r--src/crypto/internal/cipherhw/cipherhw_amd64.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crypto/internal/cipherhw/cipherhw_amd64.go b/src/crypto/internal/cipherhw/cipherhw_amd64.go
index be0d490a22..a1267b17a2 100644
--- a/src/crypto/internal/cipherhw/cipherhw_amd64.go
+++ b/src/crypto/internal/cipherhw/cipherhw_amd64.go
@@ -6,11 +6,19 @@
package cipherhw
+import "crypto/internal/boring"
+
// defined in asm_amd64.s
func hasAESNI() bool
// AESGCMSupport returns true if the Go standard library supports AES-GCM in
// hardware.
func AESGCMSupport() bool {
+ // If BoringCrypto is enabled, we report having
+ // AES-GCM support, so that crypto/tls will
+ // prioritize AES-GCM usage.
+ if boring.Enabled {
+ return true
+ }
return hasAESNI()
}