security/nss/doc/crlutil.xml

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

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
     3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
     4 <!ENTITY date SYSTEM "date.xml">
     5 <!ENTITY version SYSTEM "version.xml">
     6 ]>
     8 <refentry id="crlutil">
    10   <refentryinfo>
    11     <date>&date;</date>
    12     <title>NSS Security Tools</title>
    13     <productname>nss-tools</productname>
    14     <productnumber>&version;</productnumber>
    15   </refentryinfo>
    17   <refmeta>
    18     <refentrytitle>CRLUTIL</refentrytitle>
    19     <manvolnum>1</manvolnum>
    20   </refmeta>
    22   <refnamediv>
    23     <refname>crlutil</refname>
    24     <refpurpose>
    25 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.
    26     </refpurpose>
    27   </refnamediv>
    29   <refsynopsisdiv>
    30     <cmdsynopsis>
    31       <command>crlutil</command>
    32       <arg><replaceable>options</replaceable></arg>
    33       <arg>[<replaceable>arguments</replaceable>]</arg>
    34     </cmdsynopsis>
    35   </refsynopsisdiv>
    37   <refsection>
    38     <title>STATUS</title>
    39     <para>This documentation is still work in progress. Please contribute to the initial review in <ulink url="https://bugzilla.mozilla.org/show_bug.cgi?id=836477">Mozilla NSS bug 836477</ulink>
    40     </para>
    41   </refsection>
    43   <refsection id="description">
    44     <title>Description</title>
    46     <para>The Certificate Revocation List (CRL) Management Tool, <command>crlutil</command>, 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.
    47     </para>
    48     <para>
    49 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.
    50     </para>
    51     <para>
    52 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.
    53     </para>
    55     <para>
    56 To run the Certificate Revocation List Management Tool, type the command
    57     </para>
    58     <para>
    59 crlutil option [arguments]
    60     </para>
    61     <para>
    62 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.
    63     </para>
    65   </refsection>
    67   <refsection id="options">
    68     <title>Options and Arguments</title>
    69 	<para>
    70 	</para>
    71    	<para><command>Options</command></para> 
    72    	<para>
    73 Options specify an action. Option arguments modify an action. 
    74 The options and arguments for the crlutil command are defined as follows:
    75     </para>
    77   <variablelist>
    78     <varlistentry>
    79       <term>-D </term>
    80         <listitem>
    81           <para>
    82 Delete Certificate Revocation List from cert database.
    83           </para>
    84         </listitem>
    85       </varlistentry>
    87     <varlistentry>
    88       <term>-E </term>
    89         <listitem>
    90           <para>
    91 Erase all CRLs of specified type from the cert database
    92           </para>
    93         </listitem>
    94       </varlistentry>
    96     <varlistentry>
    97       <term>-G </term>
    98         <listitem>
    99           <para>
   100 Create new Certificate Revocation List (CRL).
   101           </para>
   102         </listitem>
   103       </varlistentry>
   105     <varlistentry>
   106       <term>-I </term>
   107         <listitem>
   108           <para>
   109 Import a CRL to the cert database
   110           </para>
   111         </listitem>
   112       </varlistentry>
   114     <varlistentry>
   115       <term>-L </term>
   116         <listitem>
   117           <para>
   118 List existing CRL located in cert database file.
   119           </para>
   120         </listitem>
   121       </varlistentry>
   123     <varlistentry>
   124       <term>-M </term>
   125         <listitem>
   126           <para>
   127 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.
   128           </para>
   129         </listitem>
   130       </varlistentry>
   132     <varlistentry>
   133       <term>-S </term>
   134         <listitem>
   135           <para>
   136 Show contents of a CRL file which isn't stored in the database.
   137           </para>
   138         </listitem>
   139       </varlistentry>
   140   </variablelist>
   142   <para><command>Arguments</command></para>
   143   <para>Option arguments modify an action.</para>
   145   <variablelist>
   147       <varlistentry>
   148         <term>-a </term>
   149         <listitem>
   150           <para>
   151 Use ASCII format or allow the use of ASCII format for input and output. This formatting follows RFC #1113.
   152           </para>
   153         </listitem>
   154       </varlistentry>
   156       <varlistentry>
   157         <term>-B </term>
   158         <listitem>
   159           <para>
   160 Bypass CA signature checks.
   161           </para>
   162         </listitem>
   163       </varlistentry>
   165       <varlistentry>
   166         <term>-c crl-gen-file </term>
   167         <listitem>
   168           <para>
   169 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.
   170           </para>
   171         </listitem>
   172       </varlistentry>
   174       <varlistentry>
   175         <term>-d directory </term>
   176         <listitem>
   177           <para>
   178 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.
   179           </para>
   180           <para>
   181 The NSS database files must reside in the same directory.
   182           </para>
   183         </listitem>
   184       </varlistentry>
   186       <varlistentry>
   187         <term>-f password-file </term>
   188         <listitem>
   189           <para>
   190 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.
   191           </para>
   192         </listitem>
   193       </varlistentry>
   195       <varlistentry>
   196         <term>-i crl-file </term>
   197         <listitem>
   198           <para>
   199 Specify the file which contains the CRL to import or show.
   200           </para>
   201         </listitem>
   202       </varlistentry>
   204       <varlistentry>
   205         <term>-l algorithm-name </term>
   206         <listitem>
   207           <para>
   208 Specify a specific signature algorithm. List of possible algorithms: MD2 | MD4 | MD5 | SHA1 | SHA256 | SHA384 | SHA512
   209           </para>
   210         </listitem>
   211       </varlistentry>
   213       <varlistentry>
   214         <term>-n nickname </term>
   215         <listitem>
   216           <para>
   217 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.
   218           </para>
   219         </listitem>
   220       </varlistentry>
   222       <varlistentry>
   223         <term>-o output-file </term>
   224         <listitem>
   225           <para>
   226 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.
   227           </para>
   228         </listitem>
   229       </varlistentry>
   231       <varlistentry>
   232         <term>-P dbprefix </term>
   233         <listitem>
   234           <para>
   235 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.
   236           </para>
   237         </listitem>
   238       </varlistentry>
   240       <varlistentry>
   241         <term>-t crl-type </term>
   242         <listitem>
   243           <para>
   244 Specify type of CRL. possible types are: 0 - SEC_KRL_TYPE, 1 - SEC_CRL_TYPE. This option is obsolete
   245           </para>
   246         </listitem>
   247       </varlistentry>
   249       <varlistentry>
   250         <term>-u url </term>
   251         <listitem>
   252           <para>
   253 Specify the url.
   254           </para>
   255         </listitem>
   256       </varlistentry>
   258       <varlistentry>
   259         <term>-w pwd-string</term>
   260         <listitem>
   261           <para>Provide db password in command line.</para>
   262         </listitem>
   263       </varlistentry>
   265       <varlistentry>
   266         <term>-Z algorithm</term>
   267         <listitem>
   268           <para>Specify the hash algorithm to use for signing the CRL.</para>
   269         </listitem>
   270       </varlistentry>
   272     </variablelist>
   273   </refsection>
   275   <refsection id="syntax">
   276     <title>CRL Generation script syntax</title>
   277     <para>CRL generation script file has the following syntax:</para>
   278     <para>
   279     * Line with comments should have # as a first symbol of a line</para>
   280     <para>
   281     * Set "this update" or "next update" CRL fields:
   282     </para>
   283     <para>           
   284              update=YYYYMMDDhhmmssZ
   285              nextupdate=YYYYMMDDhhmmssZ
   286      </para>
   287     <para>
   288       Field "next update" is optional. Time should be in GeneralizedTime format (YYYYMMDDhhmmssZ).
   289       For example: 20050204153000Z
   290     </para>
   292     <para>* Add an extension to a CRL or a crl certificate entry:</para>
   293     <para>addext extension-name critical/non-critical [arg1[arg2 ...]]</para>
   294     <para>Where:</para>
   295     <para>
   296           extension-name: string value of a name of known extensions.
   297           critical/non-critical: is 1 when extension is critical and 0 otherwise.
   298           arg1, arg2: specific to extension type extension parameters
   299     </para>
   300     <para>
   301       addext uses the range that was set earlier by addcert and will install an extension to every cert entries within the range.
   302     </para>
   303     <para>
   304     * Add certificate entries(s) to CRL:
   305     </para>
   306     <para>
   307           addcert range date
   308     </para>
   309     <para>
   310           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.
   311           date: revocation date of a cert. Date should be represented in GeneralizedTime format (YYYYMMDDhhmmssZ).
   312     </para>
   313     <para>
   314     * Remove certificate entry(s) from CRL
   315     </para>
   316     <para>
   317           rmcert range
   318     </para>
   319     <para>
   320       Where:
   321     </para>
   322     <para>
   323           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.
   324     </para>
   325     <para>
   326     * Change range of certificate entry(s) in CRL
   327     </para>
   328     <para>
   329           range new-range
   330     </para>
   331     <para>
   332       Where:
   333     </para>
   334     <para>
   335           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.
   336     </para>
   337     <para>
   338 Implemented Extensions
   339      </para>
   340      <para>
   341       The extensions defined for CRL provide methods for associating additional attributes with CRLs of theirs entries. For more information see RFC #3280
   342      </para>
   343      <para>
   344     * Add The Authority Key Identifier extension:
   345      </para>
   346      <para>
   347 The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a CRL.
   348      </para>
   349      <para>
   350           authKeyId critical [key-id | dn cert-serial]
   351      </para>
   352      <para>
   353       Where:
   354      </para>
   355      <para>
   356           authKeyIdent: identifies the name of an extension
   357           critical: value of 1 of 0. Should be set to 1 if this extension is critical or 0 otherwise.
   358           key-id: key identifier represented in octet string. dn:: is a CA distinguished name cert-serial: authority certificate serial number. 
   359      </para>
   360      <para>
   361     * Add Issuer Alternative Name extension:
   362      </para>
   363      <para>
   364       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.
   365      </para>
   366      <para>
   367           issuerAltNames non-critical name-list
   368      </para>
   369      <para>
   370       Where:
   371      </para>
   372      <para>
   373           subjAltNames: identifies the name of an extension
   374           should be set to 0 since this is non-critical extension
   375           name-list: comma separated list of names
   376      </para>
   377      <para>
   378     * Add CRL Number extension:
   379      </para>
   380      <para>
   381       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
   382      </para>
   383      <para>
   384           crlNumber non-critical number
   385      </para>
   386      <para>
   387       Where:
   388      </para>
   389      <para>
   390           crlNumber: identifies the name of an extension
   391           critical: should be set to 0 since this is non-critical extension
   392           number: value of long which identifies the sequential number of a CRL.
   393      </para>
   394      <para>
   395     * Add Revocation Reason Code extension:
   396      </para>
   397      <para>
   398       The reasonCode is a non-critical CRL entry extension that identifies the reason for the certificate revocation.
   399      </para>
   400      <para>
   401           reasonCode non-critical code
   402      </para>
   403      <para>
   404       Where:
   405      </para>
   406      <para>
   407           reasonCode: identifies the name of an extension
   408           non-critical: should be set to 0 since this is non-critical extension
   409           code: the following codes are available:
   410      </para>
   411      <para>
   412               unspecified (0),
   413               keyCompromise (1),
   414               cACompromise (2),
   415               affiliationChanged (3),
   416               superseded (4),
   417               cessationOfOperation (5),
   418               certificateHold (6),
   419               removeFromCRL (8),
   420               privilegeWithdrawn (9),
   421               aACompromise (10)
   422      </para>
   423      <para>
   424     * Add Invalidity Date extension:
   425      </para>
   426      <para>
   427       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.
   428      </para>
   429      <para>
   430           invalidityDate non-critical date
   431      </para>
   432      <para>
   433       Where:
   434      </para>
   435      <para>
   436           crlNumber: identifies the name of an extension
   437           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).
   438      </para>
   439   </refsection>
   441   <refsection id="usage">
   442     <title>Usage</title>
   443     <para>
   444 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.
   445     </para>
   446     <para>See "Implemented extensions" for more information regarding extensions and their parameters.</para>
   447     <para>
   448     * Creating or modifying a CRL:
   449     </para>
   450       <programlisting>
   451 crlutil -G|-M -c crl-gen-file -n nickname [-i crl] [-u url] [-d keydir] [-P dbprefix] [-l alg] [-a] [-B] 
   452       </programlisting>
   453     <para>
   454     * Listing all CRls or a named CRL:
   455     </para>
   456       <programlisting>
   457 	crlutil -L [-n crl-name] [-d krydir] 
   458       </programlisting>
   460     <para>
   461     * Deleting CRL from db:
   462     </para>
   463       <programlisting>
   464 	crlutil -D -n nickname [-d keydir] [-P dbprefix] 
   465       </programlisting>
   467     <para>
   468     * Erasing CRLs from db:
   469     </para>
   470       <programlisting>
   471 	crlutil -E [-d keydir] [-P dbprefix] 
   472       </programlisting>
   474     <para>
   475     * Deleting CRL from db: 
   476     </para>
   477     <programlisting>
   478           crlutil -D -n nickname [-d keydir] [-P dbprefix]
   479     </programlisting>
   481     <para>
   482     * Erasing CRLs from db:
   483     </para>
   484     <programlisting>
   485           crlutil -E [-d keydir] [-P dbprefix] 
   486     </programlisting>
   488     <para>
   489     * Import CRL from file:
   490     </para>
   491     <programlisting>
   492           crlutil -I -i crl [-t crlType] [-u url] [-d keydir] [-P dbprefix] [-B] 
   493     </programlisting>
   494   </refsection>
   496   <refsection id="seealso">
   497     <title>See Also</title>
   498     <para>certutil(1)</para>
   499   </refsection>
   501 <!-- don't change -->
   502   <refsection id="resources">
   503     <title>Additional Resources</title>
   504 	<para>For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at <ulink url="http://www.mozilla.org/projects/security/pki/nss/">http://www.mozilla.org/projects/security/pki/nss/</ulink>. The NSS site relates directly to NSS code changes and releases.</para>
   505 	<para>Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto</para>
   506 	<para>IRC: Freenode at #dogtag-pki</para>
   507   </refsection>
   509 <!-- fill in your name first; keep the other names for reference -->
   510   <refsection id="authors">
   511     <title>Authors</title>
   512     <para>The NSS tools were written and maintained by developers with Netscape, Red Hat,  Sun, Oracle, Mozilla, and Google.</para>
   513     <para>
   514 	Authors: Elio Maldonado &lt;emaldona@redhat.com>, Deon Lackey &lt;dlackey@redhat.com>.
   515     </para>
   516   </refsection>
   518 <!-- don't change -->
   519   <refsection id="license">
   520     <title>LICENSE</title>
   521     <para>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/.
   522     </para>
   523   </refsection>
   525 </refentry>

mercurial