aboutsummaryrefslogtreecommitdiff
path: root/internal/prefer_openssl/prefer_go1.6.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-12-10 21:04:17 +0100
committerJakob Unterwurzacher2016-12-10 21:04:17 +0100
commit8be54bf3f8c011f2d0635017f01883af6563b482 (patch)
treeb383f93934e7103be6d311ecb328b5b9e607fad1 /internal/prefer_openssl/prefer_go1.6.go
parent12374be9c51b0298c85751e4652fe4e852c85546 (diff)
prefer_openssl: default to Go GCM on OSX
Diffstat (limited to 'internal/prefer_openssl/prefer_go1.6.go')
-rw-r--r--internal/prefer_openssl/prefer_go1.6.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/prefer_openssl/prefer_go1.6.go b/internal/prefer_openssl/prefer_go1.6.go
index a5a67fb..e69da39 100644
--- a/internal/prefer_openssl/prefer_go1.6.go
+++ b/internal/prefer_openssl/prefer_go1.6.go
@@ -4,6 +4,8 @@
package prefer_openssl
import (
+ "runtime"
+
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
)
@@ -17,5 +19,11 @@ func PreferOpenSSL() bool {
if stupidgcm.BuiltWithoutOpenssl {
return false
}
+ if runtime.GOOS == "darwin" {
+ // OSX does not have /proc/cpuinfo, let's just assume the CPU has AES
+ // acceleration. Virtually all Macs that are running today have it I
+ // guess?
+ return false
+ }
return filePreferOpenSSL("/proc/cpuinfo")
}