| 1 |
The file ca-bundle.crt contains root certificates. |
| 2 |
These are installed and used as the default trusted root |
| 3 |
certificates when SSL certificate verification is requested with |
| 4 |
--ssl-verify. On some platforms (some Unixes), these certificates are |
| 5 |
used in addition to any certificates installed by the operating system. |
| 6 |
|
| 7 |
Originally, these certificates were extracted from Windows' certificate store. |
| 8 |
Microsoft's bundle was preferred over Mozilla's because Microsoft may be |
| 9 |
more selective in the organizations it trusts. When this bundle was |
| 10 |
created, Microsoft's store had 107 certificates while Mozilla's had 126. |
| 11 |
|
| 12 |
Unfortunately for us, Windows' certificate trust store is not accessible in this |
| 13 |
way any longer. Therefore we have migrated to the Mozilla trust store. |
| 14 |
|
| 15 |
== How to extract the trusted root CA certificates on Windows (obsolete) |
| 16 |
|
| 17 |
These instructions require the openssl command-line utility. |
| 18 |
|
| 19 |
On Windows XP, run the rootsupd.exe tool to downoad the full list of |
| 20 |
trusted certificates. Otherwise there is only a partial list |
| 21 |
(certificates are downloaded on demand). |
| 22 |
|
| 23 |
http://support.microsoft.com/kb/931125 |
| 24 |
http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/rootsupd.exe |
| 25 |
|
| 26 |
Press "Start", then "Run...". Type "certmgr.msc" and press Enter. Open |
| 27 |
the folder "Trusted Root Certification Authorities" and its subfolder |
| 28 |
"Certificates". Click on "Expiration Date" to sort. Select the first |
| 29 |
certificate that is not expired, then press Shift+down arrow until all |
| 30 |
the non-expired certificates are selected. Right-click on the list of |
| 31 |
certificates, and in the context menu, select "All Tasks", then |
| 32 |
"Export...". Export to the file ca-bundle.p7b. |
| 33 |
|
| 34 |
In a Cygwin shell, enter the directory containing ca-bundle.p7b and run |
| 35 |
the command |
| 36 |
openssl pkcs7 -in ca-bundle.p7b -inform der -print_certs -out ca-bundle.crt |
| 37 |
That will create a file ca-bundle.crt containing all the certificates, |
| 38 |
each preceded by its subject and issuer. |
| 39 |
|
| 40 |
== Retrieving the Mozilla trust store. |
| 41 |
|
| 42 |
Another commonly used trust store is the one provided by Mozilla. The |
| 43 |
cURL package includes a script that automatically creates a suitable PEM |
| 44 |
file from a file in Mozilla's source repository. They also provide |
| 45 |
ready-made PEM files to download. See http://curl.haxx.se/docs/caextract.html. |
| 46 |
|
| 47 |
Here is how to download Mozilla's trust store: |
| 48 |
|
| 49 |
$ wget https://raw.github.com/bagder/curl/master/lib/mk-ca-bundle.pl |
| 50 |
$ perl mk-ca-bundle.pl |