.\" ************************************************************************** .\" * _ _ ____ _ .\" * Project ___| | | | _ \| | .\" * / __| | | | |_) | | .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 2008 - 2016, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms .\" * are also available at https://curl.haxx.se/docs/copyright.html. .\" * .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell .\" * copies of the Software, and permit persons to whom the Software is .\" * furnished to do so, under the terms of the COPYING file. .\" * .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY .\" * KIND, either express or implied. .\" * .\" ************************************************************************** .\" .Dd October 24, 2016 .Dt MK-CA-BUNDLE 1 .Os .Sh NAME .Nm mk-ca-bundle .Nd convert mozilla's certdata.txt to PEM format .Sh SYNOPSIS .Nm mk-ca-bundle .Op Fl fiklmnqt .Op Fl d Ar name .Op Fl p Ar purposes:levels .Op Fl s Ar algorithms .Op Ar outputfile .Sh DESCRIPTION The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source tree over HTTPS, then parses certdata.txt and extracts certificates into PEM format. By default, only CA root certificates trusted to issue SSL server authentication certificates are extracted. These are then processed with the OpenSSL commandline tool to produce the final ca-bundle file. .sp The default .Pa outputfile name is .Pa ca-bundle.crt . By setting it to '-' (a single dash) you will get the output sent to STDOUT instead of a file. .Pp 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. Its options are as follows: The following options are supported: .Bl -tag -width Ds .It Fl b backup an existing version of .Pa outputfile .It Fl d\ [name] specify which Mozilla tree to pull .Pa 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. .It Fl f force rebuild even if .Pa certdata.txt is current (Added in version 1.17) .It Fl i print version info about used modules .It Fl k Allow insecure data transfer. By default (since 1.27) this command will fail if the HTTPS transfer fails. This overrides that decision (and opens for man-in-the-middle attacks). .It Fl l print license info about .Pa certdata.txt .It Fl m (Added in 1.26) Include meta data comments in the output. The meta data is specific information about each certificate that is stored in the original file as comments and using this option will make those comments get passed on to the output file. The meta data is not parsed in any way by .Nm . .It Fl n no download of .Pa certdata.txt (to use existing) .It Fl p\ [purposes]:[levels] list of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. The default is to include all certificates trusted to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR). .sp (Added in version 1.21, Perl only) .sp Valid purposes are: .Bd -literal -offset indent -compact ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT, DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN, SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION, IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED .Ed .sp Valid trust levels are: .Bd -literal -offset indent -compact ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED .Ed .sp .It Fl q be really quiet (no progress output at all) .It Fl t include plain text listing of certificates .It Fl s\ [algorithms] comma separated list of signature algorithms with which to hash/fingerprint each certificate and output when run in plain text mode. .sp (Added in version 1.21, Perl only) .sp Valid algorithms are: .Bd -literal -offset indent -compact ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512 .Ed .It Fl u unlink (remove) certdata.txt after processing .It Fl v be verbose and print out processed CAs .El .Sh EXIT STATUS Returns 0 on success. Returns 1 if it fails to download data. .Sh AUTHORS This manual page was initially written by .An Jan Schaumann Aq Mt jschauma@netmeister.org and converted to mdoc format by .An Nils Gillmann Aq Mt ng0@n0.is . .Sh SEE ALSO .Xr curl 1 .Sh STANDARDS The file format used by Mozilla for this trust information seems to be documented here: .Lk https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html .Sh HISTORY .Nm is a command line tool that is shipped as part of every curl and libcurl release (see .Lk https://curl.haxx.se/ ). It was originally based on the parse-certs script written by Roland Krikava and was later much improved by Guenter Knauf.