WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Compiler
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Code Sign Error

 Keywords: Unable to open a CSP provider with the correct private key 

Question:

I keep getting the error Unable to open a CSP provider with the correct private key when i try to code sign an exe using the Compiler.

Answer:

Cryptographic service provider (CSP) An independent software module that actually performs cryptography algorithms for authentication, encoding, and encryption.

This is a system error indicating some sort of code signing certificate problem on the system :

"Error: Unable to open a CSP provider with the correct private key. Error: Signing failed. Result = 80092006, (-2146885626)"

Lets confirm you have the certificate successfully installed:

  1. Launch Internet Explorer
  2. Select the 'Tools'|'Internet Options' menu.
  3. Select the 'Content' tab.
  4. Press the 'Certificates' button.
  5. Select the 'Personal' tab.
Do you see your certificate?
If not you may need to reinstall the certifcate from the pfx file.The process to install the certificate depends on the certificate file type. .PFX Certificate File: Windows 7 has a certificate installation wizard that can be invoked by simply double clicking on the .pfx file. Using the Wizard, installing a code signing certificate can be done in less than a minute.

Does it have a friendly name?
If not, you can view and manage the root certificates on your computer by going to Internet Options in Internet Explorer or the Control Panel. Click the Content tab and then Certificates. Find your desired certificate under the Trusted Root Certification Authorities tab and click View and then the Details tab. Select the Friendly Name field and click Edit Properties. There you can change the Friendly Name.

Reference:
http://stackoverflow.com/questions/1045855/signtool-error-isignedcodesign-returned-error-0x80092006
Signtool: http://msdn.microsoft.com/en-us/library/windows/desktop/aa387764(v=vs.85).aspx
Code Signing an Exe in WinBatch: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/64-bit+Code~Signing~an~EXE.txt

User Reply:

I discovered my problem. To fix it, I had to delete the old certificates that were associated with my old CAC from the certificate store. To get there...Start, Run, certmgr.msc

Once there, I went to Personal, Certificates and deleted the old, expired certs.

Thank you for your help, and have a great day.


Article ID:   W17688
Filename:   Code Sign Error.txt
File Created: 2014:07:18:09:50:34
Last Updated: 2014:07:18:09:50:34