我无法生成 Heroku 将为 secure.mydomain.com 接受的 ssl 证书。我正在使用 DNSimple、Cedar Stack,并按照此处的说明进行操作:https ://devcenter.heroku.com/articles/ssl-certificate
- 从 DNSimple 复制 server.key 和 server.orig.crt
- 获取根 CA 证书
$ curl https://knowledge.rapidssl.com/library/VERISIGN/ALL_OTHER/RapidSSL%20Intermediate/RapidSSL_CA_bundle.pem > rapidssl_bundle.pem
- 连接成一个文件
cat server.orig.crt rapidssl_bundle.pem > server.crt
所以现在我有了 server.key 和 server.orig.crt 文件,我尝试用$ heroku certs:add server.crt server.key
. 这给出了错误
Key could not be read since it's protected by a passphrase.
上面的文档没有提到任何关于从 server.key 文件中删除密码的内容。所以我四处寻找并在这里找到了文档:https ://devcenter.heroku.com/articles/ssl#customdomain-ssl 。我在上面的 #1 和 #2 之间运行这些命令:
1b。$ mv server.key server.orig.key
1c。$ openssl rsa -in server.orig.key -out server.key
然而,这给出了错误
unable to load Private Key
47930:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-47/src/crypto/pem/pem_lib.c:648:Expecting: ANY PRIVATE KEY
我怀疑这意味着没有找到私钥。
有人知道这里有什么问题吗?这是 Heroku 问题还是 openssl 问题(或 DNSimple 问题)?