Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSLCertificateChainFile is obsolete

I'm on Apache 2.4.12, so SSLCertificateChainFile is now obsolete, and any intermediate certificates are supposed to be included in the server certificate file. I cannot figure out how to do this, however--any combination of certificates other than only the site certificate inside the specified file causes an invalid key error. How do I properly include the intermediate certificate inside the file that I specify using SSLCertificateFile?

like image 533
vaindil Avatar asked Jul 12 '15 17:07

vaindil


People also ask

What is Sslcertificatechainfile?

SSLCertificateKeyFile. This directive points to the PEM-encoded private key file for the server. If the contained private key is encrypted, the passphrase dialog is forced at startup time.

Where is Sslcertificatefile?

The file may be called httpd. conf, apache2. conf or ssl. conf and may be located at /etc/httpd/, /etc/apache2/ or /etc/httpd/conf.

What is Ssl_module in Apache?

mod_ssl is an optional module for the Apache HTTP Server. It provides strong cryptography for the Apache v1. 3 and v2 webserver via the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) cryptographic protocols by the help of the Open Source SSL/TLS toolkit OpenSSL.

How do I get a SSL certificate chain file?

Get Your Certificate Chain If you have missing chain certificates or don't know what they are, you can use the certificate chain composer tool above to fetch them. Simply paste in the contents of your . crt file and it will return your complete certificate including the intermediate certificates.


1 Answers

Taken from the Apache 2.4 Module mod_ssl documentation:

SSLCertificateFile Directive

The files may also include intermediate CA certificates, sorted from leaf to root. This is supported with version 2.4.8 and later, and obsoletes SSLCertificateChainFile.

What this means is that the SSLCertificateFile directive now (after 2.4.8) accepts files with a full certificate chain (from leaf to root). If you have your server certificate in domain.crt and the CA chain file in domain-ca.crt, you'd need to concatenate both files from leaf to root, i.e. starting with your server certificate, as in

cat domain.crt domain-ca.crt > bundle.crt

and use that file inside your site's conf file:

SSLCertificateFile      /path/to/bundle.crt

(For example, using Ubuntu default path, these files will be stored at /etc/apache2/ssl/.)

like image 144
Jonathan Y. Avatar answered Sep 21 '22 23:09

Jonathan Y.