libgocryptfs/internal/stupidgcm/without_openssl.go
Jakob Unterwurzacher d023cd6c95 cli: drop -forcedecode flag
The rewritten openssl backend does not support this flag anymore,
and it was inherently dangerour. Drop it (ignored for compatibility)
2021-09-10 12:14:19 +02:00

38 lines
637 B
Go

// +build without_openssl
package stupidgcm
import (
"fmt"
"os"
"crypto/cipher"
"github.com/rfjakob/gocryptfs/v2/internal/exitcodes"
)
const (
// BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = true
)
func errExit() {
fmt.Fprintln(os.Stderr, "I have been compiled without openssl support but you are still trying to use openssl")
os.Exit(exitcodes.OpenSSL)
}
func NewAES256GCM(_ []byte) cipher.AEAD {
errExit()
return nil
}
func NewChacha20poly1305(_ []byte) cipher.AEAD {
errExit()
return nil
}
func NewXchacha20poly1305(_ []byte) cipher.AEAD {
errExit()
return nil
}