Create an intermediate certificate instance using OpenSSL

Source: Internet
Author: User

1. Issue the Root CA
OpenSSL genrsa-des3-out myrootca. Key 1024
OpenSSL req-New-key myrootca. Key-out myrootca. req
OpenSSL X509-req-days 7305-extfile rootca. conf-signkey myrootca. Key-In myrootca. req-out myrootca. CRT
2. Issue intermediate ca
OpenSSL genrsa-out subca. Key 1024
OpenSSL req-New-key subca. Key-out subca. req
OpenSSL X509-req-days 3650-sha1-extfile subca. conf-Ca myrootca. CRT-Cakey myrootca. key-caserial myrootca. SRL-cacreateserial-In subca. REQ-out subca. CRT
1. Use an intermediate CA to issue a server certificate

OpenSSL X509-req-days 3650-sha1-extfile server. conf-Ca subca. CRT-Cakey subca. Key-caserial subca. SRL-cacreateserial-In certreq.txt-out serverbysubca. CRT

1. Use the Root CA to issue a server certificate
OpenSSL X509-req-days 3650-sha1-extfile server. conf-Ca myrootca. CRT-Cakey myrootca. key-caserial myrootca. SRL-cacreateserial-In myhost. REQ-out myhost. CRT

Rootca. conf:

Basicconstraints = Ca: True
Keyusage = keycertsign, crlsign

Subca. conf

Basicconstraints = Ca: True, pathlen: 0

Keyusage = keycertsign, crlsign

Nscerttype = sslca, emailca, objca

Server. conf

 

Basicconstraints = Ca: false

Keyusage = digitalsignature, keyencipherment, dataencipherment, keyagreement

Nscerttype = Server

Extendedkeyusage = serverauth, mssgc, nssgc

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.