创建证书文件并使用cer文件对Cab进行签名 [英] Create certificate file and Signing a Cab with cer file

查看:170
本文介绍了创建证书文件并使用cer文件对Cab进行签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一个cab文件,我想将它作为一个对象放入我的网页中(包含我的activex控件)
我已通过此命令使用makecert.exe生成MyCert.cer和MyCert_PK.pvk文件

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



那么我已经使用此命令对我的cab文件进行签名了:



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



但是执行失败,其消息是:

SignTool错误:指定的私钥与
的公钥不匹配 选择的证书.


在签署我的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 ?

推荐答案

似乎您的过程中有一些问题.您收到的错误消息基本上表示您的SSL证书被弄乱了".我看到的第一个问题是您的makecert流程.您缺少制作适当的证书文件所需的某些开关.除此之外,使用这样的本地证书仅用于测试,而不用于实时应用程序.对于实时应用程序,您应该使用GoDaddy,Thawte或其他提供商之一的真实证书.但是,与此同时,这里是制作自己的证书的好资源:

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


这篇关于创建证书文件并使用cer文件对Cab进行签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆