问题
I have a C++ program on visual studio that requires the linker flag '/integritycheck'. When I enable this flag, i cannot run the program due to not the file not being verified by windows.
I have looked across the web for ways to create test signing certificates, and they all end the same way; The file was not able to be verified by windows.
I'm running Visual Studio 2013 community on Windows 7.
Just some of the sources I've looked at and followed through to the best of my ability:
https://www.meziantou.net/generate-a-self-signed-certificate-for-code-signing.htm
https://docs.microsoft.com/en-us/windows-hardware/drivers/install/creating-test-certificates
https://www.digicert.com/code-signing/signcode-signtool-command-line.htm
I have also tried to use the tool XCA to create a certificate. I have added certificates to the Root Store in windows. I always end up with the same result. I have even tried booting windows in testmode.
If it matters, the code that I'm trying to run and verify that it does what I want it to do, before I add it to my main project, is: https://docs.microsoft.com/en-gb/previous-versions/windows/desktop/ics/c-registering-with-windows-firewall-ownership
I know this might be a trivial issue and there is some way around it, but i cant seem to find it. Can anyone please point me in the right direction?
来源:https://stackoverflow.com/questions/57157677/how-to-sign-visual-studio-empty-project-executable-for-integritycheck-linker