Dmitry Kaigorodov
Dmitry Kaigorodov

Reputation: 1533

Key appears to be malformed, or is passphrase-protected

I do not have set and passphrase while creating certificate. And I have this error message then I try to install this certificate on heroku.

$ heroku certs:add server.crt server.key
Resolving trust chain... failed
> Key appears to be malformed, or is passphrase-protected.    

Here is result content of the folder:

$ ls -l
total 24
-rw-r--r--  1 dkaigorodov  staff  2702 Apr 13 18:01 bundle.pem
-rw-r--r--  1 dkaigorodov  staff  1855 Apr 13 18:06 server.crt
-rw-r--r--  1 dkaigorodov  staff  1681 Apr 13 18:06 server.key

I bought certificate from http://dnsimple.com

Upvotes: 0

Views: 428

Answers (3)

chuvpilo
chuvpilo

Reputation: 11

Installing dnsimple/comodo certs on heroku:

    1. save key from dnsimple as "server.key"
    1. save cert from dnsimple as "server.crt"
    1. download intermediate certs: curl https://gist.github.com/rwdaigle/5503531/raw/bundle.pem > bundle.pem
    1. install keys on heroku: $ heroku certs:add server.crt server.key

Sources:

Upvotes: 1

Dmitry Kaigorodov
Dmitry Kaigorodov

Reputation: 1533

The problem was that I used Vim editor to save the certificates. I changed the editor, problem is solved.

Upvotes: 0

GoBlue1616
GoBlue1616

Reputation: 185

Try including the intermediate cert in the upload:

heroku certs:add server.crt bundle.pem server.key

Hope this helps!

Alex

Upvotes: 1

Related Questions