代码之家  ›  专栏  ›  技术社区  ›  Alexis.Rolland user2915097

生成cert.pem和密钥。Windows上的pem

  •  0
  • Alexis.Rolland user2915097  · 技术社区  · 7 年前

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

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

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

    我遵循了这个指南,但它只产生了一个 .crt .key 而不是文件。

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

    0 回复  |  直到 6 年前
        1
  •  0
  •   Alexis.Rolland user2915097    6 年前

    从上述评论中收集答案:

    重命名privateKey。钥匙对钥匙。pem和证书。crt至cert.pem。它应该很好用

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