mk-ca-bundle.1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 2008 - 2016, 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 https://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 "24 Oct 2016" "version 1.27" "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 [options]
  28. .I [outputfile]
  29. .SH DESCRIPTION
  30. The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source
  31. tree over HTTPS, then parses certdata.txt and extracts certificates into PEM
  32. format. By default, only CA root certificates trusted to issue SSL server
  33. authentication certificates are extracted. These are then processed with the
  34. OpenSSL commandline tool to produce the final ca-bundle file.
  35. The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
  36. (a single dash) you will get the output sent to STDOUT instead of a file.
  37. The PEM format this scripts uses for output makes the result readily available
  38. for use by just about all OpenSSL or GnuTLS powered applications, such as
  39. curl, wget and more.
  40. .SH OPTIONS
  41. The following options are supported:
  42. .IP -b
  43. backup an existing version of \fIoutputfilename\fP
  44. .IP "-d [name]"
  45. specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid
  46. names are: aurora, beta, central, mozilla, nss, release (default). They are
  47. shortcuts for which source tree to get the cert data from.
  48. .IP -f
  49. force rebuild even if certdata.txt is current (Added in version 1.17)
  50. .IP -i
  51. print version info about used modules
  52. .IP -k
  53. Allow insecure data transfer. By default (since 1.27) this command will fail
  54. if the HTTPS transfer fails. This overrides that decision (and opens for
  55. man-in-the-middle attacks).
  56. .IP -l
  57. print license info about certdata.txt
  58. .IP -m
  59. (Added in 1.26) Include meta data comments in the output. The meta data is
  60. specific information about each certificate that is stored in the original
  61. file as comments and using this option will make those comments get passed on
  62. to the output file. The meta data is not parsed in any way by mk-ca-bundle.
  63. .IP -n
  64. no download of certdata.txt (to use existing)
  65. .IP "-p [purposes]:[levels]"
  66. list of Mozilla trust purposes and levels for certificates to include in output.
  67. Takes the form of a comma separated list of purposes, a colon, and a comma
  68. separated list of levels. The default is to include all certificates trusted
  69. to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR).
  70. (Added in version 1.21, Perl only)
  71. Valid purposes are:
  72. .RS
  73. ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT,
  74. DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN,
  75. SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION,
  76. IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED
  77. .RE
  78. .IP
  79. Valid trust levels are:
  80. .RS
  81. ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED
  82. .RE
  83. .IP -q
  84. be really quiet (no progress output at all)
  85. .IP -t
  86. include plain text listing of certificates
  87. .IP "-s [algorithms]"
  88. comma separated list of signature algorithms with which to hash/fingerprint
  89. each certificate and output when run in plain text mode.
  90. (Added in version 1.21, Perl only)
  91. Valid algorithms are:
  92. .RS
  93. ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
  94. .RE
  95. .IP -u
  96. unlink (remove) certdata.txt after processing
  97. .IP -v
  98. be verbose and print out processed CAs
  99. .SH EXIT STATUS
  100. Returns 0 on success. Returns 1 if it fails to download data.
  101. .SH CERTDATA FORMAT
  102. The file format used by Mozilla for this trust information seems to be documented here:
  103. .nf
  104. http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
  105. .fi
  106. .SH SEE ALSO
  107. .BR curl (1)
  108. .SH HISTORY
  109. \fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
  110. curl and libcurl release (see https://curl.haxx.se/). It was originally based
  111. on the parse-certs script written by Roland Krikava and was later much
  112. improved by Guenter Knauf. This manual page was initially written by Jan
  113. Schaumann \&<jschauma@netmeister.org>.