How to sign an ActiveX DLL with a Certificate

流过昼夜 提交于 2019-11-29 12:12:35

Microsoft has a decent whitepaper/tutorial on how to go about doing this:

MSDN Article

Here is the long and short of it: To sign your code

  1. Apply for a certificate from a certificate authority. See http://msdn.microsoft.com/workshop/security/authcode/certs.asp for instructions on obtaining a certificate.

  2. Get the latest tools for signing files and checking signatures. See http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/crypto/cryptotools_4739.htm.

  3. Prepare your files to be signed. If you are signing any .exe, .ocx, .vbd or .dll file, you do not need to do anything special. If you are signing a .cab file, you must add the following entry to your .ddf file and remake your .cab file:

    .Set ReservePerCabinetSize=6144

  4. Sign your files using signcode.exe. The following is an example of how you might sign a file:

    Signcode -prog myfilename -name displayname -info http://www.mycompany-inc-10.com - spc mycredentials.spc -pvk myprivatekey.pvk

  5. Test your signature:

    • To test a signed .exe, .dll, .vbd or .ocx file, run chktrust filename where filename is the name of the file you signed.
    • To test a signed .cab file, run chktrust -c cabfilename.cab where cabfilename is the name of the .cab file you signed.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!