Create private CAs and request CA steps in LAN

Source: Internet
Author: User

Preparation environment: 2 virtual machines, centos6.7 (client) and centos7.0 (server side)

Configuration file:/etc/pki/tls/openssl.cnf

①, create the required files

Touch/etc/pki/ca/index.txt

echo >/etc/pki/ca/serial

②, Cd/etc/pki/ca Directory

Generate private key

(Umask 066; OpenSSL genrsa-out Private/cakey.pem 2048)

Generate a self-signed certificate

OpenSSL req-new-x509-key/etc/pki/ca/private/cakey.pem-days 3650-out/etc/pki/ca/cacert.pem

-new: Generate a new certificate signing request

-x509: Dedicated to CA generate self-signed certificate

-key: The private key file used to generate the request

-days N: Validity period of the certificate

-out/path/to/somecertfile: Certificate Save path

③, generating the private key on the client (6.7)

(Umask 066; OpenSSL Genrsa-out/etc/pki/ca/httpd.key 1024)

To generate a certificate request file:

OpenSSL req-new-key/etc/pki/ca/httpd.key-days 365-OUT/ETC/PKI/CA/HTTPD.CSR

Note: Country, province, company name must be consistent with CA

④, transferring the certificate file to (7.0)

SCP/ETC/PKI/CA/HTTPD.CSR 192.168.1.10 (IP address ):/etc/pki/ca/newcerts

⑤,

OpenSSL ca-in/et/pki/ca/newcerts/httpd.csr-out/etc/pki/ca/certs/httpd.crt-days 365


Pass the HTTPD.CRT back (6.7)

SCP/ETC/PKI/CA/CERTS/HTTPD.CRT IP Address:/etc/pki/ca/


This article is from the "linux-Struggle snail" blog, please make sure to keep this source http://sdwcg.blog.51cto.com/3171500/1794491

Create private CA and request CA steps within LAN

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.