tizen 2.3.1 release
[external/curl.git] / docs / mk-ca-bundle.1
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 2008 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH mk-ca-bundle 1 "5 Jan 2013" "version 1.20" "mk-ca-bundle manual"
24 .SH NAME
25 mk-ca-bundle \- convert mozilla's certdata.txt to PEM format
26 .SH SYNOPSIS
27 mk-ca-bundle [bilnpqstuv]
28 .I [outputfile]
29 .SH DESCRIPTION
30 The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source
31 tree over HTTP, then parses certdata.txt and extracts certificates
32 into PEM format.  By default, only CA root certificates trusted to issue SSL
33 server authentication certificates are extracted. These are then processed with
34 the OpenSSL commandline tool to produce the final ca-bundle file.
35
36 The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
37 (a single dash) you will get the output sent to STDOUT instead of a file.
38
39 The PEM format this scripts uses for output makes the result readily available
40 for use by just about all OpenSSL or GnuTLS powered applications, such as
41 curl, wget and more.
42 .SH OPTIONS
43 The following options are supported:
44 .IP -b
45 backup an existing version of \fIoutputfilename\fP
46 .IP -d [name]
47 specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid
48 names are: aurora, beta, central, mozilla, nss, release (default). They are
49 shortcuts for which source tree to get the cert data from.
50 .IP -f
51 force rebuild even if certdata.txt is current (Added in version 1.17)
52 .IP -i
53 print version info about used modules
54 .IP -l
55 print license info about certdata.txt
56 .IP -n
57 no download of certdata.txt (to use existing)
58 .IP "-p [purposes]:[levels]"
59 list of Mozilla trust purposes and levels for certificates to include in output.
60 Takes the form of a comma separated list of purposes, a colon, and a comma
61 separated list of levels. The default is to include all certificates trusted
62 to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR).
63
64 (Added in version 1.21, Perl only)
65
66 Valid purposes are:
67 .RS
68 ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT,
69 DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN,
70 SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION,
71 IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED
72 .RE
73
74 Valid trust levels are:
75 .RS
76 ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED
77 .RE
78 .IP -q
79 be really quiet (no progress output at all)
80 .IP -t
81 include plain text listing of certificates
82 .IP "-s [algorithms]"
83 comma separated list of signature algorithms with which to hash/fingerprint
84 each certificate and output when run in plain text mode.
85
86 (Added in version 1.21, Perl only)
87
88 Valid algorithms are:
89 .RS
90 ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
91 .RE
92 .IP -u
93 unlink (remove) certdata.txt after processing
94 .IP -v
95 be verbose and print out processed CAs
96 .SH EXIT STATUS
97 Returns 0 on success. Returns 1 if it fails to download data.
98 .SH CERTDATA FORMAT
99 The file format used by Mozilla for this trust information seems to be documented here:
100 .nf
101 http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
102 .fi
103 .SH SEE ALSO
104 .BR curl (1)
105 .SH HISTORY
106 \fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
107 curl and libcurl release (see http://curl.haxx.se/). It was originally based
108 on the parse-certs script written by Roland Krikava and was later much
109 improved by Guenter Knauf.  This manual page was initially written by Jan
110 Schaumann \&<jschauma@netmeister.org>.