aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/cryptocore/gcm_go1.4.go1
-rw-r--r--internal/cryptocore/gcm_go1.5.go1
-rw-r--r--internal/stupidgcm/stupidgcm.go2
-rw-r--r--internal/stupidgcm/without_openssl.go2
-rw-r--r--internal/syscallcompat/sys_linux.go4
-rw-r--r--internal/tlog/log.go7
6 files changed, 10 insertions, 7 deletions
diff --git a/internal/cryptocore/gcm_go1.4.go b/internal/cryptocore/gcm_go1.4.go
index 6b494d7..c1aa488 100644
--- a/internal/cryptocore/gcm_go1.4.go
+++ b/internal/cryptocore/gcm_go1.4.go
@@ -11,6 +11,7 @@ import (
)
const (
+ // HaveModernGoGCM indicates if Go GCM supports 128-bit nonces
HaveModernGoGCM = false
)
diff --git a/internal/cryptocore/gcm_go1.5.go b/internal/cryptocore/gcm_go1.5.go
index 6e67d21..3c38357 100644
--- a/internal/cryptocore/gcm_go1.5.go
+++ b/internal/cryptocore/gcm_go1.5.go
@@ -8,6 +8,7 @@ import (
)
const (
+ // HaveModernGoGCM indicates if Go GCM supports 128-bit nonces
HaveModernGoGCM = true
)
diff --git a/internal/stupidgcm/stupidgcm.go b/internal/stupidgcm/stupidgcm.go
index 58027f8..6e551f5 100644
--- a/internal/stupidgcm/stupidgcm.go
+++ b/internal/stupidgcm/stupidgcm.go
@@ -16,7 +16,7 @@ import (
)
const (
- // Has openssl been disabled at compile-time?
+ // BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = false
keyLen = 32
diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go
index 0b3cf90..91dd33c 100644
--- a/internal/stupidgcm/without_openssl.go
+++ b/internal/stupidgcm/without_openssl.go
@@ -11,7 +11,7 @@ import (
type stupidGCM struct{}
const (
- // Has openssl been disabled at compile-time?
+ // BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = true
)
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index c9f6ee0..93516f3 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -8,7 +8,7 @@ import (
"github.com/rfjakob/gocryptfs/internal/tlog"
)
-const FALLOC_FL_KEEP_SIZE = 0x01
+const _FALLOC_FL_KEEP_SIZE = 0x01
var preallocWarn sync.Once
@@ -17,7 +17,7 @@ var preallocWarn sync.Once
// ciphertext block (that would corrupt the block).
func EnospcPrealloc(fd int, off int64, len int64) (err error) {
for {
- err = syscall.Fallocate(fd, FALLOC_FL_KEEP_SIZE, off, len)
+ err = syscall.Fallocate(fd, _FALLOC_FL_KEEP_SIZE, off, len)
if err == syscall.EINTR {
// fallocate, like many syscalls, can return EINTR. This is not an
// error and just signifies that the operation was interrupted by a
diff --git a/internal/tlog/log.go b/internal/tlog/log.go
index 8db3de2..4ab5d79 100644
--- a/internal/tlog/log.go
+++ b/internal/tlog/log.go
@@ -74,15 +74,16 @@ func (l *toggledLogger) Println(v ...interface{}) {
}
}
-// Debug messages
+// Debug logs debug messages
// Can be enabled by passing "-d"
var Debug *toggledLogger
-// Informational message
+// Info logs informational message
// Can be disabled by passing "-q"
var Info *toggledLogger
-// A warning, meaning nothing serious by itself but might indicate problems.
+// Warn logs warnings,
+// meaning nothing serious by itself but might indicate problems.
// Passing "-wpanic" will make this function panic after printing the message.
var Warn *toggledLogger