ActiveX controls are packaged and released to solve the problem of no certificate

Source: Internet
Author: User

ActiveX release procedure

Create a PVK file [private key file]

Makecert-SK digitaltitan
Digitaltitan. PVK
Makecert-N Cn = Telstar

Create a CER file [company certificate]

Makecert-SK digitaltitan. PVK Telstar. Cer

Create SPC test software publisher Certificate

Cert2spc root. Cer Telstar. Cer Telstar. SPC

Create an INF file

[Version]
Signature = "$ China $"
Advancedinf = 2.0

[Add. Code]
Weboffice. ocx = weboffice. ocx
Mfc70.dll = mfc70.dll

Msvcrt. dll = msvcrt. dll
Olepro32.dll = olepro32.dll

[Mfc70.dll]

File-win32-x86 = thiscab
Fileversion = 7,0, 9466,0
Destdir = 11

Registerserver = Yes

[Msvcrt. dll]
File-win32-x86 = thiscab

Fileversion = 6, 1, 9844,0
Destdir = 11
Registerserver = Yes

[Olepro32.dll]
File-win32-x86 = thiscab
Fileversion = 5, 0, 4522,0

Destdir = 11
Registerserver = Yes

[Weboffice. ocx]

File-win32-x86 = thiscab
CLSID = {05430ec0-69ca-437a-b1f9-4b78b8647bea}

Fileversion =
Registerserver = Yes
;

Create a cab file
Cabarc
-S 6144 n weboffice. Cab msvcrt. dll msvcp70.dll msvcr70.dll
Mfc70.dll olepro32.dll asycfilt. dll stdole2.tlb weboffice. ocx
Weboffice. inf

Use code signing Wizard to sign a cab file
Signcode.exe

Timestamp service: the time server of Verisign, which is free of charge.

Http://timestamp.verisign.com/scripts/timstamp.dll

In addition:

Makecert-SK digitaltitankey-n "cn = Telstar"-SS Telstar
Telstar. Cer
Makecert-Is Telstar-ic Telstar. cer-SS
Telstarcompany. Cer

Cert2spc mycert. Cer mycert. SPC

 

Packaging Toolkit:

Apply for a certificate: Win2000: Control Panel-Administrative Tools-Certificate Authority [update components if not available] http: // 127.0.0.1/certsrv/

Signature kit: http://download.microsoft.com/download/ B /e/f/bef2551b-401d-4311-ab8f-13d3892b8154/codesigningx86.exe

Timestamp service: the time server of Verisign, which is free of charge.

Bytes:

Symptom: when using a self-compiled DLL or something on the web, the ActiveX control is prompted to be insecure or the installation of insecure ActiveX is prompted during each usage.

Solution: It took me two days to study this method. I hope you can correct it.

You can use digital signatures to solve this problem.

1. The tool required for digital signature on your machine is named codesigningx86, a zip file. It is used in windows, the following files will be displayed after normal unlocking:

====================
Cabarc.exe
Cert2spc.exe
Chktrust.exe

Makecat.exe
Makecert.exe (required)
Makectl.exe
Setreg.exe

Signcode.exe (required)
======================
The above can be downloaded from Microsoft sites

I have used makecert.exe to create a certificate and use signcode to sign the certificate.

At this time, an Oranje. PVK and Oranje. Cer file will be generated in your directory. Open the. Cer file and you will see the certificate information.

Issued to: Wang Cheng
Issuer: rooe agenct
Valid start date: 2003-11-29
2040-1-1

Now, with this certificate, you can further Authenticate Your DLL or cab.

2. Enter the DoS Status and change the Directory

Input: makecert-SV Oranje. PVK-n "cn = Wang Cheng, E = homki@163.com, O = Wang Cheng"
Oranje. Cer
This is the certificate-SV is the encrypted file (like), CN is the name of the Company E = Email o = Certification Company
Oranje. CER is the name of the generated file. It seems that all files are suffixed with. Cer.

At this time, the certificate is not certified by any certification company. I heard that the certification requires several hundred US dollars a year, and I have no money, so I have to do it myself. The functions are the same.

3rd, run signcode.exe

A digital signature wizard appears.
Next step
Select the file to be signed (DLL. ocx. Cab, etc)
Next, select Custom
Next select Signature Certificate
Select Oranje. cer from the file
Next, the private key file on the private key disk
Click Browse and select Oranje. PVK.
Enter Password next
Next step
Select an algorithm. Here I select sha1.
Next, configure the certificate path. Here, I select "all certificates in the certificate path, including the Root Certificate", which is the default
 
Next step: Enter the text prompted when installing the certificate. Enter it as needed. Here I enter "document Editor"
Web location is a link to something you entered, I enter http://www.cn2cn.com here-> next time not changed

Next step complete

4. Congratulations! After the certificate is created, configure your cab or DLL and try again. After the first run, your certificate will be installed, and you will not need to run it later, there will be no prompts such as "insecure ActiveX, not installation ".

5. debugging and running environment
Windows 2000 p
Search for IIS 5 certificate -------------- in msdn

Q197988
Howto: deploy an ActiveX control written
In Visual Basic

In addition, the URL in msdn (July 2000.

MK: @ msitstore: e:/program % 20 files/Microsoft % 20 visual % 20 studio/msdn/2000jul/1033/vbcon98.chm:/html/vbcondownloadingactivexcomponents.htm

After reading five articles on this connection, all the problems related to ActiveX deployment, signature, and security are solved. Don't ask again

Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/vbcon98/html/vbcondownloadingactivexcomponents. asp

Downloading ActiveX Components
--- Steps to prepare your
Component for download
--- Internet component download

--- Testing your Internet component download
--- Advanced
Customization for Internet component download
--- Manually
Deploying ActiveX Components

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.