summaryrefslogtreecommitdiff
path: root/internal/readpassword/trezor_disabled.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-08-15 23:31:37 +0200
committerJakob Unterwurzacher2018-08-15 23:31:37 +0200
commitbd054e70ef1c0f9709b5bc216ba148cf088d7edb (patch)
tree0cef30f59c72082d20fa361567b1cc0ef1cd0413 /internal/readpassword/trezor_disabled.go
parent7771a33f659420b76b5f49eeda80b3f6d7728425 (diff)
trezor: show support in version string
Show enable_trezor in the version string if we were compiled with `-tags enable_trezor`. And hide the `-trezor` flag from the help output if we were not.
Diffstat (limited to 'internal/readpassword/trezor_disabled.go')
-rw-r--r--internal/readpassword/trezor_disabled.go4
1 files changed, 3 insertions, 1 deletions
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
}