aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/readpassword/trezor.go2
-rw-r--r--internal/readpassword/trezor_disabled.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/readpassword/trezor.go b/internal/readpassword/trezor.go
index 43e2805..a4d32cf 100644
--- a/internal/readpassword/trezor.go
+++ b/internal/readpassword/trezor.go
@@ -21,6 +21,8 @@ const (
trezorNonce = "" // the "nonce" is optional and has no use in here
trezorKeyName = "gocryptfs"
trezorKeyDerivationPath = `m/10019'/0'`
+ // TrezorSupport is true when gocryptfs has been compile with -tags enable_trezor
+ TrezorSupport = true
)
func trezorGetPin(title, description, ok, cancel string) ([]byte, error) {
diff --git a/internal/readpassword/trezor_disabled.go b/internal/readpassword/trezor_disabled.go
index c512f1b..96a6082 100644
--- a/internal/readpassword/trezor_disabled.go
+++ b/internal/readpassword/trezor_disabled.go
@@ -12,12 +12,14 @@ const (
// TrezorPayloadLen is the length of the payload data passed to Trezor's
// CipherKeyValue function.
TrezorPayloadLen = 32
+ // TrezorSupport is true when gocryptfs has been compile with -tags enable_trezor
+ TrezorSupport = false
)
// Trezor determinitically derives 32 bytes from the payload and the connected
// USB security module.
func Trezor(payload []byte) []byte {
- tlog.Fatal.Printf("\"-trezor\" is not implemented yet.")
+ tlog.Fatal.Printf("This binary has been compiled without Trezor support")
os.Exit(1)
return nil
}