[tpm2] How do I use Microsoft's sim (TSS.MSR) with lib tss2-esys
Markus Willhelm Schmid <willhelm.schmid at gmail.com>
| Newsgroups | dev.linux.lists.tpm2 |
|---|---|
| Message-ID | <CAMs2GAoW4oQK=w4AsJsThEwX-Myis8y+xnV2rYfrTEQiQAPMUw@mail.gmail.com> |
I have compiled the libraries using the included Visual Studio solution and copied the following C example: https://tpm2-software.github.io/tpm2-tss/getting-started/2019/02/05/Getting-Started.html When I run the code, I get the following error when function Esys_Initialize is called: WARNING:tcti:tcti-tbs.c:292:Tss2_Tcti_Tbs_Init() Failed to create context with TBS error: 0x8028400f ERROR:tcti:tctildr-nodl.c:152:tctildr_get_default() No standard TCTI could be loaded ERROR:tcti:tctildr.c:428:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI ERROR:esys:esys_context.c:69:Esys_Initialize() Initialize default tcti. ErrorCode (0x000a000a) I also tried to run the code using the Linux subsystem and I configured it as follows: ./configure --enable-tcti-mssim BTW, could not find any documentation on above, but it seemed to work? When run without the simulator, I get a list of errors including: WARNING:tcti:src/util/io.c:251:socket_connect() Failed to connect to host 127.0.0.1, port 2321: errno 111: Connection refused I do not get the above socket error when the simulator is running, but it still does not work: ERROR:tcti:src/tss2-tcti/tcti-device.c:439:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpmrm0: No such file or directory WARNING:tcti:src/tss2-tcti/tctildr.c:62:tcti_from_init() TCTI init for function 0x7f9b65ec1fb0 failed with a000a WARNING:tcti:src/tss2-tcti/tctildr.c:92:tcti_from_info() Could not initialize TCTI named: tcti-device ERROR:tcti:src/tss2-tcti/tctildr-dl.c:150:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0 ERROR:tcti:src/tss2-tcti/tcti-device.c:439:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpm0: No such file or directory WARNING:tcti:src/tss2-tcti/tctildr.c:62:tcti_from_init() TCTI init for function 0x7f9b65ec1fb0 failed with a000a WARNING:tcti:src/tss2-tcti/tctildr.c:92:tcti_from_info() Could not initialize TCTI named: tcti-device ERROR:tcti:src/tss2-tcti/tctildr-dl.c:150:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0 WARNING:esys:src/tss2-esys/api/Esys_GetRandom.c:277:Esys_GetRandom_Finish() Received TPM Error ERROR:esys:src/tss2-esys/api/Esys_GetRandom.c:95:Esys_GetRandom() Esys Finish ErrorCode (0x00000100)
attachment.htm
(text/html, 2.5 KB)
<div dir="ltr">I have compiled the libraries using the included Visual Studio solution and copied the following C example: <a href="https://tpm2-software.github.io/tpm2-tss/getting-started/2019/02/05/Getting-Started.html">https://tpm2-software.github.io/tpm2-tss/getting-started/2019/02/05/Getting-Started.html</a><div><br></div><div>When I run the code, I get the following error when function Esys_Initialize is called:</div><div>WARNING:tcti:tcti-tbs.c:292:Tss2_Tcti_Tbs_Init() Failed to create context with TBS error: 0x8028400f<br>ERROR:tcti:tctildr-nodl.c:152:tctildr_get_default() No standard TCTI could be loaded<br>ERROR:tcti:tctildr.c:428:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI<br>ERROR:esys:esys_context.c:69:Esys_Initialize() Initialize default tcti. ErrorCode (0x000a000a)<br></div><div><br></div><div>I also tried to run the code using the Linux subsystem and I configured it as follows:<br>./configure --enable-tcti-mssim<br>BTW, could not find any documentation on above, but it seemed to work?</div><div><br></div><div>When run without the simulator, I get a list of errors including:<br>WARNING:tcti:src/util/io.c:251:socket_connect() Failed to connect to host 127.0.0.1, port 2321: errno 111: Connection refused<br></div><div><br></div><div>I do not get the above socket error when the simulator is running, but it still does not work:<br>ERROR:tcti:src/tss2-tcti/tcti-device.c:439:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpmrm0: No such file or directory<br>WARNING:tcti:src/tss2-tcti/tctildr.c:62:tcti_from_init() TCTI init for function 0x7f9b65ec1fb0 failed with a000a<br>WARNING:tcti:src/tss2-tcti/tctildr.c:92:tcti_from_info() Could not initialize TCTI named: tcti-device<br>ERROR:tcti:src/tss2-tcti/tctildr-dl.c:150:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0<br>ERROR:tcti:src/tss2-tcti/tcti-device.c:439:Tss2_Tcti_Device_Init() Failed to open device file /dev/tpm0: No such file or directory<br>WARNING:tcti:src/tss2-tcti/tctildr.c:62:tcti_from_init() TCTI init for function 0x7f9b65ec1fb0 failed with a000a<br>WARNING:tcti:src/tss2-tcti/tctildr.c:92:tcti_from_info() Could not initialize TCTI named: tcti-device<br>ERROR:tcti:src/tss2-tcti/tctildr-dl.c:150:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-device.so.0<br>WARNING:esys:src/tss2-esys/api/Esys_GetRandom.c:277:Esys_GetRandom_Finish() Received TPM Error<br>ERROR:esys:src/tss2-esys/api/Esys_GetRandom.c:95:Esys_GetRandom() Esys Finish ErrorCode (0x00000100)<br></div></div>