Click here to Skip to main content
13,046,087 members (62,986 online)
Rate this:
Please Sign up or sign in to vote.
hello everybody

i have a cab file and i want to put it in my web page as a OBJECT (contains my activex control)
i have used makecert.exe by this command to generate the MyCert.cer and MyCert_PK.pvk files

makecert -ss MyCertStore MyCert.cer -sv MyCert_PK.pvk

then i have used this command for signing my cab file :

signtool sign /f MyCert.cer  /csp "Microsoft Strong Cryptographic Provider" /kc MyCert_PK.pvk

but execution of that was failed and its message is :

SignTool Error: The specified private key does not match the public key of the
selected certificate.

what else i must done befor these steps for signing my cab file ? or what am i doing wrong in this case ?
Posted 3-Jul-12 3:05am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It looks like you have a few issues in your process. The error message you are getting basically means "your SSL cert is messed up". The first issue I see is in your makecert process. You are missing some switches that are required to make a proper cert file. Beyond this, using a local cert like this should only be for testing, and not for your live application. For your live application, you should be using a real cert from GoDaddy, Thawte, or one of the other providers. In the meantime, however, here is a good resource on making your own cert:[^]

Once you get to the point of using the signtool, I would recommend using the wizard. It is so much better at showing you what you need to do next compared to the command line. Here is a tutorial on how to do that:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100