gpt4 book ai didi

ssl - 在 Windows 上生成 cert.pem 和 key.pem

转载 作者:太空宇宙 更新时间:2023-11-03 13:30:51 34 4
gpt4 key购买 nike

我需要生成一个 cert.pemkey.pem 文件来使用 Nginx 加密 http 请求。

在 Linux 上,我会执行以下 OpenSSL 命令:

openssl req -x509 -newkey rsa:4096 -nodes \
-out ./nginx/config/cert.pem \
-keyout ./nginx/config/key.pem -days 365

在 Windows 上生成此类文件的等效命令是什么?我遵循了本指南,但它只生成了一个 .crt.key 文件。

https://helpcenter.gsx.com/hc/en-us/articles/115015960428-How-to-Generate-a-Self-Signed-Certificate-and-Private-Key-using-OpenSSL

最佳答案

从上面的评论中收集答案:

If you install openssl onto windows then it's the same command.

或者

Rename privateKey.key to key.pem and certificate.crt to cert.pem. It should work just fine

或者

我还创建了一个 OpenSSL Docker 容器,它允许生成证书而无需在 Windows 或 Linux 上安装 OpenSSL(假设您已经安装了 Docker):https://github.com/alexisrolland/docker-openssl

关于ssl - 在 Windows 上生成 cert.pem 和 key.pem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55407860/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com