1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: mk-ca-bundle 5Section: 1 6Source: mk-ca-bundle 7See-also: 8 - curl (1) 9Added-in: n/a 10--- 11 12# NAME 13 14mk-ca-bundle - convert Mozilla's certificate bundle to PEM format 15 16# SYNOPSIS 17 18mk-ca-bundle [options] [output] 19 20# DESCRIPTION 21 22This tool downloads the *certdata.txt* file from Mozilla's source tree over 23HTTPS, then parses it and extracts the included certificates into PEM format. 24By default, only CA root certificates trusted to issue SSL server 25authentication certificates are extracted. These are then processed with the 26OpenSSL command line tool to produce the final ca-bundle output file. 27 28The default *output* name is **ca-bundle.crt**. By setting it to '-' (a single 29dash) you get the output sent to STDOUT instead of a file. 30 31The PEM format this scripts uses for output makes the result readily available 32for use by just about all OpenSSL or GnuTLS powered applications, such as curl 33and others. 34 35# OPTIONS 36 37The following options are supported: 38 39## -b 40 41backup an existing version of *output* 42 43## -d [name] 44 45specify which Mozilla tree to pull *certdata.txt* from (or a custom URL). 46Valid names are: **aurora**, **beta**, **central**, **Mozilla**, **nss**, 47**release** (default). They are shortcuts for which source tree to get the 48certificate data from. 49 50## -f 51 52force rebuild even if *certdata.txt* is current (Added in version 1.17) 53 54## -i 55 56print version info about used modules 57 58## -k 59 60Allow insecure data transfer. By default (since 1.27) this command fails if 61the HTTPS transfer fails. This overrides that decision (and opens for 62man-in-the-middle attacks). 63 64## -l 65 66print license info about *certdata.txt* 67 68## -m 69 70(Added in 1.26) Include meta data comments in the output. The meta data is 71specific information about each certificate that is stored in the original 72file as comments and using this option makes those comments get passed on to 73the output file. The meta data is not parsed in any way by mk-ca-bundle. 74 75## -n 76 77Do not download *certdata.txt* - use the existing. 78 79## -p [purposes]:[levels] 80 81list of Mozilla trust purposes and levels for certificates to include in 82output. Takes the form of a comma separated list of purposes, a colon, and a 83comma separated list of levels. The default is to include all certificates 84trusted to issue SSL Server certificates (*SERVER_AUTH:TRUSTED_DELEGATOR*). 85 86Valid purposes are: **ALL**, **DIGITAL_SIGNATURE**, **NON_REPUDIATION**, 87**KEY_ENCIPHERMENT**, **DATA_ENCIPHERMENT**, **KEY_AGREEMENT**, 88**KEY_CERT_SIGN**, **CRL_SIGN**, **SERVER_AUTH** (default), **CLIENT_AUTH**, 89**CODE_SIGNING**, **EMAIL_PROTECTION**, **IPSEC_END_SYSTEM**, 90**IPSEC_TUNNEL**, **IPSEC_USER**, **TIME_STAMPING**, **STEP_UP_APPROVED** 91 92Valid trust levels are: **ALL**, **TRUSTED_DELEGATOR** (default), **NOT_TRUSTED**, 93**MUST_VERIFY_TRUST**, **TRUSTED** 94 95## -q 96 97be really quiet (no progress output at all) 98 99## -t 100 101include plain text listing of certificates 102 103## -s [algorithms] 104 105A comma separated list of signature algorithms with which to hash/fingerprint 106each certificate and output when run in plain text mode. 107 108Valid algorithms are: 109ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512 110 111## -u 112 113unlink (remove) *certdata.txt* after processing 114 115## -v 116 117be verbose and print out processed certificate authorities 118 119# EXIT STATUS 120 121Returns 0 on success. Returns 1 if it fails to download data. 122 123# FILE FORMAT 124 125The file format used by Mozilla for this trust information is documented here: 126 127https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html 128