From 5243cd0e0d90c8a8aca735e06302d5a9d891a8a6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 1 Jul 2018 21:07:50 +0200 Subject: 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 --- internal/readpassword/trezor.go | 2 ++ internal/readpassword/trezor_disabled.go | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 internal/readpassword/trezor_disabled.go diff --git a/internal/readpassword/trezor.go b/internal/readpassword/trezor.go index 9020b33..43e2805 100644 --- a/internal/readpassword/trezor.go +++ b/internal/readpassword/trezor.go @@ -1,3 +1,5 @@ +// +build enable_trezor + package readpassword import ( 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 +} -- cgit v1.2.3