summaryrefslogtreecommitdiff
path: root/internal/readpassword/trezor_disabled.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-07-01 21:07:50 +0200
committerJakob Unterwurzacher2018-07-01 21:48:51 +0200
commit5243cd0e0d90c8a8aca735e06302d5a9d891a8a6 (patch)
tree7cc77760a285674ebb98018f36c284be1f621c32 /internal/readpassword/trezor_disabled.go
parent2d68b06f9dab66b2a0a6c29c8d5450e2b1d43fae (diff)
trezor: hide behind compile tag
The trezor libraries are not yet stable enough to build gocryptfs with trezor support by default. It does not even compile at the moment: $ ./build.bash -tags enable_trezor # github.com/conejoninja/tesoro/vendor/github.com/trezor/usbhid ../../conejoninja/tesoro/vendor/github.com/trezor/usbhid/hid.go:32:11: fatal error: os/threads_posix.c: No such file or directory #include "os/threads_posix.c" ^~~~~~~~~~~~~~~~~~~~ compilation terminated. https://github.com/conejoninja/tesoro/issues/9
Diffstat (limited to 'internal/readpassword/trezor_disabled.go')
-rw-r--r--internal/readpassword/trezor_disabled.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/readpassword/trezor_disabled.go b/internal/readpassword/trezor_disabled.go
new file mode 100644
index 0000000..3ba969c
--- /dev/null
+++ b/internal/readpassword/trezor_disabled.go
@@ -0,0 +1,19 @@
+// +build !enable_trezor
+
+package readpassword
+
+import (
+ "os"
+
+ "github.com/rfjakob/gocryptfs/internal/tlog"
+)
+
+const (
+ TrezorPayloadLen = 32
+)
+
+func Trezor(payload []byte) []byte {
+ tlog.Fatal.Printf("\"-trezor\" is not implemented yet.")
+ os.Exit(1)
+ return nil
+}