2024-01-17 18:32:44 +08:00
|
|
|
---
|
2024-02-28 18:28:10 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2024-01-17 18:32:44 +08:00
|
|
|
SPDX-License-Identifier: curl
|
|
|
|
Title: mk-ca-bundle
|
|
|
|
Section: 1
|
|
|
|
Source: mk-ca-bundle
|
|
|
|
See-also:
|
|
|
|
- curl (1)
|
2024-07-18 06:51:50 +08:00
|
|
|
Added-in: n/a
|
2024-01-17 18:32:44 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
|
|
|
mk-ca-bundle - convert Mozilla's certificate bundle to PEM format
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
mk-ca-bundle [options] [output]
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
This tool downloads the *certdata.txt* file from Mozilla's source tree over
|
|
|
|
HTTPS, then parses it and extracts the included certificates into PEM format.
|
|
|
|
By default, only CA root certificates trusted to issue SSL server
|
2024-01-17 18:32:44 +08:00
|
|
|
authentication certificates are extracted. These are then processed with the
|
2024-02-19 16:31:08 +08:00
|
|
|
OpenSSL command line tool to produce the final ca-bundle output file.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
The default *output* name is **ca-bundle.crt**. By setting it to '-' (a single
|
2024-02-27 14:48:10 +08:00
|
|
|
dash) you get the output sent to STDOUT instead of a file.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
and others.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
The following options are supported:
|
|
|
|
|
|
|
|
## -b
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
backup an existing version of *output*
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## -d [name]
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
specify which Mozilla tree to pull *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
|
|
|
|
certificate data from.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## -f
|
|
|
|
|
|
|
|
force rebuild even if *certdata.txt* is current (Added in version 1.17)
|
|
|
|
|
|
|
|
## -i
|
|
|
|
|
|
|
|
print version info about used modules
|
|
|
|
|
|
|
|
## -k
|
|
|
|
|
2024-02-27 14:48:10 +08:00
|
|
|
Allow insecure data transfer. By default (since 1.27) this command fails if
|
|
|
|
the HTTPS transfer fails. This overrides that decision (and opens for
|
2024-01-17 18:32:44 +08:00
|
|
|
man-in-the-middle attacks).
|
|
|
|
|
|
|
|
## -l
|
|
|
|
|
|
|
|
print license info about *certdata.txt*
|
|
|
|
|
|
|
|
## -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
|
2024-02-27 14:48:10 +08:00
|
|
|
file as comments and using this option makes those comments get passed on to
|
|
|
|
the output file. The meta data is not parsed in any way by mk-ca-bundle.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## -n
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
Do not download *certdata.txt* - use the existing.
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## -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*).
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
Valid purposes are: **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**
|
2024-01-17 18:32:44 +08:00
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
Valid trust levels are: **ALL**, **TRUSTED_DELEGATOR** (default), **NOT_TRUSTED**,
|
|
|
|
**MUST_VERIFY_TRUST**, **TRUSTED**
|
2024-01-17 18:32:44 +08:00
|
|
|
|
|
|
|
## -q
|
|
|
|
|
|
|
|
be really quiet (no progress output at all)
|
|
|
|
|
|
|
|
## -t
|
|
|
|
|
|
|
|
include plain text listing of certificates
|
|
|
|
|
|
|
|
## -s [algorithms]
|
|
|
|
|
2024-02-19 16:31:08 +08:00
|
|
|
A comma separated list of signature algorithms with which to hash/fingerprint
|
2024-01-17 18:32:44 +08:00
|
|
|
each certificate and output when run in plain text mode.
|
|
|
|
|
|
|
|
Valid algorithms are:
|
|
|
|
ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
|
|
|
|
|
|
|
|
## -u
|
|
|
|
|
|
|
|
unlink (remove) *certdata.txt* after processing
|
|
|
|
|
|
|
|
## -v
|
|
|
|
|
|
|
|
be verbose and print out processed certificate authorities
|
|
|
|
|
|
|
|
# EXIT STATUS
|
|
|
|
|
|
|
|
Returns 0 on success. Returns 1 if it fails to download data.
|
|
|
|
|
|
|
|
# FILE FORMAT
|
|
|
|
|
|
|
|
The file format used by Mozilla for this trust information is documented here:
|
2024-02-19 16:31:08 +08:00
|
|
|
|
2024-01-17 18:32:44 +08:00
|
|
|
https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
|