|
1
2
3
4
5
6
|
[root@localhost CA]# cd /etc/pki/CA/[root@localhost CA]# (umask 077;openssl genrsa -out private/cakey.pem 1024 )Generating RSA private key, 1024 bit long modulus...............++++++....++++++e is 65537 (0x10001) |
|
1
|
openssl req -new -x509 -key private/cakey.pem -out cacert.crt -days 3089 |
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
ll /etc/pki/tls/openssl.cnfdir = /etc/pki/CA # Where everything is keptcerts = $dir/certs # Where the issued certs are keptcrl_dir = $dir/crl # Where the issued crl are keptdatabase = $dir/index.txt # database index file.#unique_subject = no # Set to 'no' to allow creation of # several ctificates with same subject.new_certs_dir = $dir/newcerts # default place for new certs.certificate = $dir/cacert.pem # The CA certificateserial = $dir/serial # The current serial numbercrlnumber = $dir/crlnumber # the current crl number # must be commented out to leave a V1 CRLcrl = $dir/crl.pem # The current CRLprivate_key = $dir/private/cakey.pem# The private keyRANDFILE = $dir/private/.rand # private random number file |
|
1
2
|
cakey.pem :ca的私钥(可提取出公钥)cacert.crt:ca自签名证书 |
|
1
|
openssl genrsa -out http1.key 2048 |
|
1
|
openssl req -new -key http1.key -out http1.csr |
|
1
|
openssl ca -in http1.csr -out httpd.crt -days 3650 |
本文介绍了HTTPS协议的基本原理及其在安全通信中的作用,并详细讲解了如何搭建自定义CA服务器及生成自签名证书的过程。

5822

被折叠的 条评论
为什么被折叠?



