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