下载和安装OpenSSL

可以去百度下载OpenSSL Win64,也可以从下面的地址下载

OpenSSL-Win64-3.0.7.zip

生成证书

切换到openssl/bin目录,执行以下指令生成证书

创建自签名根证书
openssl req -new -x509 -days 365 -extensions v3_ca -keyout crt/ca.key -out crt/ca.crt

创建服务端证书
openssl genrsa -out crt/server.key 2048
openssl req -out crt/server.csr -key crt/server.key -new
openssl x509 -req -in crt/server.csr -CA crt/ca.crt -CAkey crt/ca.key -CAcreateserial -out crt/server.crt -days 365

创建客户端证书
openssl genrsa -out crt/client.key 2048
openssl req -out crt/client.csr -key crt/client.key -new
openssl x509 -req -in crt/client.csr -CA crt/ca.crt -CAkey crt/ca.key -CAcreateserial -out crt/client.crt -days 365

所有证书和中间文件,会保存到crt目录当中

中间会要求输入许多的信息,都可以跳过

只有操作密码和主机名,是必须输入的

Pass Phrase:操作密码,可以用123456
Common Name:主机名,可以用域名或IP

证书生成完毕后,记得双击crt证书文件,将其安装到【受信任的根证书颁发机构】

GitHub 加速计划 / ope / openssl
24
1
下载
传输层安全性/安全套接层及其加密库
最近提交(Master分支:4 个月前 )
75bc132d Current preforms the following operations 1) Generates arbitrary key pairs 2) Generates key pairs with parameters (both correct and incorrect) based on fuzzer input buffer 3) Exports and re-imports keys, confirming validity 4) Preforms Sign and Verify operations with optional parameters based on fuzzer input buffer Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26708) 9 天前
0e436524 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/26701) 9 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐