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 分钟前
10. Linux 系统启动原理
linux·运维·服务器
正在走向自律26 分钟前
豆包编程模型Doubao-Seed-Code深度体验,从零开始构建全栈项目的完整指南
java·服务器·数据库·doubao·claude code·火山方舟
HealthScience1 小时前
vscode怎么连接远程服务器/无密码(使用秘钥)登录
服务器·ide·vscode
是小胡嘛3 小时前
华为云CentOS系统中运行http服务器无响应
linux·服务器·c++·http·centos·华为云
小猪佩奇TONY4 小时前
OpenGL-ES 学习(16) ----Pixel Buffer Object
服务器·学习·elasticsearch
Mr.H01274 小时前
(上册)TCP 服务器核心流程实操指南
linux·服务器·网络·tcp/ip
HappRobot4 小时前
WebLogic服务器的JVM参数调整
服务器·jvm·chrome
饭九钦vlog4 小时前
修复重装机kali机器上不了网络域名问题一键脚本
服务器·网络·php
2501_915909066 小时前
iOS APP 抓包全流程解析,HTTPS 调试、网络协议分析与多工具组合方案
android·ios·小程序·https·uni-app·iphone·webview
TG:@yunlaoda360 云老大6 小时前
怎么在亚马逊云服务器上部署Node.js?
运维·服务器·node.js·aws