aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-12-10 13:14:20 +0100
committerJakob Unterwurzacher2016-12-10 13:15:19 +0100
commit967e7bd125bf04e2b72fba90ee8f6055d739a969 (patch)
tree6a9fa8b01ade1df46abce816dbbe8c8d6bc64763 /internal
parent2758c75cae2896b7f1327fe00f60a1c017c0e0d1 (diff)
stupidgcm: Fix without_openssl build failure
Also, always call build-without-openssl.bash from test.bash. Failure was: internal/stupidgcm/without_openssl.go:29: missing return at end of function
Diffstat (limited to 'internal')
-rw-r--r--internal/stupidgcm/without_openssl.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go
index 9fb245e..406168c 100644
--- a/internal/stupidgcm/without_openssl.go
+++ b/internal/stupidgcm/without_openssl.go
@@ -3,7 +3,6 @@
package stupidgcm
import (
- "log"
"os"
"github.com/rfjakob/gocryptfs/internal/tlog"
@@ -23,27 +22,26 @@ func errExit() {
func New(_ []byte) stupidGCM {
errExit()
- // This panic is never reached, but having it here stops the Go compiler
- // from complaining about the missing return code.
- log.Panic("")
+ // Never reached
+ return stupidGCM{}
}
func (g stupidGCM) NonceSize() int {
errExit()
- log.Panic("")
+ return -1
}
func (g stupidGCM) Overhead() int {
errExit()
- log.Panic("")
+ return -1
}
func (g stupidGCM) Seal(_, _, _, _ []byte) []byte {
errExit()
- log.Panic("")
+ return nil
}
func (g stupidGCM) Open(_, _, _, _ []byte) ([]byte, error) {
errExit()
- log.Panic("")
+ return nil, nil
}