ssl - Nginx错误日志中的 "SSL_CTX_use_PrivateKey_file" "problems getting password error"表示什么?

标签 ssl https nginx openssl private-key

<分区>

我正在尝试在 Nginx 上设置 SSL。它不起作用,我在错误日志中收到以下错误,该错误是从编译 nginx 的 OpenSSL 库传递过来的。我不知道那个库是什么,但它是 nginx 的 0.8.54 版本,我在 Ubuntu Linux 上使用 apt-get 安装了它。

2012/02/21 07:06:33 [emerg] 4071#0: 
SSL_CTX_use_PrivateKey_file("/exequias/certs/exequias.com.key") failed (SSL: 
error:0906406D:PEM routines:PEM_def_callback:problems getting password error:
0906A068:PEM routines:PEM_do_header:bad password read error:140B0009:SSL routines:
SSL_CTX_use_PrivateKey_file:PEM lib)

我已确保私钥文件的文件权限不会阻止 nginx 读取它。它是一个 RSA 私钥,由 openssl rsa 生成。

知道是什么原因造成的吗?

最佳答案

删除关键密码短语:

openssl rsa -in key.pem -out newkey.pem

如果证书和 key 在一起:

openssl rsa -in mycert.pem -out newcert.pem
openssl x509 -in mycert.pem >>newcert.pem

来源:http://www.madboa.com/geek/openssl/#key-removepass

关于ssl - Nginx错误日志中的 "SSL_CTX_use_PrivateKey_file" "problems getting password error"表示什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9380403/

相关文章:

python - ssl.SSLError : [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac

django - Nginx 在子目录中为 Django 提供服务 - 管理员登录正在重定向

python - 使用cherrypy进行HTTP和HTTPS

c# - 我的 Web 应用程序正在重定向到安全,我无法阻止它

node.js - 尝试使用 Node 发出 'POST' 请求

nginx - 如何禁止通过 IP 地址直接访问网站

nginx - 是否可以同时提供 hls 和 dash mpeg

internet-explorer - 使用在 IE Trusted Root 中导入的证书不信任 Root CA

c# - https 使用带有 kestrel useHttps 的手动 ssl 证书

Java Spring WS 客户端 - tomcat 或 apache 干扰?