security/nss/doc/nroff/modutil.1

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 '\" t
michael@0 2 .\" Title: MODUTIL
michael@0 3 .\" Author: [see the "Authors" section]
michael@0 4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
michael@0 5 .\" Date: 5 June 2014
michael@0 6 .\" Manual: NSS Security Tools
michael@0 7 .\" Source: nss-tools
michael@0 8 .\" Language: English
michael@0 9 .\"
michael@0 10 .TH "MODUTIL" "1" "5 June 2014" "nss-tools" "NSS Security Tools"
michael@0 11 .\" -----------------------------------------------------------------
michael@0 12 .\" * Define some portability stuff
michael@0 13 .\" -----------------------------------------------------------------
michael@0 14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
michael@0 15 .\" http://bugs.debian.org/507673
michael@0 16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
michael@0 17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
michael@0 18 .ie \n(.g .ds Aq \(aq
michael@0 19 .el .ds Aq '
michael@0 20 .\" -----------------------------------------------------------------
michael@0 21 .\" * set default formatting
michael@0 22 .\" -----------------------------------------------------------------
michael@0 23 .\" disable hyphenation
michael@0 24 .nh
michael@0 25 .\" disable justification (adjust text to left margin only)
michael@0 26 .ad l
michael@0 27 .\" -----------------------------------------------------------------
michael@0 28 .\" * MAIN CONTENT STARTS HERE *
michael@0 29 .\" -----------------------------------------------------------------
michael@0 30 .SH "NAME"
michael@0 31 modutil \- Manage PKCS #11 module information within the security module database\&.
michael@0 32 .SH "SYNOPSIS"
michael@0 33 .HP \w'\fBmodutil\fR\ 'u
michael@0 34 \fBmodutil\fR [\fIoptions\fR] [[\fIarguments\fR]]
michael@0 35 .SH "STATUS"
michael@0 36 .PP
michael@0 37 This documentation is still work in progress\&. Please contribute to the initial review in
michael@0 38 \m[blue]\fBMozilla NSS bug 836477\fR\m[]\&\s-2\u[1]\d\s+2
michael@0 39 .SH "DESCRIPTION"
michael@0 40 .PP
michael@0 41 The Security Module Database Tool,
michael@0 42 \fBmodutil\fR, is a command\-line utility for managing PKCS #11 module information both within
michael@0 43 secmod\&.db
michael@0 44 files and within hardware tokens\&.
michael@0 45 \fBmodutil\fR
michael@0 46 can add and delete PKCS #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable FIPS 140\-2 compliance, and assign default providers for cryptographic operations\&. This tool can also create certificate, key, and module security database files\&.
michael@0 47 .PP
michael@0 48 The tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases\&.
michael@0 49 .SH "OPTIONS"
michael@0 50 .PP
michael@0 51 Running
michael@0 52 \fBmodutil\fR
michael@0 53 always requires one (and only one) option to specify the type of module operation\&. Each option may take arguments, anywhere from none to multiple arguments\&.
michael@0 54 .PP
michael@0 55 \fBOptions\fR
michael@0 56 .PP
michael@0 57 \-add modulename
michael@0 58 .RS 4
michael@0 59 Add the named PKCS #11 module to the database\&. Use this option with the
michael@0 60 \fB\-libfile\fR,
michael@0 61 \fB\-ciphers\fR, and
michael@0 62 \fB\-mechanisms\fR
michael@0 63 arguments\&.
michael@0 64 .RE
michael@0 65 .PP
michael@0 66 \-changepw tokenname
michael@0 67 .RS 4
michael@0 68 Change the password on the named token\&. If the token has not been initialized, this option initializes the password\&. Use this option with the
michael@0 69 \fB\-pwfile\fR
michael@0 70 and
michael@0 71 \fB\-newpwfile\fR
michael@0 72 arguments\&. A
michael@0 73 \fIpassword\fR
michael@0 74 is equivalent to a personal identification number (PIN)\&.
michael@0 75 .RE
michael@0 76 .PP
michael@0 77 \-chkfips
michael@0 78 .RS 4
michael@0 79 Verify whether the module is in the given FIPS mode\&.
michael@0 80 \fBtrue\fR
michael@0 81 means to verify that the module is in FIPS mode, while
michael@0 82 \fBfalse\fR
michael@0 83 means to verify that the module is not in FIPS mode\&.
michael@0 84 .RE
michael@0 85 .PP
michael@0 86 \-create
michael@0 87 .RS 4
michael@0 88 Create new certificate, key, and module databases\&. Use the
michael@0 89 \fB\-dbdir\fR
michael@0 90 directory argument to specify a directory\&. If any of these databases already exist in a specified directory,
michael@0 91 \fBmodutil\fR
michael@0 92 returns an error message\&.
michael@0 93 .RE
michael@0 94 .PP
michael@0 95 \-default modulename
michael@0 96 .RS 4
michael@0 97 Specify the security mechanisms for which the named module will be a default provider\&. The security mechanisms are specified with the
michael@0 98 \fB\-mechanisms\fR
michael@0 99 argument\&.
michael@0 100 .RE
michael@0 101 .PP
michael@0 102 \-delete modulename
michael@0 103 .RS 4
michael@0 104 Delete the named module\&. The default NSS PKCS #11 module cannot be deleted\&.
michael@0 105 .RE
michael@0 106 .PP
michael@0 107 \-disable modulename
michael@0 108 .RS 4
michael@0 109 Disable all slots on the named module\&. Use the
michael@0 110 \fB\-slot\fR
michael@0 111 argument to disable a specific slot\&.
michael@0 112 .sp
michael@0 113 The internal NSS PKCS #11 module cannot be disabled\&.
michael@0 114 .RE
michael@0 115 .PP
michael@0 116 \-enable modulename
michael@0 117 .RS 4
michael@0 118 Enable all slots on the named module\&. Use the
michael@0 119 \fB\-slot\fR
michael@0 120 argument to enable a specific slot\&.
michael@0 121 .RE
michael@0 122 .PP
michael@0 123 \-fips [true | false]
michael@0 124 .RS 4
michael@0 125 Enable (true) or disable (false) FIPS 140\-2 compliance for the default NSS module\&.
michael@0 126 .RE
michael@0 127 .PP
michael@0 128 \-force
michael@0 129 .RS 4
michael@0 130 Disable
michael@0 131 \fBmodutil\fR\*(Aqs interactive prompts so it can be run from a script\&. Use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity\&.
michael@0 132 .RE
michael@0 133 .PP
michael@0 134 \-jar JAR\-file
michael@0 135 .RS 4
michael@0 136 Add a new PKCS #11 module to the database using the named JAR file\&. Use this command with the
michael@0 137 \fB\-installdir\fR
michael@0 138 and
michael@0 139 \fB\-tempdir\fR
michael@0 140 arguments\&. The JAR file uses the NSS PKCS #11 JAR format to identify all the files to be installed, the module\*(Aqs name, the mechanism flags, and the cipher flags, as well as any files to be installed on the target machine, including the PKCS #11 module library file and other files such as documentation\&. This is covered in the JAR installation file section in the man page, which details the special script needed to perform an installation through a server or with
michael@0 141 \fBmodutil\fR\&.
michael@0 142 .RE
michael@0 143 .PP
michael@0 144 \-list [modulename]
michael@0 145 .RS 4
michael@0 146 Display basic information about the contents of the
michael@0 147 secmod\&.db
michael@0 148 file\&. Specifying a
michael@0 149 \fImodulename\fR
michael@0 150 displays detailed information about a particular module and its slots and tokens\&.
michael@0 151 .RE
michael@0 152 .PP
michael@0 153 \-rawadd
michael@0 154 .RS 4
michael@0 155 Add the module spec string to the
michael@0 156 secmod\&.db
michael@0 157 database\&.
michael@0 158 .RE
michael@0 159 .PP
michael@0 160 \-rawlist
michael@0 161 .RS 4
michael@0 162 Display the module specs for a specified module or for all loadable modules\&.
michael@0 163 .RE
michael@0 164 .PP
michael@0 165 \-undefault modulename
michael@0 166 .RS 4
michael@0 167 Specify the security mechanisms for which the named module will not be a default provider\&. The security mechanisms are specified with the
michael@0 168 \fB\-mechanisms\fR
michael@0 169 argument\&.
michael@0 170 .RE
michael@0 171 .PP
michael@0 172 \fBArguments\fR
michael@0 173 .PP
michael@0 174 MODULE
michael@0 175 .RS 4
michael@0 176 Give the security module to access\&.
michael@0 177 .RE
michael@0 178 .PP
michael@0 179 MODULESPEC
michael@0 180 .RS 4
michael@0 181 Give the security module spec to load into the security database\&.
michael@0 182 .RE
michael@0 183 .PP
michael@0 184 \-ciphers cipher\-enable\-list
michael@0 185 .RS 4
michael@0 186 Enable specific ciphers in a module that is being added to the database\&. The
michael@0 187 \fIcipher\-enable\-list\fR
michael@0 188 is a colon\-delimited list of cipher names\&. Enclose this list in quotation marks if it contains spaces\&.
michael@0 189 .RE
michael@0 190 .PP
michael@0 191 \-dbdir [sql:]directory
michael@0 192 .RS 4
michael@0 193 Specify the database directory in which to access or create security module database files\&.
michael@0 194 .sp
michael@0 195 \fBmodutil\fR
michael@0 196 supports two types of databases: the legacy security databases (cert8\&.db,
michael@0 197 key3\&.db, and
michael@0 198 secmod\&.db) and new SQLite databases (cert9\&.db,
michael@0 199 key4\&.db, and
michael@0 200 pkcs11\&.txt)\&. If the prefix
michael@0 201 \fBsql:\fR
michael@0 202 is not used, then the tool assumes that the given databases are in the old format\&.
michael@0 203 .RE
michael@0 204 .PP
michael@0 205 \-\-dbprefix prefix
michael@0 206 .RS 4
michael@0 207 Specify the prefix used on the database files, such as
michael@0 208 my_
michael@0 209 for
michael@0 210 my_cert8\&.db\&. This option is provided as a special case\&. Changing the names of the certificate and key databases is not recommended\&.
michael@0 211 .RE
michael@0 212 .PP
michael@0 213 \-installdir root\-installation\-directory
michael@0 214 .RS 4
michael@0 215 Specify the root installation directory relative to which files will be installed by the
michael@0 216 \fB\-jar\fR
michael@0 217 option\&. This directory should be one below which it is appropriate to store dynamic library files, such as a server\*(Aqs root directory\&.
michael@0 218 .RE
michael@0 219 .PP
michael@0 220 \-libfile library\-file
michael@0 221 .RS 4
michael@0 222 Specify a path to a library file containing the implementation of the PKCS #11 interface module that is being added to the database\&.
michael@0 223 .RE
michael@0 224 .PP
michael@0 225 \-mechanisms mechanism\-list
michael@0 226 .RS 4
michael@0 227 Specify the security mechanisms for which a particular module will be flagged as a default provider\&. The
michael@0 228 \fImechanism\-list\fR
michael@0 229 is a colon\-delimited list of mechanism names\&. Enclose this list in quotation marks if it contains spaces\&.
michael@0 230 .sp
michael@0 231 The module becomes a default provider for the listed mechanisms when those mechanisms are enabled\&. If more than one module claims to be a particular mechanism\*(Aqs default provider, that mechanism\*(Aqs default provider is undefined\&.
michael@0 232 .sp
michael@0 233 \fBmodutil\fR
michael@0 234 supports several mechanisms: RSA, DSA, RC2, RC4, RC5, AES, DES, DH, SHA1, SHA256, SHA512, SSL, TLS, MD5, MD2, RANDOM (for random number generation), and FRIENDLY (meaning certificates are publicly readable)\&.
michael@0 235 .RE
michael@0 236 .PP
michael@0 237 \-newpwfile new\-password\-file
michael@0 238 .RS 4
michael@0 239 Specify a text file containing a token\*(Aqs new or replacement password so that a password can be entered automatically with the
michael@0 240 \fB\-changepw\fR
michael@0 241 option\&.
michael@0 242 .RE
michael@0 243 .PP
michael@0 244 \-nocertdb
michael@0 245 .RS 4
michael@0 246 Do not open the certificate or key databases\&. This has several effects:
michael@0 247 .sp
michael@0 248 .RS 4
michael@0 249 .ie n \{\
michael@0 250 \h'-04'\(bu\h'+03'\c
michael@0 251 .\}
michael@0 252 .el \{\
michael@0 253 .sp -1
michael@0 254 .IP \(bu 2.3
michael@0 255 .\}
michael@0 256 With the
michael@0 257 \fB\-create\fR
michael@0 258 command, only a module security file is created; certificate and key databases are not created\&.
michael@0 259 .RE
michael@0 260 .sp
michael@0 261 .RS 4
michael@0 262 .ie n \{\
michael@0 263 \h'-04'\(bu\h'+03'\c
michael@0 264 .\}
michael@0 265 .el \{\
michael@0 266 .sp -1
michael@0 267 .IP \(bu 2.3
michael@0 268 .\}
michael@0 269 With the
michael@0 270 \fB\-jar\fR
michael@0 271 command, signatures on the JAR file are not checked\&.
michael@0 272 .RE
michael@0 273 .sp
michael@0 274 .RS 4
michael@0 275 .ie n \{\
michael@0 276 \h'-04'\(bu\h'+03'\c
michael@0 277 .\}
michael@0 278 .el \{\
michael@0 279 .sp -1
michael@0 280 .IP \(bu 2.3
michael@0 281 .\}
michael@0 282 With the
michael@0 283 \fB\-changepw\fR
michael@0 284 command, the password on the NSS internal module cannot be set or changed, since this password is stored in the key database\&.
michael@0 285 .RE
michael@0 286 .RE
michael@0 287 .PP
michael@0 288 \-pwfile old\-password\-file
michael@0 289 .RS 4
michael@0 290 Specify a text file containing a token\*(Aqs existing password so that a password can be entered automatically when the
michael@0 291 \fB\-changepw\fR
michael@0 292 option is used to change passwords\&.
michael@0 293 .RE
michael@0 294 .PP
michael@0 295 \-secmod secmodname
michael@0 296 .RS 4
michael@0 297 Give the name of the security module database (like
michael@0 298 secmod\&.db) to load\&.
michael@0 299 .RE
michael@0 300 .PP
michael@0 301 \-slot slotname
michael@0 302 .RS 4
michael@0 303 Specify a particular slot to be enabled or disabled with the
michael@0 304 \fB\-enable\fR
michael@0 305 or
michael@0 306 \fB\-disable\fR
michael@0 307 options\&.
michael@0 308 .RE
michael@0 309 .PP
michael@0 310 \-string CONFIG_STRING
michael@0 311 .RS 4
michael@0 312 Pass a configuration string for the module being added to the database\&.
michael@0 313 .RE
michael@0 314 .PP
michael@0 315 \-tempdir temporary\-directory
michael@0 316 .RS 4
michael@0 317 Give a directory location where temporary files are created during the installation by the
michael@0 318 \fB\-jar\fR
michael@0 319 option\&. If no temporary directory is specified, the current directory is used\&.
michael@0 320 .RE
michael@0 321 .SH "USAGE AND EXAMPLES"
michael@0 322 .PP
michael@0 323 \fBCreating Database Files\fR
michael@0 324 .PP
michael@0 325 Before any operations can be performed, there must be a set of security databases available\&.
michael@0 326 \fBmodutil\fR
michael@0 327 can be used to create these files\&. The only required argument is the database that where the databases will be located\&.
michael@0 328 .sp
michael@0 329 .if n \{\
michael@0 330 .RS 4
michael@0 331 .\}
michael@0 332 .nf
michael@0 333 modutil \-create \-dbdir [sql:]directory
michael@0 334 .fi
michael@0 335 .if n \{\
michael@0 336 .RE
michael@0 337 .\}
michael@0 338 .PP
michael@0 339 \fBAdding a Cryptographic Module\fR
michael@0 340 .PP
michael@0 341 Adding a PKCS #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms\&. This can be done by supplying all of the information through
michael@0 342 \fBmodutil\fR
michael@0 343 directly or by running a JAR file and install script\&. For the most basic case, simply upload the library:
michael@0 344 .sp
michael@0 345 .if n \{\
michael@0 346 .RS 4
michael@0 347 .\}
michael@0 348 .nf
michael@0 349 modutil \-add modulename \-libfile library\-file [\-ciphers cipher\-enable\-list] [\-mechanisms mechanism\-list]
michael@0 350 .fi
michael@0 351 .if n \{\
michael@0 352 .RE
michael@0 353 .\}
michael@0 354 .PP
michael@0 355 For example:
michael@0 356 .sp
michael@0 357 .if n \{\
michael@0 358 .RS 4
michael@0 359 .\}
michael@0 360 .nf
michael@0 361 modutil \-dbdir sql:/home/my/sharednssdb \-add "Example PKCS #11 Module" \-libfile "/tmp/crypto\&.so" \-mechanisms RSA:DSA:RC2:RANDOM
michael@0 362
michael@0 363 Using database directory \&.\&.\&.
michael@0 364 Module "Example PKCS #11 Module" added to database\&.
michael@0 365 .fi
michael@0 366 .if n \{\
michael@0 367 .RE
michael@0 368 .\}
michael@0 369 .PP
michael@0 370 \fBInstalling a Cryptographic Module from a JAR File\fR
michael@0 371 .PP
michael@0 372 PKCS #11 modules can also be loaded using a JAR file, which contains all of the required libraries and an installation script that describes how to install the module\&. The JAR install script is described in more detail in
michael@0 373 the section called \(lqJAR INSTALLATION FILE FORMAT\(rq\&.
michael@0 374 .PP
michael@0 375 The JAR installation script defines the setup information for each platform that the module can be installed on\&. For example:
michael@0 376 .sp
michael@0 377 .if n \{\
michael@0 378 .RS 4
michael@0 379 .\}
michael@0 380 .nf
michael@0 381 Platforms {
michael@0 382 Linux:5\&.4\&.08:x86 {
michael@0 383 ModuleName { "Example PKCS #11 Module" }
michael@0 384 ModuleFile { crypto\&.so }
michael@0 385 DefaultMechanismFlags{0x0000}
michael@0 386 CipherEnableFlags{0x0000}
michael@0 387 Files {
michael@0 388 crypto\&.so {
michael@0 389 Path{ /tmp/crypto\&.so }
michael@0 390 }
michael@0 391 setup\&.sh {
michael@0 392 Executable
michael@0 393 Path{ /tmp/setup\&.sh }
michael@0 394 }
michael@0 395 }
michael@0 396 }
michael@0 397 Linux:6\&.0\&.0:x86 {
michael@0 398 EquivalentPlatform { Linux:5\&.4\&.08:x86 }
michael@0 399 }
michael@0 400 }
michael@0 401 .fi
michael@0 402 .if n \{\
michael@0 403 .RE
michael@0 404 .\}
michael@0 405 .PP
michael@0 406 Both the install script and the required libraries must be bundled in a JAR file, which is specified with the
michael@0 407 \fB\-jar\fR
michael@0 408 argument\&.
michael@0 409 .sp
michael@0 410 .if n \{\
michael@0 411 .RS 4
michael@0 412 .\}
michael@0 413 .nf
michael@0 414 modutil \-dbdir sql:/home/mt"jar\-install\-filey/sharednssdb \-jar install\&.jar \-installdir sql:/home/my/sharednssdb
michael@0 415
michael@0 416 This installation JAR file was signed by:
michael@0 417 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0 418
michael@0 419 **SUBJECT NAME**
michael@0 420
michael@0 421 C=US, ST=California, L=Mountain View, CN=Cryptorific Inc\&., OU=Digital ID
michael@0 422 Class 3 \- Netscape Object Signing, OU="www\&.verisign\&.com/repository/CPS
michael@0 423 Incorp\&. by Ref\&.,LIAB\&.LTD(c)9 6", OU=www\&.verisign\&.com/CPS Incorp\&.by Ref
michael@0 424 \&. LIABILITY LTD\&.(c)97 VeriSign, OU=VeriSign Object Signing CA \- Class 3
michael@0 425 Organization, OU="VeriSign, Inc\&.", O=VeriSign Trust Network **ISSUER
michael@0 426 NAME**, OU=www\&.verisign\&.com/CPS Incorp\&.by Ref\&. LIABILITY LTD\&.(c)97
michael@0 427 VeriSign, OU=VeriSign Object Signing CA \- Class 3 Organization,
michael@0 428 OU="VeriSign, Inc\&.", O=VeriSign Trust Network
michael@0 429 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0 430
michael@0 431 Do you wish to continue this installation? (y/n) y
michael@0 432 Using installer script "installer_script"
michael@0 433 Successfully parsed installation script
michael@0 434 Current platform is Linux:5\&.4\&.08:x86
michael@0 435 Using installation parameters for platform Linux:5\&.4\&.08:x86
michael@0 436 Installed file crypto\&.so to /tmp/crypto\&.so
michael@0 437 Installed file setup\&.sh to \&./pk11inst\&.dir/setup\&.sh
michael@0 438 Executing "\&./pk11inst\&.dir/setup\&.sh"\&.\&.\&.
michael@0 439 "\&./pk11inst\&.dir/setup\&.sh" executed successfully
michael@0 440 Installed module "Example PKCS #11 Module" into module database
michael@0 441
michael@0 442 Installation completed successfully
michael@0 443 .fi
michael@0 444 .if n \{\
michael@0 445 .RE
michael@0 446 .\}
michael@0 447 .PP
michael@0 448 \fBAdding Module Spec\fR
michael@0 449 .PP
michael@0 450 Each module has information stored in the security database about its configuration and parameters\&. These can be added or edited using the
michael@0 451 \fB\-rawadd\fR
michael@0 452 command\&. For the current settings or to see the format of the module spec in the database, use the
michael@0 453 \fB\-rawlist\fR
michael@0 454 option\&.
michael@0 455 .sp
michael@0 456 .if n \{\
michael@0 457 .RS 4
michael@0 458 .\}
michael@0 459 .nf
michael@0 460 modutil \-rawadd modulespec
michael@0 461 .fi
michael@0 462 .if n \{\
michael@0 463 .RE
michael@0 464 .\}
michael@0 465 .PP
michael@0 466 \fBDeleting a Module\fR
michael@0 467 .PP
michael@0 468 A specific PKCS #11 module can be deleted from the
michael@0 469 secmod\&.db
michael@0 470 database:
michael@0 471 .sp
michael@0 472 .if n \{\
michael@0 473 .RS 4
michael@0 474 .\}
michael@0 475 .nf
michael@0 476 modutil \-delete modulename \-dbdir [sql:]directory
michael@0 477 .fi
michael@0 478 .if n \{\
michael@0 479 .RE
michael@0 480 .\}
michael@0 481 .PP
michael@0 482 \fBDisplaying Module Information\fR
michael@0 483 .PP
michael@0 484 The
michael@0 485 secmod\&.db
michael@0 486 database contains information about the PKCS #11 modules that are available to an application or server to use\&. The list of all modules, information about specific modules, and database configuration specs for modules can all be viewed\&.
michael@0 487 .PP
michael@0 488 To simply get a list of modules in the database, use the
michael@0 489 \fB\-list\fR
michael@0 490 command\&.
michael@0 491 .sp
michael@0 492 .if n \{\
michael@0 493 .RS 4
michael@0 494 .\}
michael@0 495 .nf
michael@0 496 modutil \-list [modulename] \-dbdir [sql:]directory
michael@0 497 .fi
michael@0 498 .if n \{\
michael@0 499 .RE
michael@0 500 .\}
michael@0 501 .PP
michael@0 502 Listing the modules shows the module name, their status, and other associated security databases for certificates and keys\&. For example:
michael@0 503 .sp
michael@0 504 .if n \{\
michael@0 505 .RS 4
michael@0 506 .\}
michael@0 507 .nf
michael@0 508 modutil \-list \-dbdir sql:/home/my/sharednssdb
michael@0 509
michael@0 510 Listing of PKCS #11 Modules
michael@0 511 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0 512 1\&. NSS Internal PKCS #11 Module
michael@0 513 slots: 2 slots attached
michael@0 514 status: loaded
michael@0 515
michael@0 516 slot: NSS Internal Cryptographic Services
michael@0 517 token: NSS Generic Crypto Services
michael@0 518
michael@0 519 slot: NSS User Private Key and Certificate Services
michael@0 520 token: NSS Certificate DB
michael@0 521 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0 522 .fi
michael@0 523 .if n \{\
michael@0 524 .RE
michael@0 525 .\}
michael@0 526 .PP
michael@0 527 Passing a specific module name with the
michael@0 528 \fB\-list\fR
michael@0 529 returns details information about the module itself, like supported cipher mechanisms, version numbers, serial numbers, and other information about the module and the token it is loaded on\&. For example:
michael@0 530 .sp
michael@0 531 .if n \{\
michael@0 532 .RS 4
michael@0 533 .\}
michael@0 534 .nf
michael@0 535 modutil \-list "NSS Internal PKCS #11 Module" \-dbdir sql:/home/my/sharednssdb
michael@0 536
michael@0 537 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0 538 Name: NSS Internal PKCS #11 Module
michael@0 539 Library file: **Internal ONLY module**
michael@0 540 Manufacturer: Mozilla Foundation
michael@0 541 Description: NSS Internal Crypto Services
michael@0 542 PKCS #11 Version 2\&.20
michael@0 543 Library Version: 3\&.11
michael@0 544 Cipher Enable Flags: None
michael@0 545 Default Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES
michael@0 546
michael@0 547 Slot: NSS Internal Cryptographic Services
michael@0 548 Slot Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES
michael@0 549 Manufacturer: Mozilla Foundation
michael@0 550 Type: Software
michael@0 551 Version Number: 3\&.11
michael@0 552 Firmware Version: 0\&.0
michael@0 553 Status: Enabled
michael@0 554 Token Name: NSS Generic Crypto Services
michael@0 555 Token Manufacturer: Mozilla Foundation
michael@0 556 Token Model: NSS 3
michael@0 557 Token Serial Number: 0000000000000000
michael@0 558 Token Version: 4\&.0
michael@0 559 Token Firmware Version: 0\&.0
michael@0 560 Access: Write Protected
michael@0 561 Login Type: Public (no login required)
michael@0 562 User Pin: NOT Initialized
michael@0 563
michael@0 564 Slot: NSS User Private Key and Certificate Services
michael@0 565 Slot Mechanism Flags: None
michael@0 566 Manufacturer: Mozilla Foundation
michael@0 567 Type: Software
michael@0 568 Version Number: 3\&.11
michael@0 569 Firmware Version: 0\&.0
michael@0 570 Status: Enabled
michael@0 571 Token Name: NSS Certificate DB
michael@0 572 Token Manufacturer: Mozilla Foundation
michael@0 573 Token Model: NSS 3
michael@0 574 Token Serial Number: 0000000000000000
michael@0 575 Token Version: 8\&.3
michael@0 576 Token Firmware Version: 0\&.0
michael@0 577 Access: NOT Write Protected
michael@0 578 Login Type: Login required
michael@0 579 User Pin: Initialized
michael@0 580 .fi
michael@0 581 .if n \{\
michael@0 582 .RE
michael@0 583 .\}
michael@0 584 .PP
michael@0 585 A related command,
michael@0 586 \fB\-rawlist\fR
michael@0 587 returns information about the database configuration for the modules\&. (This information can be edited by loading new specs using the
michael@0 588 \fB\-rawadd\fR
michael@0 589 command\&.)
michael@0 590 .sp
michael@0 591 .if n \{\
michael@0 592 .RS 4
michael@0 593 .\}
michael@0 594 .nf
michael@0 595 modutil \-rawlist \-dbdir sql:/home/my/sharednssdb
michael@0 596 name="NSS Internal PKCS #11 Module" parameters="configdir=\&. certPrefix= keyPrefix= secmod=secmod\&.db flags=readOnly " NSS="trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical"
michael@0 597 .fi
michael@0 598 .if n \{\
michael@0 599 .RE
michael@0 600 .\}
michael@0 601 .PP
michael@0 602 \fBSetting a Default Provider for Security Mechanisms\fR
michael@0 603 .PP
michael@0 604 Multiple security modules may provide support for the same security mechanisms\&. It is possible to set a specific security module as the default provider for a specific security mechanism (or, conversely, to prohibit a provider from supplying those mechanisms)\&.
michael@0 605 .sp
michael@0 606 .if n \{\
michael@0 607 .RS 4
michael@0 608 .\}
michael@0 609 .nf
michael@0 610 modutil \-default modulename \-mechanisms mechanism\-list
michael@0 611 .fi
michael@0 612 .if n \{\
michael@0 613 .RE
michael@0 614 .\}
michael@0 615 .PP
michael@0 616 To set a module as the default provider for mechanisms, use the
michael@0 617 \fB\-default\fR
michael@0 618 command with a colon\-separated list of mechanisms\&. The available mechanisms depend on the module; NSS supplies almost all common mechanisms\&. For example:
michael@0 619 .sp
michael@0 620 .if n \{\
michael@0 621 .RS 4
michael@0 622 .\}
michael@0 623 .nf
michael@0 624 modutil \-default "NSS Internal PKCS #11 Module" \-dbdir \-mechanisms RSA:DSA:RC2
michael@0 625
michael@0 626 Using database directory c:\edatabases\&.\&.\&.
michael@0 627
michael@0 628 Successfully changed defaults\&.
michael@0 629 .fi
michael@0 630 .if n \{\
michael@0 631 .RE
michael@0 632 .\}
michael@0 633 .PP
michael@0 634 Clearing the default provider has the same format:
michael@0 635 .sp
michael@0 636 .if n \{\
michael@0 637 .RS 4
michael@0 638 .\}
michael@0 639 .nf
michael@0 640 modutil \-undefault "NSS Internal PKCS #11 Module" \-dbdir \-mechanisms MD2:MD5
michael@0 641 .fi
michael@0 642 .if n \{\
michael@0 643 .RE
michael@0 644 .\}
michael@0 645 .PP
michael@0 646 \fBEnabling and Disabling Modules and Slots\fR
michael@0 647 .PP
michael@0 648 Modules, and specific slots on modules, can be selectively enabled or disabled using
michael@0 649 \fBmodutil\fR\&. Both commands have the same format:
michael@0 650 .sp
michael@0 651 .if n \{\
michael@0 652 .RS 4
michael@0 653 .\}
michael@0 654 .nf
michael@0 655 modutil \-enable|\-disable modulename [\-slot slotname]
michael@0 656 .fi
michael@0 657 .if n \{\
michael@0 658 .RE
michael@0 659 .\}
michael@0 660 .PP
michael@0 661 For example:
michael@0 662 .sp
michael@0 663 .if n \{\
michael@0 664 .RS 4
michael@0 665 .\}
michael@0 666 .nf
michael@0 667 modutil \-enable "NSS Internal PKCS #11 Module" \-slot "NSS Internal Cryptographic Services " \-dbdir \&.
michael@0 668
michael@0 669 Slot "NSS Internal Cryptographic Services " enabled\&.
michael@0 670 .fi
michael@0 671 .if n \{\
michael@0 672 .RE
michael@0 673 .\}
michael@0 674 .PP
michael@0 675 Be sure that the appropriate amount of trailing whitespace is after the slot name\&. Some slot names have a significant amount of whitespace that must be included, or the operation will fail\&.
michael@0 676 .PP
michael@0 677 \fBEnabling and Verifying FIPS Compliance\fR
michael@0 678 .PP
michael@0 679 The NSS modules can have FIPS 140\-2 compliance enabled or disabled using
michael@0 680 \fBmodutil\fR
michael@0 681 with the
michael@0 682 \fB\-fips\fR
michael@0 683 option\&. For example:
michael@0 684 .sp
michael@0 685 .if n \{\
michael@0 686 .RS 4
michael@0 687 .\}
michael@0 688 .nf
michael@0 689 modutil \-fips true \-dbdir sql:/home/my/sharednssdb/
michael@0 690
michael@0 691 FIPS mode enabled\&.
michael@0 692 .fi
michael@0 693 .if n \{\
michael@0 694 .RE
michael@0 695 .\}
michael@0 696 .PP
michael@0 697 To verify that status of FIPS mode, run the
michael@0 698 \fB\-chkfips\fR
michael@0 699 command with either a true or false flag (it doesn\*(Aqt matter which)\&. The tool returns the current FIPS setting\&.
michael@0 700 .sp
michael@0 701 .if n \{\
michael@0 702 .RS 4
michael@0 703 .\}
michael@0 704 .nf
michael@0 705 modutil \-chkfips false \-dbdir sql:/home/my/sharednssdb/
michael@0 706
michael@0 707 FIPS mode enabled\&.
michael@0 708 .fi
michael@0 709 .if n \{\
michael@0 710 .RE
michael@0 711 .\}
michael@0 712 .PP
michael@0 713 \fBChanging the Password on a Token\fR
michael@0 714 .PP
michael@0 715 Initializing or changing a token\*(Aqs password:
michael@0 716 .sp
michael@0 717 .if n \{\
michael@0 718 .RS 4
michael@0 719 .\}
michael@0 720 .nf
michael@0 721 modutil \-changepw tokenname [\-pwfile old\-password\-file] [\-newpwfile new\-password\-file]
michael@0 722 .fi
michael@0 723 .if n \{\
michael@0 724 .RE
michael@0 725 .\}
michael@0 726 .sp
michael@0 727 .if n \{\
michael@0 728 .RS 4
michael@0 729 .\}
michael@0 730 .nf
michael@0 731 modutil \-dbdir sql:/home/my/sharednssdb \-changepw "NSS Certificate DB"
michael@0 732
michael@0 733 Enter old password:
michael@0 734 Incorrect password, try again\&.\&.\&.
michael@0 735 Enter old password:
michael@0 736 Enter new password:
michael@0 737 Re\-enter new password:
michael@0 738 Token "Communicator Certificate DB" password changed successfully\&.
michael@0 739 .fi
michael@0 740 .if n \{\
michael@0 741 .RE
michael@0 742 .\}
michael@0 743 .SH "JAR INSTALLATION FILE FORMAT"
michael@0 744 .PP
michael@0 745 When a JAR file is run by a server, by
michael@0 746 \fBmodutil\fR, or by any program that does not interpret JavaScript, a special information file must be included to install the libraries\&. There are several things to keep in mind with this file:
michael@0 747 .sp
michael@0 748 .RS 4
michael@0 749 .ie n \{\
michael@0 750 \h'-04'\(bu\h'+03'\c
michael@0 751 .\}
michael@0 752 .el \{\
michael@0 753 .sp -1
michael@0 754 .IP \(bu 2.3
michael@0 755 .\}
michael@0 756 It must be declared in the JAR archive\*(Aqs manifest file\&.
michael@0 757 .RE
michael@0 758 .sp
michael@0 759 .RS 4
michael@0 760 .ie n \{\
michael@0 761 \h'-04'\(bu\h'+03'\c
michael@0 762 .\}
michael@0 763 .el \{\
michael@0 764 .sp -1
michael@0 765 .IP \(bu 2.3
michael@0 766 .\}
michael@0 767 The script can have any name\&.
michael@0 768 .RE
michael@0 769 .sp
michael@0 770 .RS 4
michael@0 771 .ie n \{\
michael@0 772 \h'-04'\(bu\h'+03'\c
michael@0 773 .\}
michael@0 774 .el \{\
michael@0 775 .sp -1
michael@0 776 .IP \(bu 2.3
michael@0 777 .\}
michael@0 778 The metainfo tag for this is
michael@0 779 \fBPkcs11_install_script\fR\&. To declare meta\-information in the manifest file, put it in a file that is passed to
michael@0 780 \fBsigntool\fR\&.
michael@0 781 .RE
michael@0 782 .PP
michael@0 783 \fBSample Script\fR
michael@0 784 .PP
michael@0 785 For example, the PKCS #11 installer script could be in the file pk11install\&. If so, the metainfo file for
michael@0 786 \fBsigntool\fR
michael@0 787 includes a line such as this:
michael@0 788 .sp
michael@0 789 .if n \{\
michael@0 790 .RS 4
michael@0 791 .\}
michael@0 792 .nf
michael@0 793 + Pkcs11_install_script: pk11install
michael@0 794 .fi
michael@0 795 .if n \{\
michael@0 796 .RE
michael@0 797 .\}
michael@0 798 .PP
michael@0 799 The script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms\&. Multiple platforms can be defined in a single install file\&.
michael@0 800 .sp
michael@0 801 .if n \{\
michael@0 802 .RS 4
michael@0 803 .\}
michael@0 804 .nf
michael@0 805 ForwardCompatible { IRIX:6\&.2:mips SUNOS:5\&.5\&.1:sparc }
michael@0 806 Platforms {
michael@0 807 WINNT::x86 {
michael@0 808 ModuleName { "Example Module" }
michael@0 809 ModuleFile { win32/fort32\&.dll }
michael@0 810 DefaultMechanismFlags{0x0001}
michael@0 811 DefaultCipherFlags{0x0001}
michael@0 812 Files {
michael@0 813 win32/setup\&.exe {
michael@0 814 Executable
michael@0 815 RelativePath { %temp%/setup\&.exe }
michael@0 816 }
michael@0 817 win32/setup\&.hlp {
michael@0 818 RelativePath { %temp%/setup\&.hlp }
michael@0 819 }
michael@0 820 win32/setup\&.cab {
michael@0 821 RelativePath { %temp%/setup\&.cab }
michael@0 822 }
michael@0 823 }
michael@0 824 }
michael@0 825 WIN95::x86 {
michael@0 826 EquivalentPlatform {WINNT::x86}
michael@0 827 }
michael@0 828 SUNOS:5\&.5\&.1:sparc {
michael@0 829 ModuleName { "Example UNIX Module" }
michael@0 830 ModuleFile { unix/fort\&.so }
michael@0 831 DefaultMechanismFlags{0x0001}
michael@0 832 CipherEnableFlags{0x0001}
michael@0 833 Files {
michael@0 834 unix/fort\&.so {
michael@0 835 RelativePath{%root%/lib/fort\&.so}
michael@0 836 AbsolutePath{/usr/local/netscape/lib/fort\&.so}
michael@0 837 FilePermissions{555}
michael@0 838 }
michael@0 839 xplat/instr\&.html {
michael@0 840 RelativePath{%root%/docs/inst\&.html}
michael@0 841 AbsolutePath{/usr/local/netscape/docs/inst\&.html}
michael@0 842 FilePermissions{555}
michael@0 843 }
michael@0 844 }
michael@0 845 }
michael@0 846 IRIX:6\&.2:mips {
michael@0 847 EquivalentPlatform { SUNOS:5\&.5\&.1:sparc }
michael@0 848 }
michael@0 849 }
michael@0 850 .fi
michael@0 851 .if n \{\
michael@0 852 .RE
michael@0 853 .\}
michael@0 854 .PP
michael@0 855 \fBScript Grammar\fR
michael@0 856 .PP
michael@0 857 The script is basic Java, allowing lists, key\-value pairs, strings, and combinations of all of them\&.
michael@0 858 .sp
michael@0 859 .if n \{\
michael@0 860 .RS 4
michael@0 861 .\}
michael@0 862 .nf
michael@0 863 \-\-> valuelist
michael@0 864
michael@0 865 valuelist \-\-> value valuelist
michael@0 866 <null>
michael@0 867
michael@0 868 value \-\-\-> key_value_pair
michael@0 869 string
michael@0 870
michael@0 871 key_value_pair \-\-> key { valuelist }
michael@0 872
michael@0 873 key \-\-> string
michael@0 874
michael@0 875 string \-\-> simple_string
michael@0 876 "complex_string"
michael@0 877
michael@0 878 simple_string \-\-> [^ \et\en\e""{""}"]+
michael@0 879
michael@0 880 complex_string \-\-> ([^\e"\e\e\er\en]|(\e\e\e")|(\e\e\e\e))+
michael@0 881 .fi
michael@0 882 .if n \{\
michael@0 883 .RE
michael@0 884 .\}
michael@0 885 .PP
michael@0 886 Quotes and backslashes must be escaped with a backslash\&. A complex string must not include newlines or carriage returns\&.Outside of complex strings, all white space (for example, spaces, tabs, and carriage returns) is considered equal and is used only to delimit tokens\&.
michael@0 887 .PP
michael@0 888 \fBKeys\fR
michael@0 889 .PP
michael@0 890 The Java install file uses keys to define the platform and module information\&.
michael@0 891 .PP
michael@0 892 \fBForwardCompatible\fR
michael@0 893 gives a list of platforms that are forward compatible\&. If the current platform cannot be found in the list of supported platforms, then the
michael@0 894 \fBForwardCompatible\fR
michael@0 895 list is checked for any platforms that have the same OS and architecture in an earlier version\&. If one is found, its attributes are used for the current platform\&.
michael@0 896 .PP
michael@0 897 \fBPlatforms\fR
michael@0 898 (required) Gives a list of platforms\&. Each entry in the list is itself a key\-value pair: the key is the name of the platform and the value list contains various attributes of the platform\&. The platform string is in the format
michael@0 899 \fIsystem name:OS release:architecture\fR\&. The installer obtains these values from NSPR\&. OS release is an empty string on non\-Unix operating systems\&. NSPR supports these platforms:
michael@0 900 .sp
michael@0 901 .RS 4
michael@0 902 .ie n \{\
michael@0 903 \h'-04'\(bu\h'+03'\c
michael@0 904 .\}
michael@0 905 .el \{\
michael@0 906 .sp -1
michael@0 907 .IP \(bu 2.3
michael@0 908 .\}
michael@0 909 AIX (rs6000)
michael@0 910 .RE
michael@0 911 .sp
michael@0 912 .RS 4
michael@0 913 .ie n \{\
michael@0 914 \h'-04'\(bu\h'+03'\c
michael@0 915 .\}
michael@0 916 .el \{\
michael@0 917 .sp -1
michael@0 918 .IP \(bu 2.3
michael@0 919 .\}
michael@0 920 BSDI (x86)
michael@0 921 .RE
michael@0 922 .sp
michael@0 923 .RS 4
michael@0 924 .ie n \{\
michael@0 925 \h'-04'\(bu\h'+03'\c
michael@0 926 .\}
michael@0 927 .el \{\
michael@0 928 .sp -1
michael@0 929 .IP \(bu 2.3
michael@0 930 .\}
michael@0 931 FREEBSD (x86)
michael@0 932 .RE
michael@0 933 .sp
michael@0 934 .RS 4
michael@0 935 .ie n \{\
michael@0 936 \h'-04'\(bu\h'+03'\c
michael@0 937 .\}
michael@0 938 .el \{\
michael@0 939 .sp -1
michael@0 940 .IP \(bu 2.3
michael@0 941 .\}
michael@0 942 HPUX (hppa1\&.1)
michael@0 943 .RE
michael@0 944 .sp
michael@0 945 .RS 4
michael@0 946 .ie n \{\
michael@0 947 \h'-04'\(bu\h'+03'\c
michael@0 948 .\}
michael@0 949 .el \{\
michael@0 950 .sp -1
michael@0 951 .IP \(bu 2.3
michael@0 952 .\}
michael@0 953 IRIX (mips)
michael@0 954 .RE
michael@0 955 .sp
michael@0 956 .RS 4
michael@0 957 .ie n \{\
michael@0 958 \h'-04'\(bu\h'+03'\c
michael@0 959 .\}
michael@0 960 .el \{\
michael@0 961 .sp -1
michael@0 962 .IP \(bu 2.3
michael@0 963 .\}
michael@0 964 LINUX (ppc, alpha, x86)
michael@0 965 .RE
michael@0 966 .sp
michael@0 967 .RS 4
michael@0 968 .ie n \{\
michael@0 969 \h'-04'\(bu\h'+03'\c
michael@0 970 .\}
michael@0 971 .el \{\
michael@0 972 .sp -1
michael@0 973 .IP \(bu 2.3
michael@0 974 .\}
michael@0 975 MacOS (PowerPC)
michael@0 976 .RE
michael@0 977 .sp
michael@0 978 .RS 4
michael@0 979 .ie n \{\
michael@0 980 \h'-04'\(bu\h'+03'\c
michael@0 981 .\}
michael@0 982 .el \{\
michael@0 983 .sp -1
michael@0 984 .IP \(bu 2.3
michael@0 985 .\}
michael@0 986 NCR (x86)
michael@0 987 .RE
michael@0 988 .sp
michael@0 989 .RS 4
michael@0 990 .ie n \{\
michael@0 991 \h'-04'\(bu\h'+03'\c
michael@0 992 .\}
michael@0 993 .el \{\
michael@0 994 .sp -1
michael@0 995 .IP \(bu 2.3
michael@0 996 .\}
michael@0 997 NEC (mips)
michael@0 998 .RE
michael@0 999 .sp
michael@0 1000 .RS 4
michael@0 1001 .ie n \{\
michael@0 1002 \h'-04'\(bu\h'+03'\c
michael@0 1003 .\}
michael@0 1004 .el \{\
michael@0 1005 .sp -1
michael@0 1006 .IP \(bu 2.3
michael@0 1007 .\}
michael@0 1008 OS2 (x86)
michael@0 1009 .RE
michael@0 1010 .sp
michael@0 1011 .RS 4
michael@0 1012 .ie n \{\
michael@0 1013 \h'-04'\(bu\h'+03'\c
michael@0 1014 .\}
michael@0 1015 .el \{\
michael@0 1016 .sp -1
michael@0 1017 .IP \(bu 2.3
michael@0 1018 .\}
michael@0 1019 OSF (alpha)
michael@0 1020 .RE
michael@0 1021 .sp
michael@0 1022 .RS 4
michael@0 1023 .ie n \{\
michael@0 1024 \h'-04'\(bu\h'+03'\c
michael@0 1025 .\}
michael@0 1026 .el \{\
michael@0 1027 .sp -1
michael@0 1028 .IP \(bu 2.3
michael@0 1029 .\}
michael@0 1030 ReliantUNIX (mips)
michael@0 1031 .RE
michael@0 1032 .sp
michael@0 1033 .RS 4
michael@0 1034 .ie n \{\
michael@0 1035 \h'-04'\(bu\h'+03'\c
michael@0 1036 .\}
michael@0 1037 .el \{\
michael@0 1038 .sp -1
michael@0 1039 .IP \(bu 2.3
michael@0 1040 .\}
michael@0 1041 SCO (x86)
michael@0 1042 .RE
michael@0 1043 .sp
michael@0 1044 .RS 4
michael@0 1045 .ie n \{\
michael@0 1046 \h'-04'\(bu\h'+03'\c
michael@0 1047 .\}
michael@0 1048 .el \{\
michael@0 1049 .sp -1
michael@0 1050 .IP \(bu 2.3
michael@0 1051 .\}
michael@0 1052 SOLARIS (sparc)
michael@0 1053 .RE
michael@0 1054 .sp
michael@0 1055 .RS 4
michael@0 1056 .ie n \{\
michael@0 1057 \h'-04'\(bu\h'+03'\c
michael@0 1058 .\}
michael@0 1059 .el \{\
michael@0 1060 .sp -1
michael@0 1061 .IP \(bu 2.3
michael@0 1062 .\}
michael@0 1063 SONY (mips)
michael@0 1064 .RE
michael@0 1065 .sp
michael@0 1066 .RS 4
michael@0 1067 .ie n \{\
michael@0 1068 \h'-04'\(bu\h'+03'\c
michael@0 1069 .\}
michael@0 1070 .el \{\
michael@0 1071 .sp -1
michael@0 1072 .IP \(bu 2.3
michael@0 1073 .\}
michael@0 1074 SUNOS (sparc)
michael@0 1075 .RE
michael@0 1076 .sp
michael@0 1077 .RS 4
michael@0 1078 .ie n \{\
michael@0 1079 \h'-04'\(bu\h'+03'\c
michael@0 1080 .\}
michael@0 1081 .el \{\
michael@0 1082 .sp -1
michael@0 1083 .IP \(bu 2.3
michael@0 1084 .\}
michael@0 1085 UnixWare (x86)
michael@0 1086 .RE
michael@0 1087 .sp
michael@0 1088 .RS 4
michael@0 1089 .ie n \{\
michael@0 1090 \h'-04'\(bu\h'+03'\c
michael@0 1091 .\}
michael@0 1092 .el \{\
michael@0 1093 .sp -1
michael@0 1094 .IP \(bu 2.3
michael@0 1095 .\}
michael@0 1096 WIN16 (x86)
michael@0 1097 .RE
michael@0 1098 .sp
michael@0 1099 .RS 4
michael@0 1100 .ie n \{\
michael@0 1101 \h'-04'\(bu\h'+03'\c
michael@0 1102 .\}
michael@0 1103 .el \{\
michael@0 1104 .sp -1
michael@0 1105 .IP \(bu 2.3
michael@0 1106 .\}
michael@0 1107 WIN95 (x86)
michael@0 1108 .RE
michael@0 1109 .sp
michael@0 1110 .RS 4
michael@0 1111 .ie n \{\
michael@0 1112 \h'-04'\(bu\h'+03'\c
michael@0 1113 .\}
michael@0 1114 .el \{\
michael@0 1115 .sp -1
michael@0 1116 .IP \(bu 2.3
michael@0 1117 .\}
michael@0 1118 WINNT (x86)
michael@0 1119 .RE
michael@0 1120 .PP
michael@0 1121 For example:
michael@0 1122 .sp
michael@0 1123 .if n \{\
michael@0 1124 .RS 4
michael@0 1125 .\}
michael@0 1126 .nf
michael@0 1127 IRIX:6\&.2:mips
michael@0 1128 SUNOS:5\&.5\&.1:sparc
michael@0 1129 Linux:2\&.0\&.32:x86
michael@0 1130 WIN95::x86
michael@0 1131 .fi
michael@0 1132 .if n \{\
michael@0 1133 .RE
michael@0 1134 .\}
michael@0 1135 .PP
michael@0 1136 The module information is defined independently for each platform in the
michael@0 1137 \fBModuleName\fR,
michael@0 1138 \fBModuleFile\fR, and
michael@0 1139 \fBFiles\fR
michael@0 1140 attributes\&. These attributes must be given unless an
michael@0 1141 \fBEquivalentPlatform\fR
michael@0 1142 attribute is specified\&.
michael@0 1143 .PP
michael@0 1144 \fBPer\-Platform Keys\fR
michael@0 1145 .PP
michael@0 1146 Per\-platform keys have meaning only within the value list of an entry in the
michael@0 1147 \fBPlatforms\fR
michael@0 1148 list\&.
michael@0 1149 .PP
michael@0 1150 \fBModuleName\fR
michael@0 1151 (required) gives the common name for the module\&. This name is used to reference the module by servers and by the
michael@0 1152 \fBmodutil\fR
michael@0 1153 tool\&.
michael@0 1154 .PP
michael@0 1155 \fBModuleFile\fR
michael@0 1156 (required) names the PKCS #11 module file for this platform\&. The name is given as the relative path of the file within the JAR archive\&.
michael@0 1157 .PP
michael@0 1158 \fBFiles\fR
michael@0 1159 (required) lists the files that need to be installed for this module\&. Each entry in the file list is a key\-value pair\&. The key is the path of the file in the JAR archive, and the value list contains attributes of the file\&. At least
michael@0 1160 \fBRelativePath\fR
michael@0 1161 or
michael@0 1162 \fBAbsolutePath\fR
michael@0 1163 must be specified for each file\&.
michael@0 1164 .PP
michael@0 1165 \fBDefaultMechanismFlags\fR
michael@0 1166 specifies mechanisms for which this module is the default provider; this is equivalent to the
michael@0 1167 \fB\-mechanism\fR
michael@0 1168 option with the
michael@0 1169 \fB\-add\fR
michael@0 1170 command\&. This key\-value pair is a bitstring specified in hexadecimal (0x) format\&. It is constructed as a bitwise OR\&. If the DefaultMechanismFlags entry is omitted, the value defaults to 0x0\&.
michael@0 1171 .sp
michael@0 1172 .if n \{\
michael@0 1173 .RS 4
michael@0 1174 .\}
michael@0 1175 .nf
michael@0 1176 RSA: 0x00000001
michael@0 1177 DSA: 0x00000002
michael@0 1178 RC2: 0x00000004
michael@0 1179 RC4: 0x00000008
michael@0 1180 DES: 0x00000010
michael@0 1181 DH: 0x00000020
michael@0 1182 FORTEZZA: 0x00000040
michael@0 1183 RC5: 0x00000080
michael@0 1184 SHA1: 0x00000100
michael@0 1185 MD5: 0x00000200
michael@0 1186 MD2: 0x00000400
michael@0 1187 RANDOM: 0x08000000
michael@0 1188 FRIENDLY: 0x10000000
michael@0 1189 OWN_PW_DEFAULTS: 0x20000000
michael@0 1190 DISABLE: 0x40000000
michael@0 1191 .fi
michael@0 1192 .if n \{\
michael@0 1193 .RE
michael@0 1194 .\}
michael@0 1195 .PP
michael@0 1196 \fBCipherEnableFlags\fR
michael@0 1197 specifies ciphers that this module provides that NSS does not provide (so that the module enables those ciphers for NSS)\&. This is equivalent to the
michael@0 1198 \fB\-cipher\fR
michael@0 1199 argument with the
michael@0 1200 \fB\-add\fR
michael@0 1201 command\&. This key is a bitstring specified in hexadecimal (0x) format\&. It is constructed as a bitwise OR\&. If the
michael@0 1202 \fBCipherEnableFlags\fR
michael@0 1203 entry is omitted, the value defaults to 0x0\&.
michael@0 1204 .PP
michael@0 1205 \fBEquivalentPlatform\fR
michael@0 1206 specifies that the attributes of the named platform should also be used for the current platform\&. This makes it easier when more than one platform uses the same settings\&.
michael@0 1207 .PP
michael@0 1208 \fBPer\-File Keys\fR
michael@0 1209 .PP
michael@0 1210 Some keys have meaning only within the value list of an entry in a
michael@0 1211 \fBFiles\fR
michael@0 1212 list\&.
michael@0 1213 .PP
michael@0 1214 Each file requires a path key the identifies where the file is\&. Either
michael@0 1215 \fBRelativePath\fR
michael@0 1216 or
michael@0 1217 \fBAbsolutePath\fR
michael@0 1218 must be specified\&. If both are specified, the relative path is tried first, and the absolute path is used only if no relative root directory is provided by the installer program\&.
michael@0 1219 .PP
michael@0 1220 \fBRelativePath\fR
michael@0 1221 specifies the destination directory of the file, relative to some directory decided at install time\&. Two variables can be used in the relative path:
michael@0 1222 \fB%root%\fR
michael@0 1223 and
michael@0 1224 \fB%temp%\fR\&.
michael@0 1225 \fB%root%\fR
michael@0 1226 is replaced at run time with the directory relative to which files should be installed; for example, it may be the server\*(Aqs root directory\&. The
michael@0 1227 \fB%temp%\fR
michael@0 1228 directory is created at the beginning of the installation and destroyed at the end\&. The purpose of
michael@0 1229 \fB%temp%\fR
michael@0 1230 is to hold executable files (such as setup programs) or files that are used by these programs\&. Files destined for the temporary directory are guaranteed to be in place before any executable file is run; they are not deleted until all executable files have finished\&.
michael@0 1231 .PP
michael@0 1232 \fBAbsolutePath\fR
michael@0 1233 specifies the destination directory of the file as an absolute path\&.
michael@0 1234 .PP
michael@0 1235 \fBExecutable\fR
michael@0 1236 specifies that the file is to be executed during the course of the installation\&. Typically, this string is used for a setup program provided by a module vendor, such as a self\-extracting setup executable\&. More than one file can be specified as executable, in which case the files are run in the order in which they are specified in the script file\&.
michael@0 1237 .PP
michael@0 1238 \fBFilePermissions\fR
michael@0 1239 sets permissions on any referenced files in a string of octal digits, according to the standard Unix format\&. This string is a bitwise OR\&.
michael@0 1240 .sp
michael@0 1241 .if n \{\
michael@0 1242 .RS 4
michael@0 1243 .\}
michael@0 1244 .nf
michael@0 1245 user read: 0400
michael@0 1246 user write: 0200
michael@0 1247 user execute: 0100
michael@0 1248 group read: 0040
michael@0 1249 group write: 0020
michael@0 1250 group execute: 0010
michael@0 1251 other read: 0004
michael@0 1252 other write: 0002
michael@0 1253 other execute: 0001
michael@0 1254 .fi
michael@0 1255 .if n \{\
michael@0 1256 .RE
michael@0 1257 .\}
michael@0 1258 .PP
michael@0 1259 Some platforms may not understand these permissions\&. They are applied only insofar as they make sense for the current platform\&. If this attribute is omitted, a default of 777 is assumed\&.
michael@0 1260 .SH "NSS DATABASE TYPES"
michael@0 1261 .PP
michael@0 1262 NSS originally used BerkeleyDB databases to store security information\&. The last versions of these
michael@0 1263 \fIlegacy\fR
michael@0 1264 databases are:
michael@0 1265 .sp
michael@0 1266 .RS 4
michael@0 1267 .ie n \{\
michael@0 1268 \h'-04'\(bu\h'+03'\c
michael@0 1269 .\}
michael@0 1270 .el \{\
michael@0 1271 .sp -1
michael@0 1272 .IP \(bu 2.3
michael@0 1273 .\}
michael@0 1274 cert8\&.db for certificates
michael@0 1275 .RE
michael@0 1276 .sp
michael@0 1277 .RS 4
michael@0 1278 .ie n \{\
michael@0 1279 \h'-04'\(bu\h'+03'\c
michael@0 1280 .\}
michael@0 1281 .el \{\
michael@0 1282 .sp -1
michael@0 1283 .IP \(bu 2.3
michael@0 1284 .\}
michael@0 1285 key3\&.db for keys
michael@0 1286 .RE
michael@0 1287 .sp
michael@0 1288 .RS 4
michael@0 1289 .ie n \{\
michael@0 1290 \h'-04'\(bu\h'+03'\c
michael@0 1291 .\}
michael@0 1292 .el \{\
michael@0 1293 .sp -1
michael@0 1294 .IP \(bu 2.3
michael@0 1295 .\}
michael@0 1296 secmod\&.db for PKCS #11 module information
michael@0 1297 .RE
michael@0 1298 .PP
michael@0 1299 BerkeleyDB has performance limitations, though, which prevent it from being easily used by multiple applications simultaneously\&. NSS has some flexibility that allows applications to use their own, independent database engine while keeping a shared database and working around the access issues\&. Still, NSS requires more flexibility to provide a truly shared security database\&.
michael@0 1300 .PP
michael@0 1301 In 2009, NSS introduced a new set of databases that are SQLite databases rather than BerkleyDB\&. These new databases provide more accessibility and performance:
michael@0 1302 .sp
michael@0 1303 .RS 4
michael@0 1304 .ie n \{\
michael@0 1305 \h'-04'\(bu\h'+03'\c
michael@0 1306 .\}
michael@0 1307 .el \{\
michael@0 1308 .sp -1
michael@0 1309 .IP \(bu 2.3
michael@0 1310 .\}
michael@0 1311 cert9\&.db for certificates
michael@0 1312 .RE
michael@0 1313 .sp
michael@0 1314 .RS 4
michael@0 1315 .ie n \{\
michael@0 1316 \h'-04'\(bu\h'+03'\c
michael@0 1317 .\}
michael@0 1318 .el \{\
michael@0 1319 .sp -1
michael@0 1320 .IP \(bu 2.3
michael@0 1321 .\}
michael@0 1322 key4\&.db for keys
michael@0 1323 .RE
michael@0 1324 .sp
michael@0 1325 .RS 4
michael@0 1326 .ie n \{\
michael@0 1327 \h'-04'\(bu\h'+03'\c
michael@0 1328 .\}
michael@0 1329 .el \{\
michael@0 1330 .sp -1
michael@0 1331 .IP \(bu 2.3
michael@0 1332 .\}
michael@0 1333 pkcs11\&.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
michael@0 1334 .RE
michael@0 1335 .PP
michael@0 1336 Because the SQLite databases are designed to be shared, these are the
michael@0 1337 \fIshared\fR
michael@0 1338 database type\&. The shared database type is preferred; the legacy format is included for backward compatibility\&.
michael@0 1339 .PP
michael@0 1340 By default, the tools (\fBcertutil\fR,
michael@0 1341 \fBpk12util\fR,
michael@0 1342 \fBmodutil\fR) assume that the given security databases follow the more common legacy type\&. Using the SQLite databases must be manually specified by using the
michael@0 1343 \fBsql:\fR
michael@0 1344 prefix with the given security directory\&. For example:
michael@0 1345 .sp
michael@0 1346 .if n \{\
michael@0 1347 .RS 4
michael@0 1348 .\}
michael@0 1349 .nf
michael@0 1350 modutil \-create \-dbdir sql:/home/my/sharednssdb
michael@0 1351 .fi
michael@0 1352 .if n \{\
michael@0 1353 .RE
michael@0 1354 .\}
michael@0 1355 .PP
michael@0 1356 To set the shared database type as the default type for the tools, set the
michael@0 1357 \fBNSS_DEFAULT_DB_TYPE\fR
michael@0 1358 environment variable to
michael@0 1359 \fBsql\fR:
michael@0 1360 .sp
michael@0 1361 .if n \{\
michael@0 1362 .RS 4
michael@0 1363 .\}
michael@0 1364 .nf
michael@0 1365 export NSS_DEFAULT_DB_TYPE="sql"
michael@0 1366 .fi
michael@0 1367 .if n \{\
michael@0 1368 .RE
michael@0 1369 .\}
michael@0 1370 .PP
michael@0 1371 This line can be added to the
michael@0 1372 ~/\&.bashrc
michael@0 1373 file to make the change permanent for the user\&.
michael@0 1374 .PP
michael@0 1375 Most applications do not use the shared database by default, but they can be configured to use them\&. For example, this how\-to article covers how to configure Firefox and Thunderbird to use the new shared NSS databases:
michael@0 1376 .sp
michael@0 1377 .RS 4
michael@0 1378 .ie n \{\
michael@0 1379 \h'-04'\(bu\h'+03'\c
michael@0 1380 .\}
michael@0 1381 .el \{\
michael@0 1382 .sp -1
michael@0 1383 .IP \(bu 2.3
michael@0 1384 .\}
michael@0 1385 https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto
michael@0 1386 .RE
michael@0 1387 .PP
michael@0 1388 For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:
michael@0 1389 .sp
michael@0 1390 .RS 4
michael@0 1391 .ie n \{\
michael@0 1392 \h'-04'\(bu\h'+03'\c
michael@0 1393 .\}
michael@0 1394 .el \{\
michael@0 1395 .sp -1
michael@0 1396 .IP \(bu 2.3
michael@0 1397 .\}
michael@0 1398 https://wiki\&.mozilla\&.org/NSS_Shared_DB
michael@0 1399 .RE
michael@0 1400 .SH "SEE ALSO"
michael@0 1401 .PP
michael@0 1402 certutil (1)
michael@0 1403 .PP
michael@0 1404 pk12util (1)
michael@0 1405 .PP
michael@0 1406 signtool (1)
michael@0 1407 .PP
michael@0 1408 The NSS wiki has information on the new database design and how to configure applications to use it\&.
michael@0 1409 .sp
michael@0 1410 .RS 4
michael@0 1411 .ie n \{\
michael@0 1412 \h'-04'\(bu\h'+03'\c
michael@0 1413 .\}
michael@0 1414 .el \{\
michael@0 1415 .sp -1
michael@0 1416 .IP \(bu 2.3
michael@0 1417 .\}
michael@0 1418 https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto
michael@0 1419 .RE
michael@0 1420 .sp
michael@0 1421 .RS 4
michael@0 1422 .ie n \{\
michael@0 1423 \h'-04'\(bu\h'+03'\c
michael@0 1424 .\}
michael@0 1425 .el \{\
michael@0 1426 .sp -1
michael@0 1427 .IP \(bu 2.3
michael@0 1428 .\}
michael@0 1429 https://wiki\&.mozilla\&.org/NSS_Shared_DB
michael@0 1430 .RE
michael@0 1431 .SH "ADDITIONAL RESOURCES"
michael@0 1432 .PP
michael@0 1433 For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at
michael@0 1434 \m[blue]\fBhttp://www\&.mozilla\&.org/projects/security/pki/nss/\fR\m[]\&. The NSS site relates directly to NSS code changes and releases\&.
michael@0 1435 .PP
michael@0 1436 Mailing lists: https://lists\&.mozilla\&.org/listinfo/dev\-tech\-crypto
michael@0 1437 .PP
michael@0 1438 IRC: Freenode at #dogtag\-pki
michael@0 1439 .SH "AUTHORS"
michael@0 1440 .PP
michael@0 1441 The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google\&.
michael@0 1442 .PP
michael@0 1443 Authors: Elio Maldonado <emaldona@redhat\&.com>, Deon Lackey <dlackey@redhat\&.com>\&.
michael@0 1444 .SH "LICENSE"
michael@0 1445 .PP
michael@0 1446 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 1447 .SH "NOTES"
michael@0 1448 .IP " 1." 4
michael@0 1449 Mozilla NSS bug 836477
michael@0 1450 .RS 4
michael@0 1451 \%https://bugzilla.mozilla.org/show_bug.cgi?id=836477
michael@0 1452 .RE

mercurial