summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-04 22:29:14 +0200
committerJakob Unterwurzacher2016-10-04 22:34:12 +0200
commitdb5782028aaff99dbf15c62d851a4f6ec8227748 (patch)
tree78fddba641b4f84ec99ed22dadecb50df1eb9809 /internal
parentb80d01056f35b2d062e73a6c7d4ba3cff3b6ef7e (diff)
tests: skip tests with -openssl=false on Go 1.4 and lower
Go versions 1.4 and lower lack NewGCMWithNonceSize(), which causes a panic in the test.
Diffstat (limited to 'internal')
-rw-r--r--internal/cryptocore/gcm_go1.4.go4
-rw-r--r--internal/cryptocore/gcm_go1.5.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/internal/cryptocore/gcm_go1.4.go b/internal/cryptocore/gcm_go1.4.go
index f7b77b2..6b494d7 100644
--- a/internal/cryptocore/gcm_go1.4.go
+++ b/internal/cryptocore/gcm_go1.4.go
@@ -10,6 +10,10 @@ import (
"github.com/rfjakob/gocryptfs/internal/tlog"
)
+const (
+ HaveModernGoGCM = false
+)
+
// goGCMWrapper - This wrapper makes sure gocryptfs can be compiled on Go
// versions 1.4 and lower that lack NewGCMWithNonceSize().
// 128 bit GCM IVs will not work when using built-in Go crypto, obviously, when
diff --git a/internal/cryptocore/gcm_go1.5.go b/internal/cryptocore/gcm_go1.5.go
index 0c9b1a5..6e67d21 100644
--- a/internal/cryptocore/gcm_go1.5.go
+++ b/internal/cryptocore/gcm_go1.5.go
@@ -7,6 +7,10 @@ import (
"crypto/cipher"
)
+const (
+ HaveModernGoGCM = true
+)
+
// goGCMWrapper - This wrapper makes sure gocryptfs can be compiled on Go
// versions 1.4 and lower that lack NewGCMWithNonceSize().
// 128 bit GCM IVs will not work when using built-in Go crypto, obviously, when