Click here to Skip to main content
Rate this: bad
good
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 MyFiles.cab
 
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 4:05am
Areff781

1 solution

Rate this: bad
good
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:
 
http://msdn.microsoft.com/en-us/library/aa140234(v=office.10).aspx[^]
 
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:
 
http://www.thegeekstuff.com/2010/03/microsoft-digital-signatures/[^]
  Permalink  

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

  Print Answers RSS
0 BillWoodruff 360
1 Mathew Soji 309
2 Maciej Los 270
3 DamithSL 225
4 Afzaal Ahmad Zeeshan 202
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 3 Jul 2012
Copyright © CodeProject, 1999-2014
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