index.rst (33496B)
1 .. _mozilla_projects_nss_tools_modutil: 2 3 NSS tools : modutil 4 =================== 5 6 .. container:: 7 8 | Name 9 | modutil — Manage PKCS #11 module information within the security module 10 | database. 11 | Synopsis 12 | modutil [options] `arguments <arguments>`__ 13 | Description 14 | The Security Module Database Tool, modutil, is a command-line utility for 15 | managing PKCS #11 module information both within secmod.db files and 16 | within hardware tokens. modutil can add and delete PKCS #11 modules, 17 | change passwords on security databases, set defaults, list module 18 | contents, enable or disable slots, enable or disable FIPS 140-2 19 | compliance, and assign default providers for cryptographic operations. 20 | This tool can also create certificate, key, and module security database 21 | files. 22 | The tasks associated with security module database management are part of 23 | a process that typically also involves managing key databases and 24 | certificate databases. 25 | Options 26 | Running modutil always requires one (and only one) option to specify the 27 | type of module operation. Each option may take arguments, anywhere from 28 | none to multiple arguments. 29 | Options 30 | -add modulename 31 | Add the named PKCS #11 module to the database. Use this option 32 | with the -libfile, -ciphers, and -mechanisms arguments. 33 | -changepw tokenname 34 | Change the password on the named token. If the token has not been 35 | initialized, this option initializes the password. Use this option 36 | with the -pwfile and -newpwfile arguments. A password is 37 | equivalent to a personal identification number (PIN). 38 | -chkfips 39 | Verify whether the module is in the given FIPS mode. true means to 40 | verify that the module is in FIPS mode, while false means to 41 | verify that the module is not in FIPS mode. 42 | -create 43 | Create new certificate, key, and module databases. Use the -dbdir 44 | directory argument to specify a directory. If any of these 45 | databases already exist in a specified directory, modutil returns 46 | an error message. 47 | -default modulename 48 | Specify the security mechanisms for which the named module will be 49 | a default provider. The security mechanisms are specified with the 50 | -mechanisms argument. 51 | -delete modulename 52 | Delete the named module. The default NSS PKCS #11 module cannot be 53 | deleted. 54 | -disable modulename 55 | Disable all slots on the named module. Use the -slot argument to 56 | disable a specific slot. 57 | -enable modulename 58 | Enable all slots on the named module. Use the -slot argument to 59 | enable a specific slot. 60 | -fips [true \| false] 61 | Enable (true) or disable (false) FIPS 140-2 compliance for the 62 | default NSS module. 63 | -force 64 | Disable modutil's interactive prompts so it can be run from a 65 | script. Use this option only after manually testing each planned 66 | operation to check for warnings and to ensure that bypassing the 67 | prompts will cause no security lapses or loss of database 68 | integrity. 69 | -jar JAR-file 70 | Add a new PKCS #11 module to the database using the named JAR 71 | file. Use this command with the -installdir and -tempdir 72 | arguments. The JAR file uses the NSS PKCS #11 JAR format to 73 | identify all the files to be installed, the module's name, the 74 | mechanism flags, and the cipher flags, as well as any files to be 75 | installed on the target machine, including the PKCS #11 module 76 | library file and other files such as documentation. This is 77 | covered in the JAR installation file section in the man page, 78 | which details the special script needed to perform an installation 79 | through a server or with modutil. 80 | -list [modulename] 81 | Display basic information about the contents of the secmod.db 82 | file. Specifying a modulename displays detailed information about 83 | a particular module and its slots and tokens. 84 | -rawadd 85 | Add the module spec string to the secmod.db database. 86 | -rawlist 87 | Display the module specs for a specified module or for all 88 | loadable modules. 89 | -undefault modulename 90 | Specify the security mechanisms for which the named module will 91 | not be a default provider. The security mechanisms are specified 92 | with the -mechanisms argument. 93 | Arguments 94 | MODULE 95 | Give the security module to access. 96 | MODULESPEC 97 | Give the security module spec to load into the security database. 98 | -ciphers cipher-enable-list 99 | Enable specific ciphers in a module that is being added to the 100 | database. The cipher-enable-list is a colon-delimited list of 101 | cipher names. Enclose this list in quotation marks if it contains 102 | spaces. 103 | -dbdir [sql:]directory 104 | Specify the database directory in which to access or create 105 | security module database files. 106 | modutil supports two types of databases: the legacy security 107 | databases (cert8.db, key3.db, and secmod.db) and new SQLite 108 | databases (cert9.db, key4.db, and pkcs11.txt). If the prefix sql: 109 | is not used, then the tool assumes that the given databases are in 110 | the old format. 111 | --dbprefix prefix 112 | Specify the prefix used on the database files, such as my\_ for 113 | my_cert8.db. This option is provided as a special case. Changing 114 | the names of the certificate and key databases is not recommended. 115 | -installdir root-installation-directory 116 | Specify the root installation directory relative to which files 117 | will be installed by the -jar option. This directory should be one 118 | below which it is appropriate to store dynamic library files, such 119 | as a server's root directory. 120 | -libfile library-file 121 | Specify a path to a library file containing the implementation of 122 | the PKCS #11 interface module that is being added to the database. 123 | -mechanisms mechanism-list 124 | Specify the security mechanisms for which a particular module will 125 | be flagged as a default provider. The mechanism-list is a 126 | colon-delimited list of mechanism names. Enclose this list in 127 | quotation marks if it contains spaces. 128 | The module becomes a default provider for the listed mechanisms 129 | when those mechanisms are enabled. If more than one module claims 130 | to be a particular mechanism's default provider, that mechanism's 131 | default provider is undefined. 132 | modutil supports several mechanisms: RSA, DSA, RC2, RC4, RC5, AES, 133 | DES, DH, SHA1, SHA256, SHA512, SSL, TLS, MD5, MD2, RANDOM (for 134 | random number generation), and FRIENDLY (meaning certificates are 135 | publicly readable). 136 | -newpwfile new-password-file 137 | Specify a text file containing a token's new or replacement 138 | password so that a password can be entered automatically with the 139 | -changepw option. 140 | -nocertdb 141 | Do not open the certificate or key databases. This has several 142 | effects: 143 | o With the -create command, only a module security file is 144 | created; certificate and key databases are not created. 145 | o With the -jar command, signatures on the JAR file are not 146 | checked. 147 | o With the -changepw command, the password on the NSS internal 148 | module cannot be set or changed, since this password is 149 | stored in the key database. 150 | -pwfile old-password-file 151 | Specify a text file containing a token's existing password so that 152 | a password can be entered automatically when the -changepw option 153 | is used to change passwords. 154 | -secmod secmodname 155 | Give the name of the security module database (like secmod.db) to 156 | load. 157 | -slot slotname 158 | Specify a particular slot to be enabled or disabled with the 159 | -enable or -disable options. 160 | -string CONFIG_STRING 161 | Pass a configuration string for the module being added to the 162 | database. 163 | -tempdir temporary-directory 164 | Give a directory location where temporary files are created during 165 | the installation by the -jar option. If no temporary directory is 166 | specified, the current directory is used. 167 | Usage and Examples 168 | Creating Database Files 169 | Before any operations can be performed, there must be a set of security 170 | databases available. modutil can be used to create these files. The only 171 | required argument is the database that where the databases will be 172 | located. 173 | modutil -create -dbdir [sql:]directory 174 | Adding a Cryptographic Module 175 | Adding a PKCS #11 module means submitting a supporting library file, 176 | enabling its ciphers, and setting default provider status for various 177 | security mechanisms. This can be done by supplying all of the information 178 | through modutil directly or by running a JAR file and install script. For 179 | the most basic case, simply upload the library: 180 | modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms 181 mechanism-list] 182 | For example: 183 | modutil -dbdir sql:/home/my/sharednssdb -add "Example PKCS #11 Module" -libfile 184 "/tmp/crypto.so" -mechanisms RSA:DSA:RC2:RANDOM 185 | Using database directory ... 186 | Module "Example PKCS #11 Module" added to database. 187 | Installing a Cryptographic Module from a JAR File 188 | PKCS #11 modules can also be loaded using a JAR file, which contains all 189 | of the required libraries and an installation script that describes how to 190 | install the module. The JAR install script is described in more detail in 191 | [1]the section called “JAR Installation File Format”. 192 | The JAR installation script defines the setup information for each 193 | platform that the module can be installed on. For example: 194 | Platforms { 195 | Linux:5.4.08:x86 { 196 | ModuleName { "Example PKCS #11 Module" } 197 | ModuleFile { crypto.so } 198 | DefaultMechanismFlags{0x0000} 199 | CipherEnableFlags{0x0000} 200 | Files { 201 | crypto.so { 202 | Path{ /tmp/crypto.so } 203 | } 204 | setup.sh { 205 | Executable 206 | Path{ /tmp/setup.sh } 207 | } 208 | } 209 | } 210 | Linux:6.0.0:x86 { 211 | EquivalentPlatform { Linux:5.4.08:x86 } 212 | } 213 | } 214 | Both the install script and the required libraries must be bundled in a 215 | JAR file, which is specified with the -jar argument. 216 | modutil -dbdir sql:/home/mt"jar-install-filey/sharednssdb -jar install.jar -installdir 217 sql:/home/my/sharednssdb 218 | This installation JAR file was signed by: 219 | ---------------------------------------------- 220 | **SUBJECT NAME*\* 221 | C=US, ST=California, L=Mountain View, CN=Cryptorific Inc., OU=Digital ID 222 | Class 3 - Netscape Object Signing, OU="www.verisign.com/repository/CPS 223 | Incorp. by Ref.,LIAB.LTD(c)9 6", OU=www.verisign.com/CPS Incorp.by Ref 224 | . LIABILITY LTD.(c)97 VeriSign, OU=VeriSign Object Signing CA - Class 3 225 | Organization, OU="VeriSign, Inc.", O=VeriSign Trust Network \**ISSUER 226 | NAME**, OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 227 | VeriSign, OU=VeriSign Object Signing CA - Class 3 Organization, 228 | OU="VeriSign, Inc.", O=VeriSign Trust Network 229 | ---------------------------------------------- 230 | Do you wish to continue this installation? (y/n) y 231 | Using installer script "installer_script" 232 | Successfully parsed installation script 233 | Current platform is Linux:5.4.08:x86 234 | Using installation parameters for platform Linux:5.4.08:x86 235 | Installed file crypto.so to /tmp/crypto.so 236 | Installed file setup.sh to ./pk11inst.dir/setup.sh 237 | Executing "./pk11inst.dir/setup.sh"... 238 | "./pk11inst.dir/setup.sh" executed successfully 239 | Installed module "Example PKCS #11 Module" into module database 240 | Installation completed successfully 241 | Adding Module Spec 242 | Each module has information stored in the security database about its 243 | configuration and parameters. These can be added or edited using the 244 | -rawadd command. For the current settings or to see the format of the 245 | module spec in the database, use the -rawlist option. 246 | modutil -rawadd modulespec 247 | Deleting a Module 248 | A specific PKCS #11 module can be deleted from the secmod.db database: 249 | modutil -delete modulename -dbdir [sql:]directory 250 | Displaying Module Information 251 | The secmod.db database contains information about the PKCS #11 modules 252 | that are available to an application or server to use. The list of all 253 | modules, information about specific modules, and database configuration 254 | specs for modules can all be viewed. 255 | To simply get a list of modules in the database, use the -list command. 256 | modutil -list [modulename] -dbdir [sql:]directory 257 | Listing the modules shows the module name, their status, and other 258 | associated security databases for certificates and keys. For example: 259 | modutil -list -dbdir sql:/home/my/sharednssdb 260 | Listing of PKCS #11 Modules 261 | ----------------------------------------------------------- 262 | 1. NSS Internal PKCS #11 Module 263 | slots: 2 slots attached 264 | status: loaded 265 | slot: NSS Internal Cryptographic Services 266 | token: NSS Generic Crypto Services 267 | slot: NSS User Private Key and Certificate Services 268 | token: NSS Certificate DB 269 | ----------------------------------------------------------- 270 | Passing a specific module name with the -list returns details information 271 | about the module itself, like supported cipher mechanisms, version 272 | numbers, serial numbers, and other information about the module and the 273 | token it is loaded on. For example: 274 | modutil -list "NSS Internal PKCS #11 Module" -dbdir sql:/home/my/sharednssdb 275 | ----------------------------------------------------------- 276 | Name: NSS Internal PKCS #11 Module 277 | Library file: \**Internal ONLY module*\* 278 | Manufacturer: Mozilla Foundation 279 | Description: NSS Internal Crypto Services 280 | PKCS #11 Version 2.20 281 | Library Version: 3.11 282 | Cipher Enable Flags: None 283 | Default Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES 284 | Slot: NSS Internal Cryptographic Services 285 | Slot Mechanism Flags: RSA:RC2:RC4:DES:DH:SHA1:MD5:MD2:SSL:TLS:AES 286 | Manufacturer: Mozilla Foundation 287 | Type: Software 288 | Version Number: 3.11 289 | Firmware Version: 0.0 290 | Status: Enabled 291 | Token Name: NSS Generic Crypto Services 292 | Token Manufacturer: Mozilla Foundation 293 | Token Model: NSS 3 294 | Token Serial Number: 0000000000000000 295 | Token Version: 4.0 296 | Token Firmware Version: 0.0 297 | Access: Write Protected 298 | Login Type: Public (no login required) 299 | User Pin: NOT Initialized 300 | Slot: NSS User Private Key and Certificate Services 301 | Slot Mechanism Flags: None 302 | Manufacturer: Mozilla Foundation 303 | Type: Software 304 | Version Number: 3.11 305 | Firmware Version: 0.0 306 | Status: Enabled 307 | Token Name: NSS Certificate DB 308 | Token Manufacturer: Mozilla Foundation 309 | Token Model: NSS 3 310 | Token Serial Number: 0000000000000000 311 | Token Version: 8.3 312 | Token Firmware Version: 0.0 313 | Access: NOT Write Protected 314 | Login Type: Login required 315 | User Pin: Initialized 316 | A related command, -rawlist returns information about the database 317 | configuration for the modules. (This information can be edited by loading 318 | new specs using the -rawadd command.) 319 | modutil -rawlist -dbdir sql:/home/my/sharednssdb 320 | name="NSS Internal PKCS #11 Module" parameters="configdir=. certPrefix= keyPrefix= 321 secmod=secmod.db flags=readOnly " NSS="trustOrder=75 cipherOrder=100 322 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any 323 timeout=30 ] } Flags=internal,critical" 324 | Setting a Default Provider for Security Mechanisms 325 | Multiple security modules may provide support for the same security 326 | mechanisms. It is possible to set a specific security module as the 327 | default provider for a specific security mechanism (or, conversely, to 328 | prohibit a provider from supplying those mechanisms). 329 | modutil -default modulename -mechanisms mechanism-list 330 | To set a module as the default provider for mechanisms, use the -default 331 | command with a colon-separated list of mechanisms. The available 332 | mechanisms depend on the module; NSS supplies almost all common 333 | mechanisms. For example: 334 | modutil -default "NSS Internal PKCS #11 Module" -dbdir -mechanisms RSA:DSA:RC2 335 | Using database directory c:\databases... 336 | Successfully changed defaults. 337 | Clearing the default provider has the same format: 338 | modutil -undefault "NSS Internal PKCS #11 Module" -dbdir -mechanisms MD2:MD5 339 | Enabling and Disabling Modules and Slots 340 | Modules, and specific slots on modules, can be selectively enabled or 341 | disabled using modutil. Both commands have the same format: 342 | modutil -enable|-disable modulename [-slot slotname] 343 | For example: 344 | modutil -enable "NSS Internal PKCS #11 Module" -slot "NSS Internal Cryptographic 345 Services " -dbdir . 346 | Slot "NSS Internal Cryptographic Services " enabled. 347 | Be sure that the appropriate amount of trailing whitespace is after the 348 | slot name. Some slot names have a significant amount of whitespace that 349 | must be included, or the operation will fail. 350 | Enabling and Verifying FIPS Compliance 351 | The NSS modules can have FIPS 140-2 compliance enabled or disabled using 352 | modutil with the -fips option. For example: 353 | modutil -fips true -dbdir sql:/home/my/sharednssdb/ 354 | FIPS mode enabled. 355 | To verify that status of FIPS mode, run the -chkfips command with either a 356 | true or false flag (it doesn't matter which). The tool returns the current 357 | FIPS setting. 358 | modutil -chkfips false -dbdir sql:/home/my/sharednssdb/ 359 | FIPS mode enabled. 360 | Changing the Password on a Token 361 | Initializing or changing a token's password: 362 | modutil -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] 363 | modutil -dbdir sql:/home/my/sharednssdb -changepw "NSS Certificate DB" 364 | Enter old password: 365 | Incorrect password, try again... 366 | Enter old password: 367 | Enter new password: 368 | Re-enter new password: 369 | Token "Communicator Certificate DB" password changed successfully. 370 | JAR Installation File Format 371 | When a JAR file is run by a server, by modutil, or by any program that 372 | does not interpret JavaScript, a special information file must be included 373 | to install the libraries. There are several things to keep in mind with 374 | this file: 375 | o It must be declared in the JAR archive's manifest file. 376 | o The script can have any name. 377 | o The metainfo tag for this is Pkcs11_install_script. To declare 378 | meta-information in the manifest file, put it in a file that is passed 379 | to signtool. 380 | Sample Script 381 | For example, the PKCS #11 installer script could be in the file 382 | pk11install. If so, the metainfo file for signtool includes a line such as 383 | this: 384 | + Pkcs11_install_script: pk11install 385 | The script must define the platform and version number, the module name 386 | and file, and any optional information like supported ciphers and 387 | mechanisms. Multiple platforms can be defined in a single install file. 388 | ForwardCompatible { IRIX:6.2:mips SUNOS:5.5.1:sparc } 389 | Platforms { 390 | WINNT::x86 { 391 | ModuleName { "Example Module" } 392 | ModuleFile { win32/fort32.dll } 393 | DefaultMechanismFlags{0x0001} 394 | DefaultCipherFlags{0x0001} 395 | Files { 396 | win32/setup.exe { 397 | Executable 398 | RelativePath { %temp%/setup.exe } 399 | } 400 | win32/setup.hlp { 401 | RelativePath { %temp%/setup.hlp } 402 | } 403 | win32/setup.cab { 404 | RelativePath { %temp%/setup.cab } 405 | } 406 | } 407 | } 408 | SUNOS:5.5.1:sparc { 409 | ModuleName { "Example UNIX Module" } 410 | ModuleFile { unix/fort.so } 411 | DefaultMechanismFlags{0x0001} 412 | CipherEnableFlags{0x0001} 413 | Files { 414 | unix/fort.so { 415 | RelativePath{%root%/lib/fort.so} 416 | AbsolutePath{/usr/local/netscape/lib/fort.so} 417 | FilePermissions{555} 418 | } 419 | xplat/instr.html { 420 | RelativePath{%root%/docs/inst.html} 421 | AbsolutePath{/usr/local/netscape/docs/inst.html} 422 | FilePermissions{555} 423 | } 424 | } 425 | } 426 | IRIX:6.2:mips { 427 | EquivalentPlatform { SUNOS:5.5.1:sparc } 428 | } 429 | } 430 | Script Grammar 431 | The script is basic Java, allowing lists, key-value pairs, strings, and 432 | combinations of all of them. 433 | --> valuelist 434 | valuelist --> value valuelist 435 | <null> 436 | value ---> key_value_pair 437 | string 438 | key_value_pair --> key { valuelist } 439 | key --> string 440 | string --> simple_string 441 | "complex_string" 442 | simple_string --> [^ \\t\n\""{""}"]+ 443 | complex_string --> ([^\"\\\r\n]|(\\\")|(\\\\))+ 444 | Quotes and backslashes must be escaped with a backslash. A complex string 445 | must not include newlines or carriage returns.Outside of complex strings, 446 | all white space (for example, spaces, tabs, and carriage returns) is 447 | considered equal and is used only to delimit tokens. 448 | Keys 449 | The Java install file uses keys to define the platform and module 450 | information. 451 | ForwardCompatible gives a list of platforms that are forward compatible. 452 | If the current platform cannot be found in the list of supported 453 | platforms, then the ForwardCompatible list is checked for any platforms 454 | that have the same OS and architecture in an earlier version. If one is 455 | found, its attributes are used for the current platform. 456 | Platforms (required) Gives a list of platforms. Each entry in the list is 457 | itself a key-value pair: the key is the name of the platform and the value 458 | list contains various attributes of the platform. The platform string is 459 | in the format system name:OS release:architecture. The installer obtains 460 | these values from NSPR. OS release is an empty string on non-Unix 461 | operating systems. NSPR supports these platforms: 462 | o AIX (rs6000) 463 | o FREEBSD (x86) 464 | o HPUX (hppa1.1) 465 | o IRIX (mips) 466 | o LINUX (ppc, alpha, x86) 467 | o MacOS (PowerPC) 468 | o NCR (x86) 469 | o NEC (mips) 470 | o OSF (alpha) 471 | o SCO (x86) 472 | o SOLARIS (sparc) 473 | o SONY (mips) 474 | o SUNOS (sparc) 475 | o WINNT (x86) 476 | For example: 477 | IRIX:6.2:mips 478 | SUNOS:5.5.1:sparc 479 | Linux:2.0.32:x86 480 | WIN95::x86 481 | The module information is defined independently for each platform in the 482 | ModuleName, ModuleFile, and Files attributes. These attributes must be 483 | given unless an EquivalentPlatform attribute is specified. 484 | Per-Platform Keys 485 | Per-platform keys have meaning only within the value list of an entry in 486 | the Platforms list. 487 | ModuleName (required) gives the common name for the module. This name is 488 | used to reference the module by servers and by the modutil tool. 489 | ModuleFile (required) names the PKCS #11 module file for this platform. 490 | The name is given as the relative path of the file within the JAR archive. 491 | Files (required) lists the files that need to be installed for this 492 | module. Each entry in the file list is a key-value pair. The key is the 493 | path of the file in the JAR archive, and the value list contains 494 | attributes of the file. At least RelativePath or AbsolutePath must be 495 | specified for each file. 496 | DefaultMechanismFlags specifies mechanisms for which this module is the 497 | default provider; this is equivalent to the -mechanism option with the 498 | -add command. This key-value pair is a bitstring specified in hexadecimal 499 | (0x) format. It is constructed as a bitwise OR. If the 500 | DefaultMechanismFlags entry is omitted, the value defaults to 0x0. 501 | RSA: 0x00000001 502 | DSA: 0x00000002 503 | RC2: 0x00000004 504 | RC4: 0x00000008 505 | DES: 0x00000010 506 | DH: 0x00000020 507 | FORTEZZA: 0x00000040 508 | RC5: 0x00000080 509 | SHA1: 0x00000100 510 | MD5: 0x00000200 511 | MD2: 0x00000400 512 | RANDOM: 0x08000000 513 | FRIENDLY: 0x10000000 514 | OWN_PW_DEFAULTS: 0x20000000 515 | DISABLE: 0x40000000 516 | CipherEnableFlags specifies ciphers that this module provides that NSS 517 | does not provide (so that the module enables those ciphers for NSS). This 518 | is equivalent to the -cipher argument with the -add command. This key is a 519 | bitstring specified in hexadecimal (0x) format. It is constructed as a 520 | bitwise OR. If the CipherEnableFlags entry is omitted, the value defaults 521 | to 0x0. 522 | EquivalentPlatform specifies that the attributes of the named platform 523 | should also be used for the current platform. This makes it easier when 524 | more than one platform uses the same settings. 525 | Per-File Keys 526 | Some keys have meaning only within the value list of an entry in a Files 527 | list. 528 | Each file requires a path key the identifies where the file is. Either 529 | RelativePath or AbsolutePath must be specified. If both are specified, the 530 | relative path is tried first, and the absolute path is used only if no 531 | relative root directory is provided by the installer program. 532 | RelativePath specifies the destination directory of the file, relative to 533 | some directory decided at install time. Two variables can be used in the 534 | relative path: %root% and %temp%. %root% is replaced at run time with the 535 | directory relative to which files should be installed; for example, it may 536 | be the server's root directory. The %temp% directory is created at the 537 | beginning of the installation and destroyed at the end. The purpose of 538 | %temp% is to hold executable files (such as setup programs) or files that 539 | are used by these programs. Files destined for the temporary directory are 540 | guaranteed to be in place before any executable file is run; they are not 541 | deleted until all executable files have finished. 542 | AbsolutePath specifies the destination directory of the file as an 543 | absolute path. 544 | Executable specifies that the file is to be executed during the course of 545 | the installation. Typically, this string is used for a setup program 546 | provided by a module vendor, such as a self-extracting setup executable. 547 | More than one file can be specified as executable, in which case the files 548 | are run in the order in which they are specified in the script file. 549 | FilePermissions sets permissions on any referenced files in a string of 550 | octal digits, according to the standard Unix format. This string is a 551 | bitwise OR. 552 | user read: 0400 553 | user write: 0200 554 | user execute: 0100 555 | group read: 0040 556 | group write: 0020 557 | group execute: 0010 558 | other read: 0004 559 | other write: 0002 560 | other execute: 0001 561 | Some platforms may not understand these permissions. They are applied only 562 | insofar as they make sense for the current platform. If this attribute is 563 | omitted, a default of 777 is assumed. 564 | NSS Database Types 565 | NSS originally used BerkeleyDB databases to store security information. 566 | The last versions of these legacy databases are: 567 | o cert8.db for certificates 568 | o key3.db for keys 569 | o secmod.db for PKCS #11 module information 570 | BerkeleyDB has performance limitations, though, which prevent it from 571 | being easily used by multiple applications simultaneously. NSS has some 572 | flexibility that allows applications to use their own, independent 573 | database engine while keeping a shared database and working around the 574 | access issues. Still, NSS requires more flexibility to provide a truly 575 | shared security database. 576 | In 2009, NSS introduced a new set of databases that are SQLite databases 577 | rather than BerkleyDB. These new databases provide more accessibility and 578 | performance: 579 | o cert9.db for certificates 580 | o key4.db for keys 581 | o pkcs11.txt, which is listing of all of the PKCS #11 modules contained 582 | in a new subdirectory in the security databases directory 583 | Because the SQLite databases are designed to be shared, these are the 584 | shared database type. The shared database type is preferred; the legacy 585 | format is included for backward compatibility. 586 | By default, the tools (certutil, pk12util, modutil) assume that the given 587 | security databases follow the more common legacy type. Using the SQLite 588 | databases must be manually specified by using the sql: prefix with the 589 | given security directory. For example: 590 | modutil -create -dbdir sql:/home/my/sharednssdb 591 | To set the shared database type as the default type for the tools, set the 592 | NSS_DEFAULT_DB_TYPE environment variable to sql: 593 | export NSS_DEFAULT_DB_TYPE="sql" 594 | This line can be set added to the ~/.bashrc file to make the change 595 | permanent. 596 | Most applications do not use the shared database by default, but they can 597 | be configured to use them. For example, this how-to article covers how to 598 | configure Firefox and Thunderbird to use the new shared NSS databases: 599 | o https://wiki.mozilla.org/NSS_Shared_DB_Howto 600 | For an engineering draft on the changes in the shared NSS databases, see 601 | the NSS project wiki: 602 | o https://wiki.mozilla.org/NSS_Shared_DB 603 | See Also 604 | certutil (1) 605 | pk12util (1) 606 | signtool (1) 607 | The NSS wiki has information on the new database design and how to 608 | configure applications to use it. 609 | o https://wiki.mozilla.org/NSS_Shared_DB_Howto 610 | o https://wiki.mozilla.org/NSS_Shared_DB 611 | Additional Resources 612 | For information about NSS and other tools related to NSS (like JSS), check 613 | out the NSS project wiki at 614 | 615 [2]\ `http://www.mozilla.org/projects/security/pki/nss/ <https://www.mozilla.org/projects/security/pki/nss/>`__. 616 The NSS site relates 617 | directly to NSS code changes and releases. 618 | Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto 619 | IRC: Freenode at #dogtag-pki 620 | Authors 621 | The NSS tools were written and maintained by developers with Netscape, Red 622 | Hat, and Sun. 623 | Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey 624 | <dlackey@redhat.com>. 625 | Copyright 626 | (c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2. 627 | References 628 | Visible links 629 | 1. JAR Installation File Format 630 | ``file:///tmp/xmlto.6gGxS0/modutil.pro...r-install-file`` 631 | 2. https://www.mozilla.org/projects/security/pki/nss/