security/nss/cmd/modutil/specification.html

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <html>
michael@0 2 <!-- This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 - License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
michael@0 5 <head>
michael@0 6 <title>Modutil Specification</title>
michael@0 7 </head>
michael@0 8 <body bgcolor=white fgcolor=black>
michael@0 9 <center><h1>PKCS #11 Module Management Utility
michael@0 10 <br><i>Specification</i></h1></center>
michael@0 11
michael@0 12 <!---------------------------------------------------------------------->
michael@0 13 <!-------------------------- capabilities ------------------------------>
michael@0 14 <!---------------------------------------------------------------------->
michael@0 15 <h2>Capabilities</h2>
michael@0 16 <ul>
michael@0 17 <li>Add a PKCS #11 module, specifying a name and library file.
michael@0 18 (<a href="#add">-add</a>)
michael@0 19 <li>Add a PKCS #11 module from a server-formatted JAR file.
michael@0 20 (<a href="#jar">-jar</a>)
michael@0 21 <li>Change the password on or initialize a token.
michael@0 22 (<a href="#changepw">-changepw</a>)
michael@0 23 <li>Create databases (secmod[ule].db, key3.db, cert7.db) from scratch.
michael@0 24 (<a href="#create">-create</a>)
michael@0 25 <li>Switch to and from FIPS-140 compliant mode.
michael@0 26 (<a href="#fips">-fips</a>)
michael@0 27 <li>Delete a PKCS #11 module. (<a href="#delete">-delete</a>)
michael@0 28 <li>List installed PKCS #11 modules. (<a href="#list">-list</a>)
michael@0 29 <li>List detailed info on a particular module and its tokens, including
michael@0 30 whether needs login, is hardware, needs user init
michael@0 31 (<a href="#list">-list</a>)
michael@0 32 <li>Specify which modules should be the default provider of various
michael@0 33 cryptographic operations.(<a href="#default">-default</a>,
michael@0 34 <a href="#undefault">-undefault</a>)
michael@0 35 <li>Disable and enable slots, find out whether and why they are disabled.
michael@0 36 (<a href="#disable">-disable</a>, <a href="#enable">-enable</a>,
michael@0 37 <a href="#list">-list</a>)
michael@0 38 </ul>
michael@0 39
michael@0 40 <hr>
michael@0 41
michael@0 42 <!---------------------------------------------------------------------->
michael@0 43 <!-------------------------- Usage ------------------------------------->
michael@0 44 <!---------------------------------------------------------------------->
michael@0 45 <h2>Usage</h2>
michael@0 46 <code>modutil [<i>command</i>] [<i>options</i>]</code>
michael@0 47 <p>At most one command can be specified. With no arguments,
michael@0 48 <code>modutil</code> prints a usage message.
michael@0 49 <h3>Commands:</h3>
michael@0 50 <table border>
michael@0 51 <tr bgcolor="#cccccc">
michael@0 52 <th>Command</th><th>Description</th>
michael@0 53 </tr>
michael@0 54
michael@0 55 <!---------------------------- -add ------------------------------>
michael@0 56 <tr>
michael@0 57 <td> <a name="add"></a>
michael@0 58 <code>-add <u><i>module name</i></u> -libfile <u><i>library file</i></u>
michael@0 59 [-ciphers <u><i>cipher enable list</i></u>]
michael@0 60 [-mechanisms <u><i>default mechanism list</i></u>]
michael@0 61 </code></td>
michael@0 62 <td>Adds a new module to the database with the given name.
michael@0 63
michael@0 64 <p><u><i>library file</i></u> is the path of the DLL or other library file
michael@0 65 containing the module's implementation of the PKCS #11 interface.
michael@0 66
michael@0 67 <p><u><i>cipher enable flags</i></u> is a colon-separated list of ciphers
michael@0 68 that will be enabled on this module. The list should be enclosed within quotes
michael@0 69 if necessary to prevent shell interpretation. The following ciphers are
michael@0 70 currently available:
michael@0 71 <ul>
michael@0 72 <li>FORTEZZA
michael@0 73 </ul>
michael@0 74
michael@0 75 <p><u><i>default mechanism flags</i></u> is a colon-separated list of
michael@0 76 mechanisms for which this module should be the default provider. The
michael@0 77 list should be enclosed within quotes if necessary to prevent shell
michael@0 78 interpretation. <b>This
michael@0 79 list does not enable the mechanisms; it only specifies that this module
michael@0 80 will be a default provider for the listed mechanisms.</b> If more than
michael@0 81 one module claims to be a default provider for a given mechanism, it is
michael@0 82 undefined which will actually be chosen to provide that mechanism. The
michael@0 83 following mechanisms are currently available:
michael@0 84 <ul>
michael@0 85 <li>RSA
michael@0 86 <li>DSA
michael@0 87 <li>RC2
michael@0 88 <li>RC4
michael@0 89 <li>RC5
michael@0 90 <li>DES
michael@0 91 <li>DH
michael@0 92 <li>FORTEZZA
michael@0 93 <li>SHA1
michael@0 94 <li>MD5
michael@0 95 <li>MD2
michael@0 96 <li>RANDOM <i>(random number generation)</i>
michael@0 97 <li>FRIENDLY <i>(certificates are publicly-readable)</i>
michael@0 98 </ul>
michael@0 99 </td>
michael@0 100 </tr>
michael@0 101
michael@0 102 <!-------------------------- -changepw ------------------------------------->
michael@0 103 <tr>
michael@0 104 <td><a name="changepw"></a><code>-changepw <u><i>token name</i></u>
michael@0 105 [-pwfile <u><i>old password file</i></u>]
michael@0 106 [-newpwfile <u><i>new password file</i></u>]</code></td>
michael@0 107 <td>Changes the password on the named token. If the token has not been
michael@0 108 initialized, this command will initialize the PIN.
michael@0 109 If a password file is given, the password will be read from that file;
michael@0 110 otherwise, the password will be obtained interactively.
michael@0 111 <b>Storing passwords in a file is much less secure than supplying them
michael@0 112 interactively.</b>
michael@0 113 <p>The password on the Netscape internal module cannot be changed if
michael@0 114 the <code>-nocertdb</code> option is specified.
michael@0 115 </td>
michael@0 116 </tr>
michael@0 117
michael@0 118 <!-------------------------- -create ------------------------------------->
michael@0 119 <tr>
michael@0 120 <td><a name="create"></a><code>-create</code></td>
michael@0 121 <td>Creates a new secmod[ule].db, key3.db, and cert7.db in the directory
michael@0 122 specified with the
michael@0 123 <code>-dbdir</code> option, if one is specified. If no directory is
michael@0 124 specified, UNIX systems will use the user's .netscape directory, while other
michael@0 125 systems will return with an error message. If any of these databases already
michael@0 126 exist in the chosen directory, an error message is returned.
michael@0 127 <p>If used with <code>-nocertdb</code>, only secmod[ule].db will be created;
michael@0 128 cert7.db and key3.db will not be created.
michael@0 129 </td>
michael@0 130 </tr>
michael@0 131
michael@0 132 <!------------------------------ -default -------------------------------->
michael@0 133 <tr>
michael@0 134 <td> <a name="default"></a> <code>-default <u><i>module name</i></u>
michael@0 135 -mechanisms <u><i>mechanism list</i></u></code>
michael@0 136 </td>
michael@0 137 <td>Specifies that the given module will be a default provider of the
michael@0 138 listed mechanisms. The mechanism list is the same as in the <code>-add</code>
michael@0 139 command.
michael@0 140 </td>
michael@0 141 </tr>
michael@0 142
michael@0 143 <!-------------------------- -delete ------------------------------------->
michael@0 144 <tr>
michael@0 145 <td><a name="delete"></a><code>-delete <u><i>module name</i></u></code></td>
michael@0 146 <td>Deletes the named module from the database</td>
michael@0 147 </tr>
michael@0 148
michael@0 149 <!-------------------------- -disable ------------------------------------->
michael@0 150 <tr>
michael@0 151 <td> <a name="disable"></a> <code>-disable <u><i>module name</i></u>
michael@0 152 [-slot <u><i>slot name</i></u>]</code></td>
michael@0 153 <td>Disables the named slot. If no slot is specified, all slots on
michael@0 154 the module are disabled.</td>
michael@0 155 </tr>
michael@0 156
michael@0 157 <!-------------------------- -enable ------------------------------------->
michael@0 158 <tr>
michael@0 159 <td> <a name="enable"></a> <code>-enable <u><i>module name</i></u>
michael@0 160 [-slot <u><i>slot name</i></u>]</code></td>
michael@0 161 <td>Enables the named slot. If no slot is specified, all slots on
michael@0 162 the module are enabled.</td>
michael@0 163 </tr>
michael@0 164
michael@0 165 <!-------------------------- -fips ------------------------------------->
michael@0 166 <tr>
michael@0 167 <td><a name="fips"></a><code>-fips [true | false]</code></td>
michael@0 168 <td>Enables or disables FIPS mode on the internal module. Passing
michael@0 169 <code>true</code> enables FIPS mode, passing <code>false</code> disables
michael@0 170 FIPS mode.</td>
michael@0 171 </tr>
michael@0 172
michael@0 173 <!-------------------------- -force ------------------------------------->
michael@0 174 <tr>
michael@0 175 <td><a name="force"></a><code>-force</code></td>
michael@0 176 <td>Disables interactive prompts, so modutil can be run in a script.
michael@0 177 Should only be used by experts, since the prompts may relate to security
michael@0 178 or database integrity. Before using this option, test the command
michael@0 179 interactively once to see the warnings that are produced.</td>
michael@0 180 </tr>
michael@0 181
michael@0 182 <!-------------------------- -jar ------------------------------------->
michael@0 183 <tr>
michael@0 184 <td><a name="jar"></a><code>-jar <u><i>JAR file</i></u>
michael@0 185 -installdir <u><i>root installation directory</i></u>
michael@0 186 [-tempdir <u><i>temporary directory</i></u>]</code></td>
michael@0 187 <td>Adds a new module from the given JAR file. The JAR file uses the
michael@0 188 server <a href="pk11jar.html">PKCS #11 JAR format</a> to describe the names of
michael@0 189 any files that need to be installed, the name of the module, mechanism flags,
michael@0 190 and cipher flags. The <u><i>root installation directory</i></u>
michael@0 191 is the directory relative to which files will be installed. This should be a
michael@0 192 directory
michael@0 193 under which it would be natural to store dynamic library files, such as
michael@0 194 a server's root directory, or Communicator's root directory.
michael@0 195 The <u><i>temporary directory</i></u> is where temporary modutil files
michael@0 196 will be created in the course of the installation. If no temporary directory
michael@0 197 is specified, the current directory will be used.
michael@0 198 <p>If used with the <code>-nocertdb</code> option, the signatures on the JAR
michael@0 199 file will not be checked.</td>
michael@0 200 </tr>
michael@0 201
michael@0 202 <!----------------------------- -list ------------------------------>
michael@0 203 <tr>
michael@0 204 <td><a name="list"></a><code>-list [<u><i>module name</i></u>]</code></td>
michael@0 205 <td>Without an argument, lists the PKCS #11 modules present in the module
michael@0 206 database.
michael@0 207 <blockquote>
michael@0 208 <pre>
michael@0 209 % <b>modutil -list</b>
michael@0 210 Using database directory /u/nicolson/.netscape...
michael@0 211
michael@0 212 Listing of PKCS #11 Modules
michael@0 213 -----------------------------------------------------------
michael@0 214 1. Netscape Internal PKCS #11 Module
michael@0 215 slots: 2 slots attached
michael@0 216 status: loaded
michael@0 217
michael@0 218 slot: Communicator Internal Cryptographic Services Version 4.0
michael@0 219 token: Communicator Generic Crypto Svcs
michael@0 220
michael@0 221 slot: Communicator User Private Key and Certificate Services
michael@0 222 token: Communicator Certificate DB
michael@0 223 -----------------------------------------------------------
michael@0 224 </pre>
michael@0 225 </blockquote>
michael@0 226 <p>With an argument, provides a detailed description of the named module
michael@0 227 and its slots and tokens.
michael@0 228 <blockquote>
michael@0 229 <pre>
michael@0 230 % <b>modutil -list "Netscape Internal PKCS #11 Module"</b>
michael@0 231 Using database directory /u/nicolson/.netscape...
michael@0 232
michael@0 233 -----------------------------------------------------------
michael@0 234 Name: Netscape Internal PKCS #11 Module
michael@0 235 Library file: **Internal ONLY module**
michael@0 236 Manufacturer: Netscape Communications Corp
michael@0 237 Description: Communicator Internal Crypto Svc
michael@0 238 PKCS #11 Version 2.0
michael@0 239 Library Version: 4.0
michael@0 240 Cipher Enable Flags: None
michael@0 241 Default Mechanism Flags: RSA:DSA:RC2:RC4:DES:SHA1:MD5:MD2
michael@0 242
michael@0 243 Slot: Communicator Internal Cryptographic Services Version 4.0
michael@0 244 Manufacturer: Netscape Communications Corp
michael@0 245 Type: Software
michael@0 246 Version Number: 4.1
michael@0 247 Firmware Version: 0.0
michael@0 248 Status: Enabled
michael@0 249 Token Name: Communicator Generic Crypto Svcs
michael@0 250 Token Manufacturer: Netscape Communications Corp
michael@0 251 Token Model: Libsec 4.0
michael@0 252 Token Serial Number: 0000000000000000
michael@0 253 Token Version: 4.0
michael@0 254 Token Firmware Version: 0.0
michael@0 255 Access: Write Protected
michael@0 256 Login Type: Public (no login required)
michael@0 257 User Pin: NOT Initialized
michael@0 258
michael@0 259 Slot: Communicator User Private Key and Certificate Services
michael@0 260 Manufacturer: Netscape Communications Corp
michael@0 261 Type: Software
michael@0 262 Version Number: 3.0
michael@0 263 Firmware Version: 0.0
michael@0 264 Status: Enabled
michael@0 265 Token Name: Communicator Certificate DB
michael@0 266 Token Manufacturer: Netscape Communications Corp
michael@0 267 Token Model: Libsec 4.0
michael@0 268 Token Serial Number: 0000000000000000
michael@0 269 Token Version: 7.0
michael@0 270 Token Firmware Version: 0.0
michael@0 271 Access: NOT Write Protected
michael@0 272 Login Type: Login required
michael@0 273 User Pin: Initialized
michael@0 274
michael@0 275 -----------------------------------------------------------
michael@0 276 </pre>
michael@0 277 </blockquote>
michael@0 278 </td>
michael@0 279 </tr>
michael@0 280
michael@0 281 <!------------------------------ Undefault ------------------------------->
michael@0 282 <tr>
michael@0 283 <td><a name="undefault"></a><code>-undefault <u><i>module name</i></u>
michael@0 284 -mechanisms <u><i>mechanism list</i></u></code></td>
michael@0 285 <td>Specifies that the given module will NOT be a default provider of
michael@0 286 the listed mechanisms. This command clears the default mechanism flags
michael@0 287 for the given module.</td>
michael@0 288 </tr>
michael@0 289
michael@0 290 </table>
michael@0 291
michael@0 292 <!------------------------------------------------------------------------>
michael@0 293 <!------------------------------ Options --------------------------------->
michael@0 294 <!------------------------------------------------------------------------>
michael@0 295 <h3>Options:</h3>
michael@0 296 <table border>
michael@0 297 <tr bgcolor="#cccccc"><th>Option</th><th>Description</th> </tr>
michael@0 298
michael@0 299 <!------------------------------ -dbdir ---------------------------------->
michael@0 300 <tr>
michael@0 301 <td><code>-dbdir <u><i>directory</i></u></code></td>
michael@0 302 <td>Specifies which directory holds the module database. On UNIX systems,
michael@0 303 the user's netscape directory is the default. On other systems, there is
michael@0 304 no default, and this option must be used.</td>
michael@0 305 </tr>
michael@0 306
michael@0 307 <!------------------------------ -dbdir ---------------------------------->
michael@0 308 <tr>
michael@0 309 <td><code>-nocertdb</code></td>
michael@0 310 <td>Do not open the certificate or key databases. This has several effects.
michael@0 311 With the <code>-create</code> command, this means that only a secmod.db file
michael@0 312 will be created; cert7.db and key3.db will not be created. With the
michael@0 313 <code>-jar</code> command, signatures on the JAR file will not be checked.
michael@0 314 With the <code>-changepw</code> command, the password on the Netscape internal
michael@0 315 module cannot be set or changed, since this password is stored in key3.db.
michael@0 316 </td>
michael@0 317 </tr>
michael@0 318
michael@0 319 </table>
michael@0 320
michael@0 321 </body>
michael@0 322 </html>

mercurial