"Cannot find certificates that match the key." When trying to sign Visual Studio project using makecert.exe and pvk2pfx.bat

0

Since I installed a new computer, my only signed project is not compiling due to certificate failure. I tried pointing the project to the certificate file but it appears to be linked to the previous user/computer. I'm not much experimented with certifictes/signing as I don't use them often.

I don't remember the procedure I used previously to sign the project, yet I'm hoping to find something that would not create a dependancy between the project and computer.

I'm trying to follow this: https://docs.microsoft.com/en-us/windows/desktop/appxpkg/how-to-create-a-package-signing-certificate

And I ran ( [ ] and X indicate parts of the code that have been anonymised for posting here)

makecert -r -pe -ss PrivateCertStore -n "CN=[My Name]" X.cer

Which creates file "X.cer"

makecert /n "[My Name]" /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /sv X.pvk X.cer

Which creates file "X.pvk"

pvk2pfx /pvk X.pvk /pi "[the key passowrd]" /spc X.cer /pfx X.pfx

Which I expect to create file "X.pfx"

But instead I get

ERROR: Cannot find certificates that match the key. (Error Code = 0x80070490).

.net
certificate
sign
asked on Stack Overflow Feb 8, 2019 by TTT • edited Feb 10, 2019 by Bhargav Rao

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0