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

相关推荐
IT大白鼠1 天前
Linux账号和权限管理
linux·运维·服务器
hweiyu001 天前
Linux命令:ip6tables
linux·运维·服务器
ITyunwei09871 天前
灾难恢复与业务连续性:如何确保天灾人祸下,业务也能“屹立不倒”?
运维·服务器
爱喝水的鱼丶1 天前
SAP-ABAP:新手入门篇——从0到1写出你的第一个ABAP Hello World程序并完成调试运行
运维·服务器·数据库·学习·sap·abap
学术小李1 天前
VSCode上传文件到服务器
服务器·vscode·sftp·数据上传
Rust研习社1 天前
Ubuntu 全面拥抱 Rust 后,我意识到 Rust 社区要变了
linux·服务器·开发语言·后端·ubuntu·rust
hahaha 1hhh1 天前
用SSH 建立了一个本地端口转发隧道,用于安全地访问远程服务器上的服务,后台运行。autodl
服务器·安全·ssh
刃神太酷啦1 天前
《网络基础全链路深度解析:从Socket编程到HTTPS与TCP/UDP内核机制》----《Hello Linux!》(25)
linux·运维·c语言·网络·c++·tcp/ip·https
小肝一下1 天前
3.linux——进程控制
linux·运维·服务器·进程控制
北山有鸟1 天前
linux设备全解析
linux·运维·服务器