aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/without_openssl.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/stupidgcm/without_openssl.go')
-rw-r--r--internal/stupidgcm/without_openssl.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/stupidgcm/without_openssl.go b/internal/stupidgcm/without_openssl.go
index 81bae07..93efcb4 100644
--- a/internal/stupidgcm/without_openssl.go
+++ b/internal/stupidgcm/without_openssl.go
@@ -11,19 +11,22 @@ import (
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
)
-type StupidGCM struct{}
-
const (
// BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = true
)
func errExit() {
- fmt.Fprintln(os.Stderr, "gocryptfs has been compiled without openssl support but you are still trying to use openssl")
+ fmt.Fprintln(os.Stderr, "I have been compiled without openssl support but you are still trying to use openssl")
os.Exit(exitcodes.OpenSSL)
}
-func New(_ []byte, _ bool) cipher.AEAD {
+func NewAES256GCM(_ []byte, _ bool) cipher.AEAD {
+ errExit()
+ return nil
+}
+
+func NewChacha20poly1305(_ []byte) cipher.AEAD {
errExit()
return nil
}