"SignTool error: Access is denied" in TFS 2010 build process

Posted by user351352 on Stack Overflow See other posts from Stack Overflow or by user351352
Published on 2011-12-30T17:23:28Z Indexed on 2012/06/22 3:16 UTC
Read the original article Hit count: 1718

Filed under:
|
|

I'm getting "SignTool Error: Access is Denied" when I attempt to sign a file. When I use an administrator cmd, all works fine. However, this process is going to be used in a TFS 2010 build process and using the InvokeProcess task with signtool gives the same access denied message as a non-administrator command prompt.

More info:

After following these instructions I have the following files:

  • MyCA.cer
  • MyCA.pvk
  • MySPC.cer
  • MySPC.pvk
  • MySPC.pfx

MyCA is in my Trusted Root Certification Authorities I imported MySPC.pfx into personal certificates, following the advice here: SignTool error: Access is denied

To do the signing I'm using the thumbprint of the MySPC.pfx that was imported into the Personal section so my signtool command looks like:

sign /sha1 1e9d7b5ad98552d9c58944e3f3903e6b929f4819 /t http://timestamp.verisign.com/scripts/timestamp.dll "FileName"

Once again this works in Admin mode. This also works when running cmd as administrator:

sign /f "C:\Code Signing Non-Release\MySPC.pfx" /t http://timestamp.verisign.com/scripts/timestamp.dll "FileName"

New to code signing in general, so any help is welcome.

© Stack Overflow or respective owner

Related posts about tfs2010

Related posts about code-signing