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
This commit is contained in:
Jakob Unterwurzacher 2018-07-01 21:07:50 +02:00
parent 2d68b06f9d
commit 5243cd0e0d
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,5 @@
// +build enable_trezor
package readpassword
import (

View File

@ -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
}