tpm2-software / tpm2-tools

The source repository for the Trusted Platform Module (TPM2.0) tools
https://tpm2-software.github.io
705 stars 377 forks source link

tpm2 commands failed with Could not dlopen library: "libtcti-device:/dev/tpm0" #896

Closed acmer29 closed 6 years ago

acmer29 commented 6 years ago

I used source code (all master branch) installed tpm2-tools, tpm2-abrmd and tpm2-tss in the virtual OS (ubuntu 17.10) in qmeu, which is under tpm2 environment. When I run tpm2_startup --tcti=device:/dev/tpm0 in the virtual OS in qemu, it terminates with error below:

ERROR: Could not dlopen library: "libtcti-device:/dev/tpm0.so" 
ERROR: Unknown tcti, got "device:/dev/tpm0".

I have tpm0 in my /dev/ directory, and I use a tpm2 emulator with qemu for this virtual OS. How can I use tpm2-tools communicate with the tpm2 emulator? And where do I make mistake so that the above errors occur?

williamcroberts commented 6 years ago

This looks like a bug in the tcti re-design where I am not properly splitting the tcti_name from options. Try just `--tcti=device IIRC, device defaults to that path.

williamcroberts commented 6 years ago

@acmer29 should be fixed on: https://github.com/tpm2-software/tpm2-tools/pull/897