mk-ca-bundle.1 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 2008 - 2022, 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.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. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH mk-ca-bundle 1 "24 Oct 2016" "version 1.27" "mk-ca-bundle manual"
  26. .SH NAME
  27. mk-ca-bundle \- convert Mozilla's certificate bundle to PEM format
  28. .SH SYNOPSIS
  29. mk-ca-bundle [options]
  30. .I [outputfile]
  31. .SH DESCRIPTION
  32. The mk-ca-bundle tool downloads the \fIcertdata.txt\fP file from Mozilla's
  33. source tree over HTTPS, then parses \fIcertdata.txt\fP and extracts
  34. certificates into PEM format. By default, only CA root certificates trusted to
  35. issue SSL server authentication certificates are extracted. These are then
  36. processed with the OpenSSL command line tool to produce the final ca-bundle
  37. file.
  38. The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
  39. (a single dash) you will get the output sent to STDOUT instead of a file.
  40. The PEM format this scripts uses for output makes the result readily available
  41. for use by just about all OpenSSL or GnuTLS powered applications, such as curl
  42. and others.
  43. .SH OPTIONS
  44. The following options are supported:
  45. .IP -b
  46. backup an existing version of \fIoutputfilename\fP
  47. .IP "-d [name]"
  48. specify which Mozilla tree to pull \fIcertdata.txt\fP from (or a custom
  49. URL). Valid names are: aurora, beta, central, Mozilla, nss, release
  50. (default). They are shortcuts for which source tree to get the certificates
  51. data from.
  52. .IP -f
  53. force rebuild even if \fIcertdata.txt\fP is current (Added in version 1.17)
  54. .IP -i
  55. print version info about used modules
  56. .IP -k
  57. Allow insecure data transfer. By default (since 1.27) this command will fail
  58. if the HTTPS transfer fails. This overrides that decision (and opens for
  59. man-in-the-middle attacks).
  60. .IP -l
  61. print license info about \fIcertdata.txt\fP
  62. .IP -m
  63. (Added in 1.26) Include meta data comments in the output. The meta data is
  64. specific information about each certificate that is stored in the original
  65. file as comments and using this option will make those comments get passed on
  66. to the output file. The meta data is not parsed in any way by mk-ca-bundle.
  67. .IP -n
  68. no download of \fIcertdata.txt\fP (to use existing)
  69. .IP "-p [purposes]:[levels]"
  70. list of Mozilla trust purposes and levels for certificates to include in
  71. output. Takes the form of a comma separated list of purposes, a colon, and a
  72. comma separated list of levels. The default is to include all certificates
  73. trusted to issue SSL Server certificates
  74. (\fISERVER_AUTH:TRUSTED_DELEGATOR\fP).
  75. (Added in version 1.21, Perl only)
  76. Valid purposes are:
  77. .RS
  78. \fIALL\fP, \fIDIGITAL_SIGNATURE\fP, \fINON_REPUDIATION\fP,
  79. \fIKEY_ENCIPHERMENT\fP, \fIDATA_ENCIPHERMENT\fP, \fIKEY_AGREEMENT\fP,
  80. \fIKEY_CERT_SIGN\fP, \fICRL_SIGN\fP, \fISERVER_AUTH\fP (default),
  81. \fICLIENT_AUTH\fP, \fICODE_SIGNING\fP, \fIEMAIL_PROTECTION\fP,
  82. \fIIPSEC_END_SYSTEM\fP, \fIIPSEC_TUNNEL\fP, \fIIPSEC_USER\fP,
  83. \fITIME_STAMPING\fP, \fISTEP_UP_APPROVED\fP
  84. .RE
  85. .IP
  86. Valid trust levels are:
  87. .RS
  88. \fIALL\fP, \fITRUSTED_DELEGATOR\fP (default), \fINOT_TRUSTED\fP, \fIMUST_VERIFY_TRUST\fP, \fITRUSTED\fP
  89. .RE
  90. .IP -q
  91. be really quiet (no progress output at all)
  92. .IP -t
  93. include plain text listing of certificates
  94. .IP "-s [algorithms]"
  95. comma separated list of signature algorithms with which to hash/fingerprint
  96. each certificate and output when run in plain text mode.
  97. (Added in version 1.21, Perl only)
  98. Valid algorithms are:
  99. .RS
  100. ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
  101. .RE
  102. .IP -u
  103. unlink (remove) \fIcertdata.txt\fP after processing
  104. .IP -v
  105. be verbose and print out processed certificate authorities
  106. .SH EXIT STATUS
  107. Returns 0 on success. Returns 1 if it fails to download data.
  108. .SH FILE FORMAT
  109. The file format used by Mozilla for this trust information is documented here:
  110. .nf
  111. https://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
  112. .fi
  113. .SH SEE ALSO
  114. .BR curl (1)