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
This commit is contained in:
Jakob Unterwurzacher 2016-12-10 13:14:20 +01:00
parent 2758c75cae
commit 967e7bd125
2 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,6 @@
package stupidgcm package stupidgcm
import ( import (
"log"
"os" "os"
"github.com/rfjakob/gocryptfs/internal/tlog" "github.com/rfjakob/gocryptfs/internal/tlog"
@ -23,27 +22,26 @@ func errExit() {
func New(_ []byte) stupidGCM { func New(_ []byte) stupidGCM {
errExit() errExit()
// This panic is never reached, but having it here stops the Go compiler // Never reached
// from complaining about the missing return code. return stupidGCM{}
log.Panic("")
} }
func (g stupidGCM) NonceSize() int { func (g stupidGCM) NonceSize() int {
errExit() errExit()
log.Panic("") return -1
} }
func (g stupidGCM) Overhead() int { func (g stupidGCM) Overhead() int {
errExit() errExit()
log.Panic("") return -1
} }
func (g stupidGCM) Seal(_, _, _, _ []byte) []byte { func (g stupidGCM) Seal(_, _, _, _ []byte) []byte {
errExit() errExit()
log.Panic("") return nil
} }
func (g stupidGCM) Open(_, _, _, _ []byte) ([]byte, error) { func (g stupidGCM) Open(_, _, _, _ []byte) ([]byte, error) {
errExit() errExit()
log.Panic("") return nil, nil
} }

View File

@ -23,6 +23,7 @@ for i in $(cat /proc/mounts | grep $TESTDIR | cut -f2 -d" "); do
fusermount -u $i fusermount -u $i
done done
source build-without-openssl.bash
source build.bash source build.bash
go test ./... $* go test ./... $*