Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure private CA commands and configure certificates

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

One: configure private CA commands

1. Edit configuration file / etc/pki/tls/openssl.cnf

Change dir to change ".. / CA" to "/ etc/pki/CA"

You can change the default country, province, and city

Mkdir certs newcerts crl

Touch index.txt

Touch serial

Echo 01 > serial

two。 Create a private key (from which the public key is generated)

Under the / etc/pki/CA directory

(umask 077 position OpenSSL genrsa 2048 > private/cakey.pem) or

(umask 07710 OpenSSL genrsa-out private/cakey.pem 2048)

Note: the-out option should be immediately followed by genrsa

Openssl rsa-in server.key-pubout extract public key

3. Generate a certificate

Openssl req-new-x509-key private/cakey.pem-out cacert.pem

Note:-new: generate a new certificate

-x509: certificate format (required to generate CA self-signed certificate)

Openssl x509-text-in server.crt (view certificate format)

Two: configure the certificate

1. Generate secret key

(umask 07710 OpenSSL genrsa-out ssl/httpd.key 1024)

two。 Generate a certificate

Openssl req-new-key httpd.key-out httpd.csr

3. Give it to CA for signature

Openssl ca-in httpd.csr-out httpd.crt-days 365

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report