michael@0: '\" t
michael@0: .\" Title: MODUTIL
michael@0: .\" Author: [see the "Authors" section]
michael@0: .\" Generator: DocBook XSL Stylesheets v1.78.1
michael@0: .\" Date: 5 June 2014
michael@0: .\" Manual: NSS Security Tools
michael@0: .\" Source: nss-tools
michael@0: .\" Language: English
michael@0: .\"
michael@0: .TH "MODUTIL" "1" "5 June 2014" "nss-tools" "NSS Security Tools"
michael@0: .\" -----------------------------------------------------------------
michael@0: .\" * Define some portability stuff
michael@0: .\" -----------------------------------------------------------------
michael@0: .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
michael@0: .\" http://bugs.debian.org/507673
michael@0: .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
michael@0: .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
michael@0: .ie \n(.g .ds Aq \(aq
michael@0: .el .ds Aq '
michael@0: .\" -----------------------------------------------------------------
michael@0: .\" * set default formatting
michael@0: .\" -----------------------------------------------------------------
michael@0: .\" disable hyphenation
michael@0: .nh
michael@0: .\" disable justification (adjust text to left margin only)
michael@0: .ad l
michael@0: .\" -----------------------------------------------------------------
michael@0: .\" * MAIN CONTENT STARTS HERE *
michael@0: .\" -----------------------------------------------------------------
michael@0: .SH "NAME"
michael@0: modutil \- Manage PKCS #11 module information within the security module database\&.
michael@0: .SH "SYNOPSIS"
michael@0: .HP \w'\fBmodutil\fR\ 'u
michael@0: \fBmodutil\fR [\fIoptions\fR] [[\fIarguments\fR]]
michael@0: .SH "STATUS"
michael@0: .PP
michael@0: This documentation is still work in progress\&. Please contribute to the initial review in
michael@0: \m[blue]\fBMozilla NSS bug 836477\fR\m[]\&\s-2\u[1]\d\s+2
michael@0: .SH "DESCRIPTION"
michael@0: .PP
michael@0: The Security Module Database Tool,
michael@0: \fBmodutil\fR, is a command\-line utility for managing PKCS #11 module information both within
michael@0: secmod\&.db
michael@0: files and within hardware tokens\&.
michael@0: \fBmodutil\fR
michael@0: 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: .PP
michael@0: 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: .SH "OPTIONS"
michael@0: .PP
michael@0: Running
michael@0: \fBmodutil\fR
michael@0: 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: .PP
michael@0: \fBOptions\fR
michael@0: .PP
michael@0: \-add modulename
michael@0: .RS 4
michael@0: Add the named PKCS #11 module to the database\&. Use this option with the
michael@0: \fB\-libfile\fR,
michael@0: \fB\-ciphers\fR, and
michael@0: \fB\-mechanisms\fR
michael@0: arguments\&.
michael@0: .RE
michael@0: .PP
michael@0: \-changepw tokenname
michael@0: .RS 4
michael@0: 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: \fB\-pwfile\fR
michael@0: and
michael@0: \fB\-newpwfile\fR
michael@0: arguments\&. A
michael@0: \fIpassword\fR
michael@0: is equivalent to a personal identification number (PIN)\&.
michael@0: .RE
michael@0: .PP
michael@0: \-chkfips
michael@0: .RS 4
michael@0: Verify whether the module is in the given FIPS mode\&.
michael@0: \fBtrue\fR
michael@0: means to verify that the module is in FIPS mode, while
michael@0: \fBfalse\fR
michael@0: means to verify that the module is not in FIPS mode\&.
michael@0: .RE
michael@0: .PP
michael@0: \-create
michael@0: .RS 4
michael@0: Create new certificate, key, and module databases\&. Use the
michael@0: \fB\-dbdir\fR
michael@0: directory argument to specify a directory\&. If any of these databases already exist in a specified directory,
michael@0: \fBmodutil\fR
michael@0: returns an error message\&.
michael@0: .RE
michael@0: .PP
michael@0: \-default modulename
michael@0: .RS 4
michael@0: Specify the security mechanisms for which the named module will be a default provider\&. The security mechanisms are specified with the
michael@0: \fB\-mechanisms\fR
michael@0: argument\&.
michael@0: .RE
michael@0: .PP
michael@0: \-delete modulename
michael@0: .RS 4
michael@0: Delete the named module\&. The default NSS PKCS #11 module cannot be deleted\&.
michael@0: .RE
michael@0: .PP
michael@0: \-disable modulename
michael@0: .RS 4
michael@0: Disable all slots on the named module\&. Use the
michael@0: \fB\-slot\fR
michael@0: argument to disable a specific slot\&.
michael@0: .sp
michael@0: The internal NSS PKCS #11 module cannot be disabled\&.
michael@0: .RE
michael@0: .PP
michael@0: \-enable modulename
michael@0: .RS 4
michael@0: Enable all slots on the named module\&. Use the
michael@0: \fB\-slot\fR
michael@0: argument to enable a specific slot\&.
michael@0: .RE
michael@0: .PP
michael@0: \-fips [true | false]
michael@0: .RS 4
michael@0: Enable (true) or disable (false) FIPS 140\-2 compliance for the default NSS module\&.
michael@0: .RE
michael@0: .PP
michael@0: \-force
michael@0: .RS 4
michael@0: Disable
michael@0: \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: .RE
michael@0: .PP
michael@0: \-jar JAR\-file
michael@0: .RS 4
michael@0: Add a new PKCS #11 module to the database using the named JAR file\&. Use this command with the
michael@0: \fB\-installdir\fR
michael@0: and
michael@0: \fB\-tempdir\fR
michael@0: 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: \fBmodutil\fR\&.
michael@0: .RE
michael@0: .PP
michael@0: \-list [modulename]
michael@0: .RS 4
michael@0: Display basic information about the contents of the
michael@0: secmod\&.db
michael@0: file\&. Specifying a
michael@0: \fImodulename\fR
michael@0: displays detailed information about a particular module and its slots and tokens\&.
michael@0: .RE
michael@0: .PP
michael@0: \-rawadd
michael@0: .RS 4
michael@0: Add the module spec string to the
michael@0: secmod\&.db
michael@0: database\&.
michael@0: .RE
michael@0: .PP
michael@0: \-rawlist
michael@0: .RS 4
michael@0: Display the module specs for a specified module or for all loadable modules\&.
michael@0: .RE
michael@0: .PP
michael@0: \-undefault modulename
michael@0: .RS 4
michael@0: Specify the security mechanisms for which the named module will not be a default provider\&. The security mechanisms are specified with the
michael@0: \fB\-mechanisms\fR
michael@0: argument\&.
michael@0: .RE
michael@0: .PP
michael@0: \fBArguments\fR
michael@0: .PP
michael@0: MODULE
michael@0: .RS 4
michael@0: Give the security module to access\&.
michael@0: .RE
michael@0: .PP
michael@0: MODULESPEC
michael@0: .RS 4
michael@0: Give the security module spec to load into the security database\&.
michael@0: .RE
michael@0: .PP
michael@0: \-ciphers cipher\-enable\-list
michael@0: .RS 4
michael@0: Enable specific ciphers in a module that is being added to the database\&. The
michael@0: \fIcipher\-enable\-list\fR
michael@0: is a colon\-delimited list of cipher names\&. Enclose this list in quotation marks if it contains spaces\&.
michael@0: .RE
michael@0: .PP
michael@0: \-dbdir [sql:]directory
michael@0: .RS 4
michael@0: Specify the database directory in which to access or create security module database files\&.
michael@0: .sp
michael@0: \fBmodutil\fR
michael@0: supports two types of databases: the legacy security databases (cert8\&.db,
michael@0: key3\&.db, and
michael@0: secmod\&.db) and new SQLite databases (cert9\&.db,
michael@0: key4\&.db, and
michael@0: pkcs11\&.txt)\&. If the prefix
michael@0: \fBsql:\fR
michael@0: is not used, then the tool assumes that the given databases are in the old format\&.
michael@0: .RE
michael@0: .PP
michael@0: \-\-dbprefix prefix
michael@0: .RS 4
michael@0: Specify the prefix used on the database files, such as
michael@0: my_
michael@0: for
michael@0: 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: .RE
michael@0: .PP
michael@0: \-installdir root\-installation\-directory
michael@0: .RS 4
michael@0: Specify the root installation directory relative to which files will be installed by the
michael@0: \fB\-jar\fR
michael@0: 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: .RE
michael@0: .PP
michael@0: \-libfile library\-file
michael@0: .RS 4
michael@0: 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: .RE
michael@0: .PP
michael@0: \-mechanisms mechanism\-list
michael@0: .RS 4
michael@0: Specify the security mechanisms for which a particular module will be flagged as a default provider\&. The
michael@0: \fImechanism\-list\fR
michael@0: is a colon\-delimited list of mechanism names\&. Enclose this list in quotation marks if it contains spaces\&.
michael@0: .sp
michael@0: 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: .sp
michael@0: \fBmodutil\fR
michael@0: 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: .RE
michael@0: .PP
michael@0: \-newpwfile new\-password\-file
michael@0: .RS 4
michael@0: Specify a text file containing a token\*(Aqs new or replacement password so that a password can be entered automatically with the
michael@0: \fB\-changepw\fR
michael@0: option\&.
michael@0: .RE
michael@0: .PP
michael@0: \-nocertdb
michael@0: .RS 4
michael@0: Do not open the certificate or key databases\&. This has several effects:
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: With the
michael@0: \fB\-create\fR
michael@0: command, only a module security file is created; certificate and key databases are not created\&.
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: With the
michael@0: \fB\-jar\fR
michael@0: command, signatures on the JAR file are not checked\&.
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: With the
michael@0: \fB\-changepw\fR
michael@0: command, the password on the NSS internal module cannot be set or changed, since this password is stored in the key database\&.
michael@0: .RE
michael@0: .RE
michael@0: .PP
michael@0: \-pwfile old\-password\-file
michael@0: .RS 4
michael@0: Specify a text file containing a token\*(Aqs existing password so that a password can be entered automatically when the
michael@0: \fB\-changepw\fR
michael@0: option is used to change passwords\&.
michael@0: .RE
michael@0: .PP
michael@0: \-secmod secmodname
michael@0: .RS 4
michael@0: Give the name of the security module database (like
michael@0: secmod\&.db) to load\&.
michael@0: .RE
michael@0: .PP
michael@0: \-slot slotname
michael@0: .RS 4
michael@0: Specify a particular slot to be enabled or disabled with the
michael@0: \fB\-enable\fR
michael@0: or
michael@0: \fB\-disable\fR
michael@0: options\&.
michael@0: .RE
michael@0: .PP
michael@0: \-string CONFIG_STRING
michael@0: .RS 4
michael@0: Pass a configuration string for the module being added to the database\&.
michael@0: .RE
michael@0: .PP
michael@0: \-tempdir temporary\-directory
michael@0: .RS 4
michael@0: Give a directory location where temporary files are created during the installation by the
michael@0: \fB\-jar\fR
michael@0: option\&. If no temporary directory is specified, the current directory is used\&.
michael@0: .RE
michael@0: .SH "USAGE AND EXAMPLES"
michael@0: .PP
michael@0: \fBCreating Database Files\fR
michael@0: .PP
michael@0: Before any operations can be performed, there must be a set of security databases available\&.
michael@0: \fBmodutil\fR
michael@0: can be used to create these files\&. The only required argument is the database that where the databases will be located\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-create \-dbdir [sql:]directory
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBAdding a Cryptographic Module\fR
michael@0: .PP
michael@0: 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: \fBmodutil\fR
michael@0: directly or by running a JAR file and install script\&. For the most basic case, simply upload the library:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-add modulename \-libfile library\-file [\-ciphers cipher\-enable\-list] [\-mechanisms mechanism\-list]
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-dbdir sql:/home/my/sharednssdb \-add "Example PKCS #11 Module" \-libfile "/tmp/crypto\&.so" \-mechanisms RSA:DSA:RC2:RANDOM
michael@0:
michael@0: Using database directory \&.\&.\&.
michael@0: Module "Example PKCS #11 Module" added to database\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBInstalling a Cryptographic Module from a JAR File\fR
michael@0: .PP
michael@0: 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: the section called \(lqJAR INSTALLATION FILE FORMAT\(rq\&.
michael@0: .PP
michael@0: The JAR installation script defines the setup information for each platform that the module can be installed on\&. For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: Platforms {
michael@0: Linux:5\&.4\&.08:x86 {
michael@0: ModuleName { "Example PKCS #11 Module" }
michael@0: ModuleFile { crypto\&.so }
michael@0: DefaultMechanismFlags{0x0000}
michael@0: CipherEnableFlags{0x0000}
michael@0: Files {
michael@0: crypto\&.so {
michael@0: Path{ /tmp/crypto\&.so }
michael@0: }
michael@0: setup\&.sh {
michael@0: Executable
michael@0: Path{ /tmp/setup\&.sh }
michael@0: }
michael@0: }
michael@0: }
michael@0: Linux:6\&.0\&.0:x86 {
michael@0: EquivalentPlatform { Linux:5\&.4\&.08:x86 }
michael@0: }
michael@0: }
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: Both the install script and the required libraries must be bundled in a JAR file, which is specified with the
michael@0: \fB\-jar\fR
michael@0: argument\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-dbdir sql:/home/mt"jar\-install\-filey/sharednssdb \-jar install\&.jar \-installdir sql:/home/my/sharednssdb
michael@0:
michael@0: This installation JAR file was signed by:
michael@0: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0:
michael@0: **SUBJECT NAME**
michael@0:
michael@0: C=US, ST=California, L=Mountain View, CN=Cryptorific Inc\&., OU=Digital ID
michael@0: Class 3 \- Netscape Object Signing, OU="www\&.verisign\&.com/repository/CPS
michael@0: Incorp\&. by Ref\&.,LIAB\&.LTD(c)9 6", OU=www\&.verisign\&.com/CPS Incorp\&.by Ref
michael@0: \&. LIABILITY LTD\&.(c)97 VeriSign, OU=VeriSign Object Signing CA \- Class 3
michael@0: Organization, OU="VeriSign, Inc\&.", O=VeriSign Trust Network **ISSUER
michael@0: NAME**, OU=www\&.verisign\&.com/CPS Incorp\&.by Ref\&. LIABILITY LTD\&.(c)97
michael@0: VeriSign, OU=VeriSign Object Signing CA \- Class 3 Organization,
michael@0: OU="VeriSign, Inc\&.", O=VeriSign Trust Network
michael@0: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0:
michael@0: Do you wish to continue this installation? (y/n) y
michael@0: Using installer script "installer_script"
michael@0: Successfully parsed installation script
michael@0: Current platform is Linux:5\&.4\&.08:x86
michael@0: Using installation parameters for platform Linux:5\&.4\&.08:x86
michael@0: Installed file crypto\&.so to /tmp/crypto\&.so
michael@0: Installed file setup\&.sh to \&./pk11inst\&.dir/setup\&.sh
michael@0: Executing "\&./pk11inst\&.dir/setup\&.sh"\&.\&.\&.
michael@0: "\&./pk11inst\&.dir/setup\&.sh" executed successfully
michael@0: Installed module "Example PKCS #11 Module" into module database
michael@0:
michael@0: Installation completed successfully
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBAdding Module Spec\fR
michael@0: .PP
michael@0: Each module has information stored in the security database about its configuration and parameters\&. These can be added or edited using the
michael@0: \fB\-rawadd\fR
michael@0: command\&. For the current settings or to see the format of the module spec in the database, use the
michael@0: \fB\-rawlist\fR
michael@0: option\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-rawadd modulespec
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBDeleting a Module\fR
michael@0: .PP
michael@0: A specific PKCS #11 module can be deleted from the
michael@0: secmod\&.db
michael@0: database:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-delete modulename \-dbdir [sql:]directory
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBDisplaying Module Information\fR
michael@0: .PP
michael@0: The
michael@0: secmod\&.db
michael@0: 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: .PP
michael@0: To simply get a list of modules in the database, use the
michael@0: \fB\-list\fR
michael@0: command\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-list [modulename] \-dbdir [sql:]directory
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: Listing the modules shows the module name, their status, and other associated security databases for certificates and keys\&. For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-list \-dbdir sql:/home/my/sharednssdb
michael@0:
michael@0: Listing of PKCS #11 Modules
michael@0: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0: 1\&. NSS Internal PKCS #11 Module
michael@0: slots: 2 slots attached
michael@0: status: loaded
michael@0:
michael@0: slot: NSS Internal Cryptographic Services
michael@0: token: NSS Generic Crypto Services
michael@0:
michael@0: slot: NSS User Private Key and Certificate Services
michael@0: token: NSS Certificate DB
michael@0: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: Passing a specific module name with the
michael@0: \fB\-list\fR
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-list "NSS Internal PKCS #11 Module" \-dbdir sql:/home/my/sharednssdb
michael@0:
michael@0: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
michael@0: Name: NSS Internal PKCS #11 Module
michael@0: Library file: **Internal ONLY module**
michael@0: Manufacturer: Mozilla Foundation
michael@0: Description: NSS Internal Crypto Services
michael@0: PKCS #11 Version 2\&.20
michael@0: Library Version: 3\&.11
michael@0: Cipher Enable Flags: None
michael@0: Default Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES
michael@0:
michael@0: Slot: NSS Internal Cryptographic Services
michael@0: Slot Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES
michael@0: Manufacturer: Mozilla Foundation
michael@0: Type: Software
michael@0: Version Number: 3\&.11
michael@0: Firmware Version: 0\&.0
michael@0: Status: Enabled
michael@0: Token Name: NSS Generic Crypto Services
michael@0: Token Manufacturer: Mozilla Foundation
michael@0: Token Model: NSS 3
michael@0: Token Serial Number: 0000000000000000
michael@0: Token Version: 4\&.0
michael@0: Token Firmware Version: 0\&.0
michael@0: Access: Write Protected
michael@0: Login Type: Public (no login required)
michael@0: User Pin: NOT Initialized
michael@0:
michael@0: Slot: NSS User Private Key and Certificate Services
michael@0: Slot Mechanism Flags: None
michael@0: Manufacturer: Mozilla Foundation
michael@0: Type: Software
michael@0: Version Number: 3\&.11
michael@0: Firmware Version: 0\&.0
michael@0: Status: Enabled
michael@0: Token Name: NSS Certificate DB
michael@0: Token Manufacturer: Mozilla Foundation
michael@0: Token Model: NSS 3
michael@0: Token Serial Number: 0000000000000000
michael@0: Token Version: 8\&.3
michael@0: Token Firmware Version: 0\&.0
michael@0: Access: NOT Write Protected
michael@0: Login Type: Login required
michael@0: User Pin: Initialized
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: A related command,
michael@0: \fB\-rawlist\fR
michael@0: returns information about the database configuration for the modules\&. (This information can be edited by loading new specs using the
michael@0: \fB\-rawadd\fR
michael@0: command\&.)
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-rawlist \-dbdir sql:/home/my/sharednssdb
michael@0: 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: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBSetting a Default Provider for Security Mechanisms\fR
michael@0: .PP
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-default modulename \-mechanisms mechanism\-list
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: To set a module as the default provider for mechanisms, use the
michael@0: \fB\-default\fR
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-default "NSS Internal PKCS #11 Module" \-dbdir \-mechanisms RSA:DSA:RC2
michael@0:
michael@0: Using database directory c:\edatabases\&.\&.\&.
michael@0:
michael@0: Successfully changed defaults\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: Clearing the default provider has the same format:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-undefault "NSS Internal PKCS #11 Module" \-dbdir \-mechanisms MD2:MD5
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBEnabling and Disabling Modules and Slots\fR
michael@0: .PP
michael@0: Modules, and specific slots on modules, can be selectively enabled or disabled using
michael@0: \fBmodutil\fR\&. Both commands have the same format:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-enable|\-disable modulename [\-slot slotname]
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-enable "NSS Internal PKCS #11 Module" \-slot "NSS Internal Cryptographic Services " \-dbdir \&.
michael@0:
michael@0: Slot "NSS Internal Cryptographic Services " enabled\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: 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: .PP
michael@0: \fBEnabling and Verifying FIPS Compliance\fR
michael@0: .PP
michael@0: The NSS modules can have FIPS 140\-2 compliance enabled or disabled using
michael@0: \fBmodutil\fR
michael@0: with the
michael@0: \fB\-fips\fR
michael@0: option\&. For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-fips true \-dbdir sql:/home/my/sharednssdb/
michael@0:
michael@0: FIPS mode enabled\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: To verify that status of FIPS mode, run the
michael@0: \fB\-chkfips\fR
michael@0: command with either a true or false flag (it doesn\*(Aqt matter which)\&. The tool returns the current FIPS setting\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-chkfips false \-dbdir sql:/home/my/sharednssdb/
michael@0:
michael@0: FIPS mode enabled\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBChanging the Password on a Token\fR
michael@0: .PP
michael@0: Initializing or changing a token\*(Aqs password:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-changepw tokenname [\-pwfile old\-password\-file] [\-newpwfile new\-password\-file]
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-dbdir sql:/home/my/sharednssdb \-changepw "NSS Certificate DB"
michael@0:
michael@0: Enter old password:
michael@0: Incorrect password, try again\&.\&.\&.
michael@0: Enter old password:
michael@0: Enter new password:
michael@0: Re\-enter new password:
michael@0: Token "Communicator Certificate DB" password changed successfully\&.
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .SH "JAR INSTALLATION FILE FORMAT"
michael@0: .PP
michael@0: When a JAR file is run by a server, by
michael@0: \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: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: It must be declared in the JAR archive\*(Aqs manifest file\&.
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: The script can have any name\&.
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: The metainfo tag for this is
michael@0: \fBPkcs11_install_script\fR\&. To declare meta\-information in the manifest file, put it in a file that is passed to
michael@0: \fBsigntool\fR\&.
michael@0: .RE
michael@0: .PP
michael@0: \fBSample Script\fR
michael@0: .PP
michael@0: For example, the PKCS #11 installer script could be in the file pk11install\&. If so, the metainfo file for
michael@0: \fBsigntool\fR
michael@0: includes a line such as this:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: + Pkcs11_install_script: pk11install
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: ForwardCompatible { IRIX:6\&.2:mips SUNOS:5\&.5\&.1:sparc }
michael@0: Platforms {
michael@0: WINNT::x86 {
michael@0: ModuleName { "Example Module" }
michael@0: ModuleFile { win32/fort32\&.dll }
michael@0: DefaultMechanismFlags{0x0001}
michael@0: DefaultCipherFlags{0x0001}
michael@0: Files {
michael@0: win32/setup\&.exe {
michael@0: Executable
michael@0: RelativePath { %temp%/setup\&.exe }
michael@0: }
michael@0: win32/setup\&.hlp {
michael@0: RelativePath { %temp%/setup\&.hlp }
michael@0: }
michael@0: win32/setup\&.cab {
michael@0: RelativePath { %temp%/setup\&.cab }
michael@0: }
michael@0: }
michael@0: }
michael@0: WIN95::x86 {
michael@0: EquivalentPlatform {WINNT::x86}
michael@0: }
michael@0: SUNOS:5\&.5\&.1:sparc {
michael@0: ModuleName { "Example UNIX Module" }
michael@0: ModuleFile { unix/fort\&.so }
michael@0: DefaultMechanismFlags{0x0001}
michael@0: CipherEnableFlags{0x0001}
michael@0: Files {
michael@0: unix/fort\&.so {
michael@0: RelativePath{%root%/lib/fort\&.so}
michael@0: AbsolutePath{/usr/local/netscape/lib/fort\&.so}
michael@0: FilePermissions{555}
michael@0: }
michael@0: xplat/instr\&.html {
michael@0: RelativePath{%root%/docs/inst\&.html}
michael@0: AbsolutePath{/usr/local/netscape/docs/inst\&.html}
michael@0: FilePermissions{555}
michael@0: }
michael@0: }
michael@0: }
michael@0: IRIX:6\&.2:mips {
michael@0: EquivalentPlatform { SUNOS:5\&.5\&.1:sparc }
michael@0: }
michael@0: }
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBScript Grammar\fR
michael@0: .PP
michael@0: The script is basic Java, allowing lists, key\-value pairs, strings, and combinations of all of them\&.
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: \-\-> valuelist
michael@0:
michael@0: valuelist \-\-> value valuelist
michael@0:
michael@0:
michael@0: value \-\-\-> key_value_pair
michael@0: string
michael@0:
michael@0: key_value_pair \-\-> key { valuelist }
michael@0:
michael@0: key \-\-> string
michael@0:
michael@0: string \-\-> simple_string
michael@0: "complex_string"
michael@0:
michael@0: simple_string \-\-> [^ \et\en\e""{""}"]+
michael@0:
michael@0: complex_string \-\-> ([^\e"\e\e\er\en]|(\e\e\e")|(\e\e\e\e))+
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: 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: .PP
michael@0: \fBKeys\fR
michael@0: .PP
michael@0: The Java install file uses keys to define the platform and module information\&.
michael@0: .PP
michael@0: \fBForwardCompatible\fR
michael@0: 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: \fBForwardCompatible\fR
michael@0: 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: .PP
michael@0: \fBPlatforms\fR
michael@0: (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: \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: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: AIX (rs6000)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: BSDI (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: FREEBSD (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: HPUX (hppa1\&.1)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: IRIX (mips)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: LINUX (ppc, alpha, x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: MacOS (PowerPC)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: NCR (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: NEC (mips)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: OS2 (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: OSF (alpha)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: ReliantUNIX (mips)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: SCO (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: SOLARIS (sparc)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: SONY (mips)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: SUNOS (sparc)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: UnixWare (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: WIN16 (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: WIN95 (x86)
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: WINNT (x86)
michael@0: .RE
michael@0: .PP
michael@0: For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: IRIX:6\&.2:mips
michael@0: SUNOS:5\&.5\&.1:sparc
michael@0: Linux:2\&.0\&.32:x86
michael@0: WIN95::x86
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: The module information is defined independently for each platform in the
michael@0: \fBModuleName\fR,
michael@0: \fBModuleFile\fR, and
michael@0: \fBFiles\fR
michael@0: attributes\&. These attributes must be given unless an
michael@0: \fBEquivalentPlatform\fR
michael@0: attribute is specified\&.
michael@0: .PP
michael@0: \fBPer\-Platform Keys\fR
michael@0: .PP
michael@0: Per\-platform keys have meaning only within the value list of an entry in the
michael@0: \fBPlatforms\fR
michael@0: list\&.
michael@0: .PP
michael@0: \fBModuleName\fR
michael@0: (required) gives the common name for the module\&. This name is used to reference the module by servers and by the
michael@0: \fBmodutil\fR
michael@0: tool\&.
michael@0: .PP
michael@0: \fBModuleFile\fR
michael@0: (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: .PP
michael@0: \fBFiles\fR
michael@0: (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: \fBRelativePath\fR
michael@0: or
michael@0: \fBAbsolutePath\fR
michael@0: must be specified for each file\&.
michael@0: .PP
michael@0: \fBDefaultMechanismFlags\fR
michael@0: specifies mechanisms for which this module is the default provider; this is equivalent to the
michael@0: \fB\-mechanism\fR
michael@0: option with the
michael@0: \fB\-add\fR
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: RSA: 0x00000001
michael@0: DSA: 0x00000002
michael@0: RC2: 0x00000004
michael@0: RC4: 0x00000008
michael@0: DES: 0x00000010
michael@0: DH: 0x00000020
michael@0: FORTEZZA: 0x00000040
michael@0: RC5: 0x00000080
michael@0: SHA1: 0x00000100
michael@0: MD5: 0x00000200
michael@0: MD2: 0x00000400
michael@0: RANDOM: 0x08000000
michael@0: FRIENDLY: 0x10000000
michael@0: OWN_PW_DEFAULTS: 0x20000000
michael@0: DISABLE: 0x40000000
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: \fBCipherEnableFlags\fR
michael@0: 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: \fB\-cipher\fR
michael@0: argument with the
michael@0: \fB\-add\fR
michael@0: command\&. This key is a bitstring specified in hexadecimal (0x) format\&. It is constructed as a bitwise OR\&. If the
michael@0: \fBCipherEnableFlags\fR
michael@0: entry is omitted, the value defaults to 0x0\&.
michael@0: .PP
michael@0: \fBEquivalentPlatform\fR
michael@0: 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: .PP
michael@0: \fBPer\-File Keys\fR
michael@0: .PP
michael@0: Some keys have meaning only within the value list of an entry in a
michael@0: \fBFiles\fR
michael@0: list\&.
michael@0: .PP
michael@0: Each file requires a path key the identifies where the file is\&. Either
michael@0: \fBRelativePath\fR
michael@0: or
michael@0: \fBAbsolutePath\fR
michael@0: 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: .PP
michael@0: \fBRelativePath\fR
michael@0: 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: \fB%root%\fR
michael@0: and
michael@0: \fB%temp%\fR\&.
michael@0: \fB%root%\fR
michael@0: 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: \fB%temp%\fR
michael@0: directory is created at the beginning of the installation and destroyed at the end\&. The purpose of
michael@0: \fB%temp%\fR
michael@0: 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: .PP
michael@0: \fBAbsolutePath\fR
michael@0: specifies the destination directory of the file as an absolute path\&.
michael@0: .PP
michael@0: \fBExecutable\fR
michael@0: 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: .PP
michael@0: \fBFilePermissions\fR
michael@0: 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: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: user read: 0400
michael@0: user write: 0200
michael@0: user execute: 0100
michael@0: group read: 0040
michael@0: group write: 0020
michael@0: group execute: 0010
michael@0: other read: 0004
michael@0: other write: 0002
michael@0: other execute: 0001
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: 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: .SH "NSS DATABASE TYPES"
michael@0: .PP
michael@0: NSS originally used BerkeleyDB databases to store security information\&. The last versions of these
michael@0: \fIlegacy\fR
michael@0: databases are:
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: cert8\&.db for certificates
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: key3\&.db for keys
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: secmod\&.db for PKCS #11 module information
michael@0: .RE
michael@0: .PP
michael@0: 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: .PP
michael@0: 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: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: cert9\&.db for certificates
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: key4\&.db for keys
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: pkcs11\&.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory
michael@0: .RE
michael@0: .PP
michael@0: Because the SQLite databases are designed to be shared, these are the
michael@0: \fIshared\fR
michael@0: database type\&. The shared database type is preferred; the legacy format is included for backward compatibility\&.
michael@0: .PP
michael@0: By default, the tools (\fBcertutil\fR,
michael@0: \fBpk12util\fR,
michael@0: \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: \fBsql:\fR
michael@0: prefix with the given security directory\&. For example:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: modutil \-create \-dbdir sql:/home/my/sharednssdb
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: To set the shared database type as the default type for the tools, set the
michael@0: \fBNSS_DEFAULT_DB_TYPE\fR
michael@0: environment variable to
michael@0: \fBsql\fR:
michael@0: .sp
michael@0: .if n \{\
michael@0: .RS 4
michael@0: .\}
michael@0: .nf
michael@0: export NSS_DEFAULT_DB_TYPE="sql"
michael@0: .fi
michael@0: .if n \{\
michael@0: .RE
michael@0: .\}
michael@0: .PP
michael@0: This line can be added to the
michael@0: ~/\&.bashrc
michael@0: file to make the change permanent for the user\&.
michael@0: .PP
michael@0: 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: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto
michael@0: .RE
michael@0: .PP
michael@0: For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki:
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: https://wiki\&.mozilla\&.org/NSS_Shared_DB
michael@0: .RE
michael@0: .SH "SEE ALSO"
michael@0: .PP
michael@0: certutil (1)
michael@0: .PP
michael@0: pk12util (1)
michael@0: .PP
michael@0: signtool (1)
michael@0: .PP
michael@0: The NSS wiki has information on the new database design and how to configure applications to use it\&.
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto
michael@0: .RE
michael@0: .sp
michael@0: .RS 4
michael@0: .ie n \{\
michael@0: \h'-04'\(bu\h'+03'\c
michael@0: .\}
michael@0: .el \{\
michael@0: .sp -1
michael@0: .IP \(bu 2.3
michael@0: .\}
michael@0: https://wiki\&.mozilla\&.org/NSS_Shared_DB
michael@0: .RE
michael@0: .SH "ADDITIONAL RESOURCES"
michael@0: .PP
michael@0: For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at
michael@0: \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: .PP
michael@0: Mailing lists: https://lists\&.mozilla\&.org/listinfo/dev\-tech\-crypto
michael@0: .PP
michael@0: IRC: Freenode at #dogtag\-pki
michael@0: .SH "AUTHORS"
michael@0: .PP
michael@0: The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google\&.
michael@0: .PP
michael@0: Authors: Elio Maldonado , Deon Lackey \&.
michael@0: .SH "LICENSE"
michael@0: .PP
michael@0: 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: .SH "NOTES"
michael@0: .IP " 1." 4
michael@0: Mozilla NSS bug 836477
michael@0: .RS 4
michael@0: \%https://bugzilla.mozilla.org/show_bug.cgi?id=836477
michael@0: .RE