[dev.boringcrypto] crypto/internal/cipherhw: fix AESGCMSupport for BoringCrypto

The override was not commented and was in the wrong file.

Change-Id: I739db561acff6d91b0f3559c8bb45437f11c0b04
Reviewed-on: https://go-review.googlesource.com/59250
Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
Russ Cox 2017-08-25 21:24:15 -04:00
parent f48a9fb815
commit 9c307d8039
2 changed files with 9 additions and 3 deletions

View file

@ -6,11 +6,19 @@
package cipherhw package cipherhw
import "crypto/internal/boring"
// defined in asm_amd64.s // defined in asm_amd64.s
func hasAESNI() bool func hasAESNI() bool
// AESGCMSupport returns true if the Go standard library supports AES-GCM in // AESGCMSupport returns true if the Go standard library supports AES-GCM in
// hardware. // hardware.
func AESGCMSupport() bool { 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() return hasAESNI()
} }

View file

@ -6,8 +6,6 @@
package cipherhw package cipherhw
import "crypto/internal/boring"
func AESGCMSupport() bool { func AESGCMSupport() bool {
return boring.Enabled return false
} }