Create your own PKI public/private key pairs and Public Key Certificates

Source: Internet
Author: User

1. Create a certificate request configuration file

**************************************** ********

[ req ]default_bits = 2048default_keyfile = keystonekey.pemdefault_md = defaultprompt = nodistinguished_name = Distiguished_name[ Distiguished_name ] 
countryName = CN
stateOrProvinceName = BJ
localityName = Beijing
organizationName = example
organizationalUnitName = example
commonName = Keystone Signing
emailAddress = [email protected]


**************************************** ********

2. Generate the private key and CSR (Certificate Signing Request). Note that the private key cannot be encrypted (-nodes option). The private key is signing_key.pem, And the CSR is signing_cert_req.pem.

$ openssl req -newkey rsa:2048 -nodes-keyout signing_key.pem -keyform PEM -out signing_cert_req.pem -outform PEM -config cert_req.conf \


3. Send the generated CSR to the CA and request our certificate.
We use cacert to generate a certificate, which is only used in the experiment environment and is saved as signing_cert.pem.

4. Obtain the CA certificate to build a certificate trust chain
Here we use the certificate from cacert and save it as: ca_cert.pem

Create your own PKI public/private key pairs and Public Key Certificates

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: 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.