Unable to open a CSP provider with the correct private key

From: Dennis Homann (DennisHomann_at_discussions.microsoft.com)
Date: 11/26/04

  • Next message: Chris Peterson: "Custom SAS and WlxWkstaLockedSAS"
    Date: Fri, 26 Nov 2004 06:31:04 -0800
    
    

    I am trying to sign an .exe using the signcode.exe tool. The private key is
    located in the system store "my". The signing process works just fine when I
    work locally:

    signcode.exe -cn <CNofTheCERT> -t <timestampURL> <exePath>

    However we want to automate the build on a dedicated machine. The build
    process is initiated by running a batch file remotely via SSH. Now, when I
    authenticate using my password, everything works fine. But to run automatic
    builds we use public key authentication. In that case, signcode.exe fails
    with the following error message:

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

    Since the only difference is the authentication via password, I assume
    there's something wrong with the security token? Somewhere I read that it
    might be a problem to access a user's certificate store without password
    authentication, so I imported the certificate and private key into the local
    machine store. Again,

    signcode.exe -cn <CNofTheCERT> -r localMachine -s my -t <timestampURL>
    <exePath>

    works locally, but not remotely.

    Does anyone has a hint what the reason could be? Is there any other way to
    sign code on a remote machine without having to enter a password (I will give
    up on SSH if there is a better way).

    Thanks,
    Dennis


  • Next message: Chris Peterson: "Custom SAS and WlxWkstaLockedSAS"

    Relevant Pages

    • Re: public key vs passwd authentication?
      ... Thus PKI authentication = ... > password authentication. ... a password used to unlock a private key (although doesn't necessarily ... lots of identity theft references ... ...
      (comp.security.ssh)
    • Re: Alternative store vs. MY store
      ... store both the client cert and its associate private key on my USB memory ... your codes (CSP, ... indirect call to your CSP when one of your cert is involved in an operation. ...
      (microsoft.public.platformsdk.security)
    • Re: PKI: the end
      ... in an asymmetric cryptography key is a business process specification. ... authentication (i.e. some entity uniquely is in possession of the ... privacy and confidentiality of a private key may be technology. ... A relying party might also be told that they could assume that as part ...
      (sci.crypt)
    • Re: Alternative store vs. MY store
      ... >> keep the private key on the memory card all the time. ... > must so start to copy your certs to the store, ... > indirect call to your CSP when one of your cert is involved in an operation. ...
      (microsoft.public.platformsdk.security)
    • Re: Alternative store vs. MY store
      ... I don't think copying the cert to ... the private key to leave my alternative physical store--which is a USB flash ... store both the client cert and its associate private key on my USB memory ... article "The Smart Card Cryptographics Service Provider Cookbook" which has ...
      (microsoft.public.platformsdk.security)