security/nss/doc/html/crlutil.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>CRLUTIL</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="CRLUTIL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CRLUTIL</th></tr></table><hr></div><div class="refentry"><a name="crlutil"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crlutil —
michael@0 2 List, generate, modify, or delete CRLs within the NSS security database file(s) and list, create, modify or delete certificates entries in a particular CRL.
michael@0 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">crlutil</code> [<em class="replaceable"><code>options</code></em>] [[<em class="replaceable"><code>arguments</code></em>]]</p></div></div><div class="refsection"><a name="idm233261315520"></a><h2>STATUS</h2><p>This documentation is still work in progress. Please contribute to the initial review in <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=836477" target="_top">Mozilla NSS bug 836477</a>
michael@0 4 </p></div><div class="refsection"><a name="description"></a><h2>Description</h2><p>The Certificate Revocation List (CRL) Management Tool, <span class="command"><strong>crlutil</strong></span>, is a command-line utility that can list, generate, modify, or delete CRLs within the NSS security database file(s) and list, create, modify or delete certificates entries in a particular CRL.
michael@0 5 </p><p>
michael@0 6 The key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
michael@0 7 </p><p>
michael@0 8 This document discusses certificate revocation list management. For information on security module database management, see Using the Security Module Database Tool. For information on certificate and key database management, see Using the Certificate Database Tool.
michael@0 9 </p><p>
michael@0 10 To run the Certificate Revocation List Management Tool, type the command
michael@0 11 </p><p>
michael@0 12 crlutil option [arguments]
michael@0 13 </p><p>
michael@0 14 where options and arguments are combinations of the options and arguments listed in the following section. Each command takes one option. Each option may take zero or more arguments. To see a usage string, issue the command without options, or with the -H option.
michael@0 15 </p></div><div class="refsection"><a name="options"></a><h2>Options and Arguments</h2><p>
michael@0 16 </p><p><span class="command"><strong>Options</strong></span></p><p>
michael@0 17 Options specify an action. Option arguments modify an action.
michael@0 18 The options and arguments for the crlutil command are defined as follows:
michael@0 19 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-D </span></dt><dd><p>
michael@0 20 Delete Certificate Revocation List from cert database.
michael@0 21 </p></dd><dt><span class="term">-E </span></dt><dd><p>
michael@0 22 Erase all CRLs of specified type from the cert database
michael@0 23 </p></dd><dt><span class="term">-G </span></dt><dd><p>
michael@0 24 Create new Certificate Revocation List (CRL).
michael@0 25 </p></dd><dt><span class="term">-I </span></dt><dd><p>
michael@0 26 Import a CRL to the cert database
michael@0 27 </p></dd><dt><span class="term">-L </span></dt><dd><p>
michael@0 28 List existing CRL located in cert database file.
michael@0 29 </p></dd><dt><span class="term">-M </span></dt><dd><p>
michael@0 30 Modify existing CRL which can be located in cert db or in arbitrary file. If located in file it should be encoded in ASN.1 encode format.
michael@0 31 </p></dd><dt><span class="term">-S </span></dt><dd><p>
michael@0 32 Show contents of a CRL file which isn't stored in the database.
michael@0 33 </p></dd></dl></div><p><span class="command"><strong>Arguments</strong></span></p><p>Option arguments modify an action.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">-a </span></dt><dd><p>
michael@0 34 Use ASCII format or allow the use of ASCII format for input and output. This formatting follows RFC #1113.
michael@0 35 </p></dd><dt><span class="term">-B </span></dt><dd><p>
michael@0 36 Bypass CA signature checks.
michael@0 37 </p></dd><dt><span class="term">-c crl-gen-file </span></dt><dd><p>
michael@0 38 Specify script file that will be used to control crl generation/modification. See crl-cript-file format below. If options -M|-G is used and -c crl-script-file is not specified, crlutil will read script data from standard input.
michael@0 39 </p></dd><dt><span class="term">-d directory </span></dt><dd><p>
michael@0 40 Specify the database directory containing the certificate and key database files. On Unix the Certificate Database Tool defaults to $HOME/.netscape (that is, ~/.netscape). On Windows NT the default is the current directory.
michael@0 41 </p><p>
michael@0 42 The NSS database files must reside in the same directory.
michael@0 43 </p></dd><dt><span class="term">-f password-file </span></dt><dd><p>
michael@0 44 Specify a file that will automatically supply the password to include in a certificate or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent unauthorized access to this file.
michael@0 45 </p></dd><dt><span class="term">-i crl-file </span></dt><dd><p>
michael@0 46 Specify the file which contains the CRL to import or show.
michael@0 47 </p></dd><dt><span class="term">-l algorithm-name </span></dt><dd><p>
michael@0 48 Specify a specific signature algorithm. List of possible algorithms: MD2 | MD4 | MD5 | SHA1 | SHA256 | SHA384 | SHA512
michael@0 49 </p></dd><dt><span class="term">-n nickname </span></dt><dd><p>
michael@0 50 Specify the nickname of a certificate or key to list, create, add to a database, modify, or validate. Bracket the nickname string with quotation marks if it contains spaces.
michael@0 51 </p></dd><dt><span class="term">-o output-file </span></dt><dd><p>
michael@0 52 Specify the output file name for new CRL. Bracket the output-file string with quotation marks if it contains spaces. If this argument is not used the output destination defaults to standard output.
michael@0 53 </p></dd><dt><span class="term">-P dbprefix </span></dt><dd><p>
michael@0 54 Specify the prefix used on the NSS security database files (for example, my_cert8.db and my_key3.db). This option is provided as a special case. Changing the names of the certificate and key databases is not recommended.
michael@0 55 </p></dd><dt><span class="term">-t crl-type </span></dt><dd><p>
michael@0 56 Specify type of CRL. possible types are: 0 - SEC_KRL_TYPE, 1 - SEC_CRL_TYPE. This option is obsolete
michael@0 57 </p></dd><dt><span class="term">-u url </span></dt><dd><p>
michael@0 58 Specify the url.
michael@0 59 </p></dd><dt><span class="term">-w pwd-string</span></dt><dd><p>Provide db password in command line.</p></dd><dt><span class="term">-Z algorithm</span></dt><dd><p>Specify the hash algorithm to use for signing the CRL.</p></dd></dl></div></div><div class="refsection"><a name="syntax"></a><h2>CRL Generation script syntax</h2><p>CRL generation script file has the following syntax:</p><p>
michael@0 60 * Line with comments should have # as a first symbol of a line</p><p>
michael@0 61 * Set "this update" or "next update" CRL fields:
michael@0 62 </p><p>
michael@0 63 update=YYYYMMDDhhmmssZ
michael@0 64 nextupdate=YYYYMMDDhhmmssZ
michael@0 65 </p><p>
michael@0 66 Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ).
michael@0 67 For example: 20050204153000Z
michael@0 68 </p><p>* Add an extension to a CRL or a crl certificate entry:</p><p>addext extension-name critical/non-critical [arg1[arg2 ...]]</p><p>Where:</p><p>
michael@0 69 extension-name: string value of a name of known extensions.
michael@0 70 critical/non-critical: is 1 when extension is critical and 0 otherwise.
michael@0 71 arg1, arg2: specific to extension type extension parameters
michael@0 72 </p><p>
michael@0 73 addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range.
michael@0 74 </p><p>
michael@0 75 * Add certificate entries(s) to CRL:
michael@0 76 </p><p>
michael@0 77 addcert range date
michael@0 78 </p><p>
michael@0 79 range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter.
michael@0 80 date: revocation date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhhmmssZ).
michael@0 81 </p><p>
michael@0 82 * Remove certificate entry(s) from CRL
michael@0 83 </p><p>
michael@0 84 rmcert range
michael@0 85 </p><p>
michael@0 86 Where:
michael@0 87 </p><p>
michael@0 88 range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter.
michael@0 89 </p><p>
michael@0 90 * Change range of certificate entry(s) in CRL
michael@0 91 </p><p>
michael@0 92 range new-range
michael@0 93 </p><p>
michael@0 94 Where:
michael@0 95 </p><p>
michael@0 96 new-range: two integer values separated by dash: range of certificates that will be added by this command. dash is used as a delimiter. Only one cert will be added if there is no delimiter.
michael@0 97 </p><p>
michael@0 98 Implemented Extensions
michael@0 99 </p><p>
michael@0 100 The extensions defined for CRL provide methods for associating additional attributes with CRLs of theirs entries. For more information see RFC #3280
michael@0 101 </p><p>
michael@0 102 * Add The Authority Key Identifier extension:
michael@0 103 </p><p>
michael@0 104 The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a CRL.
michael@0 105 </p><p>
michael@0 106 authKeyId critical [key-id | dn cert-serial]
michael@0 107 </p><p>
michael@0 108 Where:
michael@0 109 </p><p>
michael@0 110 authKeyIdent: identifies the name of an extension
michael@0 111 critical: value of 1 of 0. Should be set to 1 if this extension is critical or 0 otherwise.
michael@0 112 key-id: key identifier represented in octet string. dn:: is a CA distinguished name cert-serial: authority certificate serial number.
michael@0 113 </p><p>
michael@0 114 * Add Issuer Alternative Name extension:
michael@0 115 </p><p>
michael@0 116 The issuer alternative names extension allows additional identities to be associated with the issuer of the CRL. Defined options include an rfc822 name (electronic mail address), a DNS name, an IP address, and a URI.
michael@0 117 </p><p>
michael@0 118 issuerAltNames non-critical name-list
michael@0 119 </p><p>
michael@0 120 Where:
michael@0 121 </p><p>
michael@0 122 subjAltNames: identifies the name of an extension
michael@0 123 should be set to 0 since this is non-critical extension
michael@0 124 name-list: comma separated list of names
michael@0 125 </p><p>
michael@0 126 * Add CRL Number extension:
michael@0 127 </p><p>
michael@0 128 The CRL number is a non-critical CRL extension which conveys a monotonically increasing sequence number for a given CRL scope and CRL issuer. This extension allows users to easily determine when a particular CRL supersedes another CRL
michael@0 129 </p><p>
michael@0 130 crlNumber non-critical number
michael@0 131 </p><p>
michael@0 132 Where:
michael@0 133 </p><p>
michael@0 134 crlNumber: identifies the name of an extension
michael@0 135 critical: should be set to 0 since this is non-critical extension
michael@0 136 number: value of long which identifies the sequential number of a CRL.
michael@0 137 </p><p>
michael@0 138 * Add Revocation Reason Code extension:
michael@0 139 </p><p>
michael@0 140 The reasonCode is a non-critical CRL entry extension that identifies the reason for the certificate revocation.
michael@0 141 </p><p>
michael@0 142 reasonCode non-critical code
michael@0 143 </p><p>
michael@0 144 Where:
michael@0 145 </p><p>
michael@0 146 reasonCode: identifies the name of an extension
michael@0 147 non-critical: should be set to 0 since this is non-critical extension
michael@0 148 code: the following codes are available:
michael@0 149 </p><p>
michael@0 150 unspecified (0),
michael@0 151 keyCompromise (1),
michael@0 152 cACompromise (2),
michael@0 153 affiliationChanged (3),
michael@0 154 superseded (4),
michael@0 155 cessationOfOperation (5),
michael@0 156 certificateHold (6),
michael@0 157 removeFromCRL (8),
michael@0 158 privilegeWithdrawn (9),
michael@0 159 aACompromise (10)
michael@0 160 </p><p>
michael@0 161 * Add Invalidity Date extension:
michael@0 162 </p><p>
michael@0 163 The invalidity date is a non-critical CRL entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
michael@0 164 </p><p>
michael@0 165 invalidityDate non-critical date
michael@0 166 </p><p>
michael@0 167 Where:
michael@0 168 </p><p>
michael@0 169 crlNumber: identifies the name of an extension
michael@0 170 non-critical: should be set to 0 since this is non-critical extension date: invalidity date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhhmmssZ).
michael@0 171 </p></div><div class="refsection"><a name="usage"></a><h2>Usage</h2><p>
michael@0 172 The Certificate Revocation List Management Tool's capabilities are grouped as follows, using these combinations of options and arguments. Options and arguments in square brackets are optional, those without square brackets are required.
michael@0 173 </p><p>See "Implemented extensions" for more information regarding extensions and their parameters.</p><p>
michael@0 174 * Creating or modifying a CRL:
michael@0 175 </p><pre class="programlisting">
michael@0 176 crlutil -G|-M -c crl-gen-file -n nickname [-i crl] [-u url] [-d keydir] [-P dbprefix] [-l alg] [-a] [-B]
michael@0 177 </pre><p>
michael@0 178 * Listing all CRls or a named CRL:
michael@0 179 </p><pre class="programlisting">
michael@0 180 crlutil -L [-n crl-name] [-d krydir]
michael@0 181 </pre><p>
michael@0 182 * Deleting CRL from db:
michael@0 183 </p><pre class="programlisting">
michael@0 184 crlutil -D -n nickname [-d keydir] [-P dbprefix]
michael@0 185 </pre><p>
michael@0 186 * Erasing CRLs from db:
michael@0 187 </p><pre class="programlisting">
michael@0 188 crlutil -E [-d keydir] [-P dbprefix]
michael@0 189 </pre><p>
michael@0 190 * Deleting CRL from db:
michael@0 191 </p><pre class="programlisting">
michael@0 192 crlutil -D -n nickname [-d keydir] [-P dbprefix]
michael@0 193 </pre><p>
michael@0 194 * Erasing CRLs from db:
michael@0 195 </p><pre class="programlisting">
michael@0 196 crlutil -E [-d keydir] [-P dbprefix]
michael@0 197 </pre><p>
michael@0 198 * Import CRL from file:
michael@0 199 </p><pre class="programlisting">
michael@0 200 crlutil -I -i crl [-t crlType] [-u url] [-d keydir] [-P dbprefix] [-B]
michael@0 201 </pre></div><div class="refsection"><a name="seealso"></a><h2>See Also</h2><p>certutil(1)</p></div><div class="refsection"><a name="resources"></a><h2>Additional Resources</h2><p>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <a class="ulink" href="http://www.mozilla.org/projects/security/pki/nss/" target="_top">http://www.mozilla.org/projects/security/pki/nss/</a>. The NSS site relates directly to NSS code changes and releases.</p><p>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</p><p>IRC: Freenode at #dogtag-pki</p></div><div class="refsection"><a name="authors"></a><h2>Authors</h2><p>The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</p><p>
michael@0 202 Authors: Elio Maldonado &lt;emaldona@redhat.com&gt;, Deon Lackey &lt;dlackey@redhat.com&gt;.
michael@0 203 </p></div><div class="refsection"><a name="license"></a><h2>LICENSE</h2><p>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 204 </p></div></div><div class="navfooter"><hr></div></body></html>

mercurial