Generate your own. pfx Digital Certificate

Source: Internet
Author: User
Tags openssl x509 pkcs12

Generate your own. pfx Digital Certificate

Memo:

@ REM is automatically created using vs2005. pfx digital certificates are only valid for one year by default, and both the "issuer" and "issued to" are combinations of the current machine name and current Login User name. In fact, we can create more friendly. pfx digital certificate.

@ REM open the SDK Command Prompt for Microsoft. NET Framework, follow these steps:

@ REM 1: Create a self-Signed X.509 Certificate (. CER) and A. PVK private key file. Use the makecert tool. The command is as follows:

Makecert-r-n "cn = dksoft"-B 01/01/2008-e 01/01/2010-SV mykey. PVK mykey. Cer

@ REM follow the prompts to set the private key password (or do not use the password) to generate related files in the current directory.

@ REM 2: Use X.509 Certificate (. CER) to create a issuer certificate (. SPC) and use the cert2spc tool. The command is as follows:

Cert2spc mykey. Cer mykey. SPC

@ REM 3. Slave. PVK and. convert the SPC format. the pfx format uses pvk2pfx (C:/program files/Microsoft Visual Studio 8/common7/tools/bin). The command is as follows:

Pvk2pfx-PVK mykey. PVK-SPC mykey. SPC-pfx mykey. pfx-Pi password-F

This article from csdn blog: http://blog.csdn.net/kevingao/archive/2009/04/06/4052082.aspx

 

 

Common digital certificate formats and file extensions

PKCS stands for public-key cryptography standards. It is a series of standards developed by the RSA lab and other security system developers to Promote the Development of public key cryptography. PKCS has published 15 standards. Commonly used:
PKCS #7 cryptographic message syntax Standard
PKCS #10 certification request Standard
PKCS #12 Personal Information Exchange syntax Standard

X.509 is a common certificate format. All certificates comply with ITU-T X509 International Standards for Public Key Infrastructure (PKI.

PKCS #7 common suffixes:. p7b. p7c. SPC
PKCS #12 common suffixes include. p12. pfx
The suffix of X.509 DER encoding (ASCII) is. Der. Cer. CRT.
The suffix of X.509 Pam encoding (base64) is. pem. Cer. CRT.

In OpenSSL toolset, you can use-outform-inform to specify der or Pam format. For example:
OpenSSL X509-in CERT. pem-inform PEM-out cert. Der-outform der

To convert PEM to PKCS #12 in OpenSSL, refer to the command:
OpenSSL PKCS12-export-in CERT. pem-out cert. p12-inkey key. pem

For the conversion from PKCS #12 to PEM in OpenSSL, refer:
OpenSSL PKCS12-in CERT. p12-out key. pem
OpenSSL X509-in key. pem-text-out cert. pem

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.