“SSL_CTX_use_PrivateKey_file"是什么?“获取密码错误的问题"在 Nginx 错误日志中指出? [英] What does "SSL_CTX_use_PrivateKey_file" "problems getting password error" indicate in Nginx error log?
问题描述
我正在尝试在 Nginx 上设置 SSL.它不起作用,我在错误日志中收到以下错误,这是从 nginx 编译的 OpenSSL 库传递过来的.我不知道那个库是什么,但它是 nginx 的 0.8.54 版本,我在 Ubuntu Linux 上使用 apt-get 安装了它.
I'm trying to set up SSL on Nginx. It doesn't work, and I am getting the following error in the error log, which is getting passed up from the OpenSSL library which nginx was compiled with. I don't know what that library is, but it's version 0.8.54 of nginx, and I installed it using apt-get on Ubuntu Linux.
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
生成.
I have ensured that the file permissions on the private key file are not stopping nginx from reading it. It is an RSA private key, generated with openssl rsa
.
任何想法可能导致这种情况?
Any ideas what might be causing this?
推荐答案
我明白了……与 nginx 一起使用的私钥文件必须没有有密码.我删除了密码,它起作用了.
I got it... the private key file used with nginx must not have a passphrase. I removed the passphrase and it worked.
这篇关于“SSL_CTX_use_PrivateKey_file"是什么?“获取密码错误的问题"在 Nginx 错误日志中指出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!