Closed danielwangksu closed 2 years ago
ESAPI has a visual studio project file: src/tss2-esys/tss2-esys.vcxproj and it has teh TCTI (connection to the actual TPM) for windows as well (tcti is called tbs). So it should work. You'll need to compile it and link to a version of openssl for Windows. It seems to be building in our Windows AppVeyor CI instance ok: https://ci.appveyor.com/project/williamcroberts/tpm2-tss/build/job/eviooadurhk2p0ro
I don't really do a lot with Windows, so I wont be of much help. You might be better asking on our mailing list, you'll reach more people.
mailing list: https://lists.01.org/postorius/lists/tpm2.lists.01.org/
Thank you @williamcroberts for your help! I was not able to compile tss2-esys on Windows 10, and based on the REAME.md seems only SAPI is working at this moment.
What README says only SAPI is working?
from INSTALL.md says
Windows dlls built using the Clang/LLVM "Platform Toolset" are currently prototypes. We have only tested using Visual Studio 2017 with the Universal C Runtime (UCRT) version 10.0.16299.0. Building the type marshaling library (tss2-mu.dll) and the system API (tss2-sapi.dll) should be as simple as loading the tpm2-tss solution (tpm2-tss.sln) with a compatible and properly configured version of Visual Studio 2017 and pressing the 'build' button.
VS 2017 seems have been removed from VS website, I was able to compile other library using VS2020 but not tpm2-esys.dll
yet. I assume tp2m-esys.dll
is not fully support for Windows. Please let me know if I'm wrong.
Also, is there a command-line tool (similar to tpm2-tools) for Windows? Or does tpm2-tools also works on Windows?
from INSTALL.md says
Windows dlls built using the Clang/LLVM "Platform Toolset" are currently prototypes. We have only tested using Visual Studio 2017 with the Universal C Runtime (UCRT) version 10.0.16299.0. Building the type marshaling library (tss2-mu.dll) and the system API (tss2-sapi.dll) should be as simple as loading the tpm2-tss solution (tpm2-tss.sln) with a compatible and properly configured version of Visual Studio 2017 and pressing the 'build' button.
VS 2017 seems have been removed from VS website, I was able to compile other library using VS2020 but not
tpm2-esys.dll
yet. I assumetp2m-esys.dll
is not fully support for Windows. Please let me know if I'm wrong.
I think that's outdated, I see ESYS building and producing the DLL on appveyor windows:
Also, is there a command-line tool (similar to tpm2-tools) for Windows? Or does tpm2-tools also works on Windows?
tools does not work on windows unfortunately. It has a few linux'isms that if they we're removed would work. So you might be able to get most tools with minimal effort, but it's not out of the box.
Thank you very much @williamcroberts ! That's great to know ESYS works on Windows. It would save a lot of time for me. Do you know if there is an equivalent command tools for Windows 10 available? I would need to use it for provisioning my TPM device.
Thank you very much @williamcroberts ! That's great to know ESYS works on Windows. It would save a lot of time for me. Do you know if there is an equivalent command tools for Windows 10 available? I would need to use it for provisioning my TPM device.
Not that I am aware of.
@williamcroberts I use VS2022 to build tss-2.0 on window10, It sucessed, generate tss2-esys.dll, tss2-mu.dll, tss2-rc.dll ...etc, but I don`t know how to use it, Is there any context to introduce how to use *.dlls, what should I do
Outside of the fact that a dll is a shared library and you need to create a C program that uses the library and link a program to the dll I don't think ill be of much help because how to do that is all windows specific.
Yeah, just want to confirm that I was able to compile tss2-esys.dll. I'm closing this thread. Thank you for your help!
Hi all, I'm developing an application for both Linux and Windows 10 using TPM 2.0 EAPI. I've finished the implementation on Linux using TPM2-TSS and TPM2-tool (for provisioning). How can I achieve the same thing on Windows 10?
I found TSS.MSR from Microsoft research but it is much less mature and its C implementation is a fork for TPM2-TSS older version. I tried to compile TPM2-TSS on Windows 10 but have be able to make it work, also based on the README, it seems only SAPI is working on Windows 10. Does Windows 10 has its own EAPI implementation? If so how can I link to that library?
Thank you for your help!