How to sign Visual Studio “Empty Project” executable for /integritycheck linker flag

丶灬走出姿态 提交于 2019-12-11 15:20:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!