sslherokussl-certificatednsimple

Heroku Comodo SSL and it not working?


I purchased, this morning SLL certificates from Comodo (via DNSimple) and have been trying to get it to work on my domain. Sigh. Not having a lot of success.

The certificates I have are listed in the email from Comodo as:

Root CA Certificate - AddTrustExternalCARoot.crt
Intermediate CA Certificate - COMODORSAAddTrustCA.crt
Intermediate CA Certificate - COMODORSADomainValidationSecureServerCA.crt
Your EssentialSSL Certificate - www_XXXXXXX_com.crt

Following the blog post by Ryan McGeary I have ensured that I do the following putting the cry files in the reverse order from that suggested in the email:

cat www_XXXXXXXX_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > www_XXXXXXXX_com-bundle.pem

I downloaded the key from DNSimple too and saved that to a file called server.key.

When I add the certificates to Heroku I use the following command:

heroku certs:add www_XXXXXXXX_com-bundle.pem server.key

Which seemed to report no errors in the following:

Resolving trust chain... done
Adding SSL Endpoint to XXXXXXXX... done
XXXXXXXX now served by XXXXXXXX.herokussl.com
Certificate details:
Common Name(s): XXXXXXXX.com
                www.XXXXXXXX.com

Expires At:     2015-09-28 23:59 UTC
Issuer:         /OU=Domain Control Validated/OU=EssentialSSL/CN=www.XXXXXXXX.com
Starts At:      2014-09-28 00:00 UTC
Subject:        /OU=Domain Control Validated/OU=EssentialSSL/CN=www.XXXXXXXX.com
SSL certificate is verified by a root authority.

When I do heroku certs, I get the following:

Endpoint                   Common Name(s)                  Expires               Trusted
-------------------------  ------------------------------  --------------------  -------
XXXXXXXXXXX.herokussl.com  www.XXXXXXXX.com, XXXXXXXX.com  2015-09-28 23:59 UTC  True

Following the instruction from Heroku I try the certificate with:

curl -kvI https://www.XXXXXXXX.com

Heroku says I should expect output similar to:

$curl -kvI https://www.example.com
* About to connect() to www.example.com port 443 (#0)
*   Trying 50.16.234.21... connected
* Connected to www.example.com (50.16.234.21) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
*    subject: C=US; ST=CA; L=SF; O=SFDC; OU=Heroku; CN=www.example.com
*    start date: 2011-11-01 17:18:11 GMT
*    expire date: 2012-10-31 17:18:11 GMT
*    common name: www.example.com (matched)
*    issuer: C=US; ST=CA; L=SF; O=SFDC; OU=Heroku; CN=www.heroku.com
*    SSL certificate verify ok.

I don't get anything like that ...

* Adding handle: conn: 0x7fe62c004400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe62c004400) send_pipe: 1, recv_pipe: 0
* About to connect() to www.XXXXXXXX.com port 443 (#0)
*   Trying 50.16.247.106...
* Connected to www.XXXXXXXX.com (50.16.247.106) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: www.XXXXXXXX.com
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
* Server certificate: AddTrust External CA Root
> HEAD / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: www.XXXXXXXX.com
> Accept: */*

And this seems to suggest that when I try https://www.XXXXXXXX.com (my root address) I don't get any indication of the SSL.

Obviously something is wrong, but I have no idea what, or how to correct it. I've followed all the advice I can find online, but it all seems to be slightly different to the certificates I have received from Comodo. And I have no idea how to work this through to make the SSL certificate work.

Any help to resolve this would be excellent as it's really stumped me.

I've also ensured my DNS records for www.XXXXXXXX.com and XXXXXXX.com are pointing to the herokussl.com URL stated in the set up.

I've left this for 10 hours hoping it might "ripple through", but there is something wrong and I don't know what.

Thanks in advance for any help you might be able to give.


Solution

  • Simone was very helpful in checking that things seemed to be working as they should with regards to the installation of the certificate with Heroku. It would appear however that there was "mixed content" on each of my HTML pages which meant the "Protected" icons were not coming up in Safari (and were showing in a limited way in Firefox).

    On changing all HTML content to be referenced with https:// rather than http:// gave me the required security for the whole page.

    I also needed to add the following to my application.rb to get my Rails application to serve all pages securely:

    config.force_ssl = true
    

    Hope this comes in useful for other people!