use*_*586 7 ruby ssl ruby-on-rails heroku ssl-certificate
我在StartSSL.com上获得了一个安全证书,并密切关注Heroku上的步骤.我获得了中级证书和根证书.
我尝试了不同的方法来链接这些文件,但是我得到了这个错误(见截图)
http://i.imgur.com/8WVmAVu.jpg
我该如何解决这个错误?
我下载的文件是:
ca.pem (root cert)
sub.class1.server.ca.pem (intermediate cert)
copy and pasted the private key as server.key
copy and pasted the certificate as server.orig.crt
There's also the ca-bundle.pem that I tried using but no luck
Run Code Online (Sandbox Code Playgroud)
我刚刚重新加载了所有文件并运行了这个"cat server.orig.crt sub.class1.server.ca.pem ca-bundle.pem> server.crt"然后运行了heroku证书:添加server.crt server.key和我得到这个错误
Unable to read server.crt file
Run Code Online (Sandbox Code Playgroud)
另外,我刚尝试没有任何CAT,只是"heroku certs:添加ca-bundle.pem server.key",我收到此错误
No certificate given is a domain name certificate
Run Code Online (Sandbox Code Playgroud)
适合在heroku上安装的pem编码证书链应按顺序包括:site,intermediate,然后是root pem编码的证书.
cat server.orig.crt sub.class1.server.ca.pem ca.pem > heroku.crt
Run Code Online (Sandbox Code Playgroud)
它看起来更像是您的私钥问题 - 您需要确保pem文件没有使用密码加密,并且它与用于生成证书的密钥对相同.如果加密,私钥的头部将如下所示:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
...
Run Code Online (Sandbox Code Playgroud)
而不只是:
-----BEGIN RSA PRIVATE KEY-----
MIICaQIBAAKBhACxlzv7H57F+vapTjqS9qdfDg20RjwFFU1B3yK8SqN7rX0jpjsW
H3B2lhCqKPWd2To2LoOolhnsFbr5qlKK3ep/nuUZfkx1aOIg4L0FgzbuCSJfKE5B
...
Run Code Online (Sandbox Code Playgroud)
在前一种情况下,运行(linux,mac os):
openssl rsa -in server.key -out server.unencrypted.key
Run Code Online (Sandbox Code Playgroud)
并在提示时输入密码.然后在调用heroku时使用server.unencrypted.key来添加证书.
| 归档时间: |
|
| 查看次数: |
2063 次 |
| 最近记录: |