From 56c0b19612dd25b84474211c1a84897fe89ce7d4 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 4 Oct 2016 09:51:14 +0200 Subject: without_openssl: support compiling completely without openssl Build helper script: build-without-openssl.bash --- internal/prefer_openssl/prefer_go1.6.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/prefer_openssl/prefer_go1.6.go') diff --git a/internal/prefer_openssl/prefer_go1.6.go b/internal/prefer_openssl/prefer_go1.6.go index 898db0c..a5a67fb 100644 --- a/internal/prefer_openssl/prefer_go1.6.go +++ b/internal/prefer_openssl/prefer_go1.6.go @@ -3,6 +3,10 @@ package prefer_openssl +import ( + "github.com/rfjakob/gocryptfs/internal/stupidgcm" +) + // PreferOpenSSL tells us if OpenSSL is faster than Go GCM on this machine. // Go GCM is faster when the CPU has AES instructions and Go is v1.6 or higher // on amd64. @@ -10,5 +14,8 @@ package prefer_openssl // See https://github.com/rfjakob/gocryptfs/issues/23#issuecomment-218286502 // for benchmarks. func PreferOpenSSL() bool { + if stupidgcm.BuiltWithoutOpenssl { + return false + } return filePreferOpenSSL("/proc/cpuinfo") } -- cgit v1.2.3