Create a clickonce project signature certificate

Source: Internet
Author: User
Tags microsoft website pfx file

------ Step 1 create an X.509 Certificate ------
Makecert.exe is the certificate creation tool.
The certificate creation tool generates X.509 certificates for testing purposes only. It creates a public key and private key pair for digital signature, and stores it in the certificate file.
This tool also associates the key pair with the name of the specified issuer and creates an X.509 Certificate that binds the user-specified name to the public part of the key pair.
When creating a certificate, you will be prompted to require the certificate's private key password (Subject Key, two password input boxes). In the generated CER file, you will be asked to enter the password again (one input box)
See: http://msdn.microsoft.com/zh-cn/library/bfsktky3 (vs.80). aspx
Command Behavior:
"C: \ Program Files \ microsoft sdks \ windows \ v6.0a \ bin \ makecert.exe"-r-n "cn = XXXX software Co., Ltd."-B 01/01/2009-e 12/31/2019-SV cbipsetupkey. PVK cbipsetupkey. CER

 

------ Step 2 create a issuer certificate ------
Cert2spc.exe issuer Certificate Test Tool
The issuer Certificate Test Tool creates a issuer certificate (SPC) through one or more X.509 certificates ). Cert2spc.exe is only used for testing purposes. A valid SPC can be obtained from a Certificate Authority (such as Verisign or thawte.
See: http://msdn.microsoft.com/zh-cn/library/f657tk8f (vs.80). aspx
The private key and password are not required when the issuer certificate is generated.
Command Behavior:
"C: \ Program Files \ microsoft sdks \ windows \ v6.0a \ bin \ cert2spc.exe" cbipsetupkey. Cer cbipsetupkey. SPC

------ Step 3 export the Certificate file ------
Pvkimprt.exe is a certificate export tool. Download from Microsoft Website: elastic.
The certificate export tool is used to export. SPC and. PVK files as pfx certificate files.
The password for creating the certificate is prompted during export.
After entering the correct password, the export Wizard Page appears. Click Next, select "Yes, export key", and then click Next,
Select personal information exchange-PKCS #12 (. pfx) (p) "(only this option is available, and none of the options below are selected), and then click Next,
The private key protection password option appears. Enter the password, click Next, enter the file name to be generated in the text box (generally the same as the certificate name), and click Next.
The complete window is displayed, and the certificate export information is displayed.
Pvkimprt-pfx cbipsetupkey. SPC cbipsetupkey. PVK

------ Step 4 Add to project ------
In project properties, select the "signature" tab
Select "sign for clickonce list", click "select from file", and then select the generated. pfx file (if a file with the same name already exists in the project, delete it first)
After the. pfx file is selected, the private key protection password will be prompted. After the correct private key protection password is entered, it will be added to the project.
Note thatCertificate validity periodThe certificate has a validity period. If the validity period is exceeded, the certificate is regarded as invalid and cannot be signed.

 

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.