• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel.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]
18*[outputfile]*
19
20# DESCRIPTION
21
22The mk-ca-bundle tool downloads the *certdata.txt* file from Mozilla's source
23tree over HTTPS, then parses *certdata.txt* and extracts certificates into PEM
24format. By 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 file.
27
28The default *outputfile* name is **ca-bundle.crt**. By setting it to '-' (a
29single dash) you will 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 *outputfilename*
42
43## -d [name]
44
45specify which Mozilla tree to pull *certdata.txt* from (or a custom
46URL). Valid names are: aurora, beta, central, Mozilla, nss, release
47(default). They are shortcuts for which source tree to get the certificates
48data 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 will fail
61if the 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 will make those comments get passed on
73to the output file. The meta data is not parsed in any way by mk-ca-bundle.
74
75## -n
76
77no download of *certdata.txt* (to use 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*, *KEY_CERT_SIGN*,
88*CRL_SIGN*, *SERVER_AUTH* (default), *CLIENT_AUTH*, *CODE_SIGNING*,
89*EMAIL_PROTECTION*, *IPSEC_END_SYSTEM*, *IPSEC_TUNNEL*, *IPSEC_USER*,
90*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
105comma 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~~~c
127https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
128~~~
129