tpm2-tss-engine
tpm2-tss-engine copied to clipboard
Compile for windows
Hello, is it possible to compile this project for windows? I tried it with cygwin with no success.
Thank you for your help.
You will probably have to create a VS project and include all the files, I assume. Sorry, but I'm not an expert here; i.e. no Windows compile box.
@naaeef Any update?
We managed to get the project running on windows on an experimental basis. For compiling the tmp2-tss-engine we created a new Visual Studio Solution using Visual Studio 2019. In the solution, we created two projects with different build targets. One for the genkey Tool (for generating private keys in the TPM) with an executable file as a target and one with a DLL as a target. Furthermore, we had to replace the function calls to sscanf with calls to sscanf_s. Also, we removed the header getopt.h and parsed the command line arguments manually. In some header files, we also had to change the initialization of structs from {} to 0, because the syntax was not accepted by the compiler.
@naaeef Pretty cool. Would you mind turning this into a PR ?
@naaeef Yes, if you'd like to create PR it will be very helpful and meaningful! Thanks!
I can't create a pull request because we did it on a very experimental base, and I currently do not have enough time to convert the code to a stable version.
I can't create a pull request because we did it on a very experimental base, and I currently do not have enough time to convert the code to a stable version.
Just upload it so its available, and then someone else can run with this.
@naaeef Yes, please. Even though you just upload it, it could be a great reference for me. I was stuck for weeks.
Wanted to pitch an alternative engine for windows for reference, openssl-cng-engine. It uses the Windows Cryptography API: Next Generation (CNG)
I am planning to try and compile the tpm2 version on windows as well.