Click here to Skip to main content
11,495,371 members (66,137 online)
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
Areff682

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 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 265
3 Nakul Chaudhari 236
4 OriginalGriff 191
0 Sergey Alexandrovich Kryukov 10,322
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,889
3 Maciej Los 3,422
4 Richard Deeming 2,560


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 3 Jul 2012
Copyright © CodeProject, 1999-2015
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