SignTool Error: ISignedCode::Sign returned error: 0x80092006

后端 未结 5 1972
-上瘾入骨i
-上瘾入骨i 2021-01-05 13:06

I\'m signing an EXE program with a certificate issued by a trusted CA. I\'m using signtool.exe from the Windows SDK v6.0a.

The certificate is located in the computer

5条回答
  •  不思量自难忘°
    2021-01-05 13:37

    The problem is that your service process cannot access your private key, which is stored under your account.

    Log on into the account that is running the web service and import the private key into a key container. You can do this for example using the strong name tool (sn.exe) of .NET:

    sn -i MyCertificate.pfx MyCodeSigningKey
    

    Now, change your build script to use this key container:

    signtool sign /sm /a /v /csp "Microsoft Strong Cryptographic Provider" /kc MyCodeSigningKey 
    

    /kc specifies the key container. /kc requires that you specify the "CSP" (Cryptographic Service Provider) via the /csp switch. "Microsoft Strong Cryptographic Provider" is the default provider used by sn.

提交回复
热议问题