openssl生成ca证书

常见CA文件夹

1、生成CA钥匙

openssl genrsa -out ./private/cakey.pem

2、生成CA自签名

openssl req -new -x509 -key ./private/cakey.pem -out ./cacert.crt -days 3650

3、生成http服务器私钥

openssl genrsa -out ./data/frontt.project.com.key 2048

4、CA给http服务器签生成 证书申请文件

openssl req -new -key ./data/frontt.project.com.key -out ./certs/frontt.project.com.csr

5、CA生成服务器的签名证书

openssl ca -in ./certs/frontt.project.com.csr -cert ./cacert.crt -keyfile ./private/cakey.pem -out ./certs/frontt.project.com.crt -days 3650

方法二:

openssl version -a

#生成公共/私人秘钥对

1、openssl genpkey -out passwork.key 2048

#输入秘钥对生成公钥

2.openssl rsa -in passwork.key -pubout -out passwork_public.key

#输入秘钥签生证书申请文件

3.openssl req -new -key passwork.key -out passwork.csr

4.openssl req -text -in passwork.csr -noout -verify

5.openssl x509 -in passwork.csr -out passwork.crt -req -signkey passwork.key -days 3650

Organization Name:Passwork

Organization Unit Name:.

Common Name:*.passwork.com

openssl req -newkey rsa:2048 -nodes -keyout frontt.project.com.key -x509 -days 3650 -out frontt.project.com.crt

三:

openssl req -new -newkey rsa:4096 -nodes -keyout key.pem -out cert.csr

openssl x509 -req -sha256 -days 3650 -in cert.csr -signkey key.pem -out cert.pem

chmod 600 cert.csr

chmod 600 cert.pem

chmod 600 key.pem

相关推荐
Lsetea2 天前
CDN换了SSL证书仍显示旧证书?按边缘节点、SNI和缓存逐层排查
https·cdn·ssl证书·openssl·tls
Lsetea3 天前
Nginx HTTPS证书域名不匹配:用SAN与SNI定位 ERR_CERT_COMMON_NAME_INVALID
nginx·https·ssl证书·openssl·tls
bosins7 天前
Windows IIS 配置本地HTTPS 全流程指南:自签名证书 + 端口绑定 + 避坑详解
powershell·openssl
Lsetea11 天前
Nginx报SSL_CTX_use_PrivateKey failed:证书与私钥不匹配怎么排查
nginx·https·ssl证书·openssl·私钥
Lsetea13 天前
SSL证书快过期怎么自动检查:用OpenSSL checkend做7天预警与线上证书验收
https·ssl证书·openssl·systemd·证书监控
蜡台1 个月前
本机 局域网 搭建本地 HTTPS 域名完整方案
网络协议·http·https·openssl
qetfw1 个月前
Debian OpenSSL CA 证书配置参考:根证书、服务证书与验证
linux·debian·ssl·openssl
qetfw1 个月前
Debian OpenSSL 搭建 CA 证书服务:签发、吊销与客户端信任
linux·debian·openssl·ca
yanlaifan3 个月前
网络安全值CA证书
ca
Irissgwe3 个月前
5-2 - HTTPS 协议原理
网络协议·http·https·非对称加密·ca·https协议原理