curl's project page on


cURL > Docs > Man Page

curl.1 the man page


mk-ca-bundle - convert mozilla's certdata.txt to PEM format


mk-ca-bundle [bilnqtuv] [outputfile]


The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source tree over HTTP, then parses certdata.txt and extracts CA Root Certificates into PEM format. These are then processed with the OpenSSL commandline tool to produce the final ca-bundle file.

The default outputfile name is ca-bundle.crt. By setting it to '-' (a single dash) you will get the output sent to STDOUT instead of a file.

The PEM format this scripts uses for output makes the result readily available for use by just about all OpenSSL or GnuTLS powered applications, such as curl, wget and more.


The following options are supported:


backup an existing version of outputfilename

-d [name]

specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid names are: aurora, beta, central, mozilla, nss, release (default). They are shortcuts for which source tree to get the cert data from.


force rebuild even if certdata.txt is current (Added in version 1.17)


print version info about used modules


print license info about certdata.txt


no download of certdata.txt (to use existing)


be really quiet (no progress output at all)


include plain text listing of certificates


unlink (remove) certdata.txt after processing


be verbose and print out processed CAs


Returns 0 on success. Returns 1 if it fails to download data.


The file format used by Mozilla for this trust information seems to be documented here:


curl (1)


mk-ca-bundle is a command line tool that is shipped as part of every curl and libcurl release (see It was originally based on the parse-certs script written by Roland Krikava and was later much improved by Guenter Knauf. This manual page was initially written by Jan Schaumann <>.

This HTML page was made with roffit.

donate! Page updated March 21, 2014.
web site info

File upload with ASP.NET