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