
使用OpenSSL生成自签名SSL/TLS证书和私钥
openssl
传输层安全性/安全套接层及其加密库
项目地址:https://gitcode.com/gh_mirrors/ope/openssl

·
使用OpenSSL生成自签名SSL/TLS证书和私钥
前提: 系统安装了OpenSSL;
系统:windows、linux都可;
1 生成私钥
创建一个名为 server.key 的私钥文件,并使用 RSA 算法生成一个 2048 位的密钥。
openssl genrsa -out server.key 2048
2 生成证书请求
在命令行中输入以下命令以生成证书请求(CSR)
openssl req -new -key server.key -out server.csr
3 生成自签名证书
创建一个名为 server.crt 的自签名证书文件,并使用私钥文件对其进行签名。
openssl x509 -req -in server.csr -signkey server.key -out server.crt
4 注意项
- 当证书用于配置
nginx
的SSL
证书时,通过浏览器访问https
可能会有不安全的提示; - 通过
postman
等工具访问https
时,需要在postman
设置中将SSL certificate verification
设置为OFF
。




传输层安全性/安全套接层及其加密库
最近提交(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 天前
更多推荐
所有评论(0)