openSSL生成WEB SSL证书

1.使用openSSL生成凭证与私钥:

bash 复制代码
openssl genrsa -out privatekey.pem 2048
openssl req -new -key privatekey.pem -out cert_req.pem
bash 复制代码
Country Name (2 letter code) [AU]:cn
State or Province Name (full name) [Some-State]:sh
Locality Name (eg, city) []:sh
Organization Name (eg, company) [Internet Widgits Pty Ltd]:zhang
Organizational Unit Name (eg, section) []:zhang
Common Name (e.g. server FQDN or YOUR name) []:zhang
Email Address []:zhang@xxx.com

2. 使用数字签名算法签名密钥

bash 复制代码
openssl x509 -sha256 -req -days 365 -in cert_req.pem -signkey privatekey.pem -out sign_cert.pem

并保存签名后的证书公钥文件

3. 自签名ca证书

openssl req -new -x509 -days 365 -key privatekey.pem -out ca_cert.pem

相关推荐
树℡独4 小时前
ns-3仿真之应用层(五)
服务器·网络·tcp/ip·ns3
a41324475 小时前
ubuntu 25 安装vllm
linux·服务器·ubuntu·vllm
Configure-Handler5 小时前
buildroot System configuration
java·服务器·数据库
津津有味道5 小时前
易语言TCP服务端接收刷卡数据并向客户端读卡器发送指令
服务器·网络协议·tcp·易语言
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.6 小时前
Keepalived VIP迁移邮件告警配置指南
运维·服务器·笔记
Genie cloud6 小时前
1Panel SSL证书申请完整教程
服务器·网络协议·云计算·ssl
!chen7 小时前
linux服务器静默安装Oracle26ai
linux·运维·服务器
莫大3307 小时前
2核2G云服务器PHP8.5+MySQL9.0+Nginx(LNMP)安装WordPress网站详细教程
运维·服务器·nginx
2501_927773078 小时前
imx6驱动
linux·运维·服务器
hy____1238 小时前
Linux_进程间通信
linux·运维·服务器