Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | '\" t |
michael@0 | 2 | .\" Title: PK12UTIL |
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 "PK12UTIL" "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 | pk12util \- Export and import keys and certificate to or from a PKCS #12 file and the NSS database |
michael@0 | 32 | .SH "SYNOPSIS" |
michael@0 | 33 | .HP \w'\fBpk12util\fR\ 'u |
michael@0 | 34 | \fBpk12util\fR [\-i\ p12File|\-l\ p12File|\-o\ p12File] [\-d\ [sql:]directory] [\-h\ tokenname] [\-P\ dbprefix] [\-r] [\-v] [\-k\ slotPasswordFile|\-K\ slotPassword] [\-w\ p12filePasswordFile|\-W\ p12filePassword] |
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 PKCS #12 utility, |
michael@0 | 42 | \fBpk12util\fR, enables sharing certificates among any server that supports PKCS#12\&. The tool can import certificates and keys from PKCS#12 files into security databases, export certificates, and list certificates and keys\&. |
michael@0 | 43 | .SH "OPTIONS AND ARGUMENTS" |
michael@0 | 44 | .PP |
michael@0 | 45 | \fBOptions\fR |
michael@0 | 46 | .PP |
michael@0 | 47 | \-i p12file |
michael@0 | 48 | .RS 4 |
michael@0 | 49 | Import keys and certificates from a PKCS#12 file into a security database\&. |
michael@0 | 50 | .RE |
michael@0 | 51 | .PP |
michael@0 | 52 | \-l p12file |
michael@0 | 53 | .RS 4 |
michael@0 | 54 | List the keys and certificates in PKCS#12 file\&. |
michael@0 | 55 | .RE |
michael@0 | 56 | .PP |
michael@0 | 57 | \-o p12file |
michael@0 | 58 | .RS 4 |
michael@0 | 59 | Export keys and certificates from the security database to a PKCS#12 file\&. |
michael@0 | 60 | .RE |
michael@0 | 61 | .PP |
michael@0 | 62 | \fBArguments\fR |
michael@0 | 63 | .PP |
michael@0 | 64 | \-c keyCipher |
michael@0 | 65 | .RS 4 |
michael@0 | 66 | Specify the key encryption algorithm\&. |
michael@0 | 67 | .RE |
michael@0 | 68 | .PP |
michael@0 | 69 | \-C certCipher |
michael@0 | 70 | .RS 4 |
michael@0 | 71 | Specify the key cert (overall package) encryption algorithm\&. |
michael@0 | 72 | .RE |
michael@0 | 73 | .PP |
michael@0 | 74 | \-d [sql:]directory |
michael@0 | 75 | .RS 4 |
michael@0 | 76 | Specify the database directory into which to import to or export from certificates and keys\&. |
michael@0 | 77 | .sp |
michael@0 | 78 | \fBpk12util\fR |
michael@0 | 79 | supports two types of databases: the legacy security databases (cert8\&.db, |
michael@0 | 80 | key3\&.db, and |
michael@0 | 81 | secmod\&.db) and new SQLite databases (cert9\&.db, |
michael@0 | 82 | key4\&.db, and |
michael@0 | 83 | pkcs11\&.txt)\&. If the prefix |
michael@0 | 84 | \fBsql:\fR |
michael@0 | 85 | is not used, then the tool assumes that the given databases are in the old format\&. |
michael@0 | 86 | .RE |
michael@0 | 87 | .PP |
michael@0 | 88 | \-h tokenname |
michael@0 | 89 | .RS 4 |
michael@0 | 90 | Specify the name of the token to import into or export from\&. |
michael@0 | 91 | .RE |
michael@0 | 92 | .PP |
michael@0 | 93 | \-k slotPasswordFile |
michael@0 | 94 | .RS 4 |
michael@0 | 95 | Specify the text file containing the slot\*(Aqs password\&. |
michael@0 | 96 | .RE |
michael@0 | 97 | .PP |
michael@0 | 98 | \-K slotPassword |
michael@0 | 99 | .RS 4 |
michael@0 | 100 | Specify the slot\*(Aqs password\&. |
michael@0 | 101 | .RE |
michael@0 | 102 | .PP |
michael@0 | 103 | \-m | \-\-key\-len keyLength |
michael@0 | 104 | .RS 4 |
michael@0 | 105 | Specify the desired length of the symmetric key to be used to encrypt the private key\&. |
michael@0 | 106 | .RE |
michael@0 | 107 | .PP |
michael@0 | 108 | \-n | \-\-cert\-key\-len certKeyLength |
michael@0 | 109 | .RS 4 |
michael@0 | 110 | Specify the desired length of the symmetric key to be used to encrypt the certificates and other meta\-data\&. |
michael@0 | 111 | .RE |
michael@0 | 112 | .PP |
michael@0 | 113 | \-n certname |
michael@0 | 114 | .RS 4 |
michael@0 | 115 | Specify the nickname of the cert and private key to export\&. |
michael@0 | 116 | .RE |
michael@0 | 117 | .PP |
michael@0 | 118 | \-P prefix |
michael@0 | 119 | .RS 4 |
michael@0 | 120 | Specify the prefix used on the certificate and key databases\&. This option is provided as a special case\&. Changing the names of the certificate and key databases is not recommended\&. |
michael@0 | 121 | .RE |
michael@0 | 122 | .PP |
michael@0 | 123 | \-r |
michael@0 | 124 | .RS 4 |
michael@0 | 125 | Dumps all of the data in raw (binary) form\&. This must be saved as a DER file\&. The default is to return information in a pretty\-print ASCII format, which displays the information about the certificates and public keys in the p12 file\&. |
michael@0 | 126 | .RE |
michael@0 | 127 | .PP |
michael@0 | 128 | \-v |
michael@0 | 129 | .RS 4 |
michael@0 | 130 | Enable debug logging when importing\&. |
michael@0 | 131 | .RE |
michael@0 | 132 | .PP |
michael@0 | 133 | \-w p12filePasswordFile |
michael@0 | 134 | .RS 4 |
michael@0 | 135 | Specify the text file containing the pkcs #12 file password\&. |
michael@0 | 136 | .RE |
michael@0 | 137 | .PP |
michael@0 | 138 | \-W p12filePassword |
michael@0 | 139 | .RS 4 |
michael@0 | 140 | Specify the pkcs #12 file password\&. |
michael@0 | 141 | .RE |
michael@0 | 142 | .SH "RETURN CODES" |
michael@0 | 143 | .sp |
michael@0 | 144 | .RS 4 |
michael@0 | 145 | .ie n \{\ |
michael@0 | 146 | \h'-04'\(bu\h'+03'\c |
michael@0 | 147 | .\} |
michael@0 | 148 | .el \{\ |
michael@0 | 149 | .sp -1 |
michael@0 | 150 | .IP \(bu 2.3 |
michael@0 | 151 | .\} |
michael@0 | 152 | 0 \- No error |
michael@0 | 153 | .RE |
michael@0 | 154 | .sp |
michael@0 | 155 | .RS 4 |
michael@0 | 156 | .ie n \{\ |
michael@0 | 157 | \h'-04'\(bu\h'+03'\c |
michael@0 | 158 | .\} |
michael@0 | 159 | .el \{\ |
michael@0 | 160 | .sp -1 |
michael@0 | 161 | .IP \(bu 2.3 |
michael@0 | 162 | .\} |
michael@0 | 163 | 1 \- User Cancelled |
michael@0 | 164 | .RE |
michael@0 | 165 | .sp |
michael@0 | 166 | .RS 4 |
michael@0 | 167 | .ie n \{\ |
michael@0 | 168 | \h'-04'\(bu\h'+03'\c |
michael@0 | 169 | .\} |
michael@0 | 170 | .el \{\ |
michael@0 | 171 | .sp -1 |
michael@0 | 172 | .IP \(bu 2.3 |
michael@0 | 173 | .\} |
michael@0 | 174 | 2 \- Usage error |
michael@0 | 175 | .RE |
michael@0 | 176 | .sp |
michael@0 | 177 | .RS 4 |
michael@0 | 178 | .ie n \{\ |
michael@0 | 179 | \h'-04'\(bu\h'+03'\c |
michael@0 | 180 | .\} |
michael@0 | 181 | .el \{\ |
michael@0 | 182 | .sp -1 |
michael@0 | 183 | .IP \(bu 2.3 |
michael@0 | 184 | .\} |
michael@0 | 185 | 6 \- NLS init error |
michael@0 | 186 | .RE |
michael@0 | 187 | .sp |
michael@0 | 188 | .RS 4 |
michael@0 | 189 | .ie n \{\ |
michael@0 | 190 | \h'-04'\(bu\h'+03'\c |
michael@0 | 191 | .\} |
michael@0 | 192 | .el \{\ |
michael@0 | 193 | .sp -1 |
michael@0 | 194 | .IP \(bu 2.3 |
michael@0 | 195 | .\} |
michael@0 | 196 | 8 \- Certificate DB open error |
michael@0 | 197 | .RE |
michael@0 | 198 | .sp |
michael@0 | 199 | .RS 4 |
michael@0 | 200 | .ie n \{\ |
michael@0 | 201 | \h'-04'\(bu\h'+03'\c |
michael@0 | 202 | .\} |
michael@0 | 203 | .el \{\ |
michael@0 | 204 | .sp -1 |
michael@0 | 205 | .IP \(bu 2.3 |
michael@0 | 206 | .\} |
michael@0 | 207 | 9 \- Key DB open error |
michael@0 | 208 | .RE |
michael@0 | 209 | .sp |
michael@0 | 210 | .RS 4 |
michael@0 | 211 | .ie n \{\ |
michael@0 | 212 | \h'-04'\(bu\h'+03'\c |
michael@0 | 213 | .\} |
michael@0 | 214 | .el \{\ |
michael@0 | 215 | .sp -1 |
michael@0 | 216 | .IP \(bu 2.3 |
michael@0 | 217 | .\} |
michael@0 | 218 | 10 \- File initialization error |
michael@0 | 219 | .RE |
michael@0 | 220 | .sp |
michael@0 | 221 | .RS 4 |
michael@0 | 222 | .ie n \{\ |
michael@0 | 223 | \h'-04'\(bu\h'+03'\c |
michael@0 | 224 | .\} |
michael@0 | 225 | .el \{\ |
michael@0 | 226 | .sp -1 |
michael@0 | 227 | .IP \(bu 2.3 |
michael@0 | 228 | .\} |
michael@0 | 229 | 11 \- Unicode conversion error |
michael@0 | 230 | .RE |
michael@0 | 231 | .sp |
michael@0 | 232 | .RS 4 |
michael@0 | 233 | .ie n \{\ |
michael@0 | 234 | \h'-04'\(bu\h'+03'\c |
michael@0 | 235 | .\} |
michael@0 | 236 | .el \{\ |
michael@0 | 237 | .sp -1 |
michael@0 | 238 | .IP \(bu 2.3 |
michael@0 | 239 | .\} |
michael@0 | 240 | 12 \- Temporary file creation error |
michael@0 | 241 | .RE |
michael@0 | 242 | .sp |
michael@0 | 243 | .RS 4 |
michael@0 | 244 | .ie n \{\ |
michael@0 | 245 | \h'-04'\(bu\h'+03'\c |
michael@0 | 246 | .\} |
michael@0 | 247 | .el \{\ |
michael@0 | 248 | .sp -1 |
michael@0 | 249 | .IP \(bu 2.3 |
michael@0 | 250 | .\} |
michael@0 | 251 | 13 \- PKCS11 get slot error |
michael@0 | 252 | .RE |
michael@0 | 253 | .sp |
michael@0 | 254 | .RS 4 |
michael@0 | 255 | .ie n \{\ |
michael@0 | 256 | \h'-04'\(bu\h'+03'\c |
michael@0 | 257 | .\} |
michael@0 | 258 | .el \{\ |
michael@0 | 259 | .sp -1 |
michael@0 | 260 | .IP \(bu 2.3 |
michael@0 | 261 | .\} |
michael@0 | 262 | 14 \- PKCS12 decoder start error |
michael@0 | 263 | .RE |
michael@0 | 264 | .sp |
michael@0 | 265 | .RS 4 |
michael@0 | 266 | .ie n \{\ |
michael@0 | 267 | \h'-04'\(bu\h'+03'\c |
michael@0 | 268 | .\} |
michael@0 | 269 | .el \{\ |
michael@0 | 270 | .sp -1 |
michael@0 | 271 | .IP \(bu 2.3 |
michael@0 | 272 | .\} |
michael@0 | 273 | 15 \- error read from import file |
michael@0 | 274 | .RE |
michael@0 | 275 | .sp |
michael@0 | 276 | .RS 4 |
michael@0 | 277 | .ie n \{\ |
michael@0 | 278 | \h'-04'\(bu\h'+03'\c |
michael@0 | 279 | .\} |
michael@0 | 280 | .el \{\ |
michael@0 | 281 | .sp -1 |
michael@0 | 282 | .IP \(bu 2.3 |
michael@0 | 283 | .\} |
michael@0 | 284 | 16 \- pkcs12 decode error |
michael@0 | 285 | .RE |
michael@0 | 286 | .sp |
michael@0 | 287 | .RS 4 |
michael@0 | 288 | .ie n \{\ |
michael@0 | 289 | \h'-04'\(bu\h'+03'\c |
michael@0 | 290 | .\} |
michael@0 | 291 | .el \{\ |
michael@0 | 292 | .sp -1 |
michael@0 | 293 | .IP \(bu 2.3 |
michael@0 | 294 | .\} |
michael@0 | 295 | 17 \- pkcs12 decoder verify error |
michael@0 | 296 | .RE |
michael@0 | 297 | .sp |
michael@0 | 298 | .RS 4 |
michael@0 | 299 | .ie n \{\ |
michael@0 | 300 | \h'-04'\(bu\h'+03'\c |
michael@0 | 301 | .\} |
michael@0 | 302 | .el \{\ |
michael@0 | 303 | .sp -1 |
michael@0 | 304 | .IP \(bu 2.3 |
michael@0 | 305 | .\} |
michael@0 | 306 | 18 \- pkcs12 decoder validate bags error |
michael@0 | 307 | .RE |
michael@0 | 308 | .sp |
michael@0 | 309 | .RS 4 |
michael@0 | 310 | .ie n \{\ |
michael@0 | 311 | \h'-04'\(bu\h'+03'\c |
michael@0 | 312 | .\} |
michael@0 | 313 | .el \{\ |
michael@0 | 314 | .sp -1 |
michael@0 | 315 | .IP \(bu 2.3 |
michael@0 | 316 | .\} |
michael@0 | 317 | 19 \- pkcs12 decoder import bags error |
michael@0 | 318 | .RE |
michael@0 | 319 | .sp |
michael@0 | 320 | .RS 4 |
michael@0 | 321 | .ie n \{\ |
michael@0 | 322 | \h'-04'\(bu\h'+03'\c |
michael@0 | 323 | .\} |
michael@0 | 324 | .el \{\ |
michael@0 | 325 | .sp -1 |
michael@0 | 326 | .IP \(bu 2.3 |
michael@0 | 327 | .\} |
michael@0 | 328 | 20 \- key db conversion version 3 to version 2 error |
michael@0 | 329 | .RE |
michael@0 | 330 | .sp |
michael@0 | 331 | .RS 4 |
michael@0 | 332 | .ie n \{\ |
michael@0 | 333 | \h'-04'\(bu\h'+03'\c |
michael@0 | 334 | .\} |
michael@0 | 335 | .el \{\ |
michael@0 | 336 | .sp -1 |
michael@0 | 337 | .IP \(bu 2.3 |
michael@0 | 338 | .\} |
michael@0 | 339 | 21 \- cert db conversion version 7 to version 5 error |
michael@0 | 340 | .RE |
michael@0 | 341 | .sp |
michael@0 | 342 | .RS 4 |
michael@0 | 343 | .ie n \{\ |
michael@0 | 344 | \h'-04'\(bu\h'+03'\c |
michael@0 | 345 | .\} |
michael@0 | 346 | .el \{\ |
michael@0 | 347 | .sp -1 |
michael@0 | 348 | .IP \(bu 2.3 |
michael@0 | 349 | .\} |
michael@0 | 350 | 22 \- cert and key dbs patch error |
michael@0 | 351 | .RE |
michael@0 | 352 | .sp |
michael@0 | 353 | .RS 4 |
michael@0 | 354 | .ie n \{\ |
michael@0 | 355 | \h'-04'\(bu\h'+03'\c |
michael@0 | 356 | .\} |
michael@0 | 357 | .el \{\ |
michael@0 | 358 | .sp -1 |
michael@0 | 359 | .IP \(bu 2.3 |
michael@0 | 360 | .\} |
michael@0 | 361 | 23 \- get default cert db error |
michael@0 | 362 | .RE |
michael@0 | 363 | .sp |
michael@0 | 364 | .RS 4 |
michael@0 | 365 | .ie n \{\ |
michael@0 | 366 | \h'-04'\(bu\h'+03'\c |
michael@0 | 367 | .\} |
michael@0 | 368 | .el \{\ |
michael@0 | 369 | .sp -1 |
michael@0 | 370 | .IP \(bu 2.3 |
michael@0 | 371 | .\} |
michael@0 | 372 | 24 \- find cert by nickname error |
michael@0 | 373 | .RE |
michael@0 | 374 | .sp |
michael@0 | 375 | .RS 4 |
michael@0 | 376 | .ie n \{\ |
michael@0 | 377 | \h'-04'\(bu\h'+03'\c |
michael@0 | 378 | .\} |
michael@0 | 379 | .el \{\ |
michael@0 | 380 | .sp -1 |
michael@0 | 381 | .IP \(bu 2.3 |
michael@0 | 382 | .\} |
michael@0 | 383 | 25 \- create export context error |
michael@0 | 384 | .RE |
michael@0 | 385 | .sp |
michael@0 | 386 | .RS 4 |
michael@0 | 387 | .ie n \{\ |
michael@0 | 388 | \h'-04'\(bu\h'+03'\c |
michael@0 | 389 | .\} |
michael@0 | 390 | .el \{\ |
michael@0 | 391 | .sp -1 |
michael@0 | 392 | .IP \(bu 2.3 |
michael@0 | 393 | .\} |
michael@0 | 394 | 26 \- PKCS12 add password itegrity error |
michael@0 | 395 | .RE |
michael@0 | 396 | .sp |
michael@0 | 397 | .RS 4 |
michael@0 | 398 | .ie n \{\ |
michael@0 | 399 | \h'-04'\(bu\h'+03'\c |
michael@0 | 400 | .\} |
michael@0 | 401 | .el \{\ |
michael@0 | 402 | .sp -1 |
michael@0 | 403 | .IP \(bu 2.3 |
michael@0 | 404 | .\} |
michael@0 | 405 | 27 \- cert and key Safes creation error |
michael@0 | 406 | .RE |
michael@0 | 407 | .sp |
michael@0 | 408 | .RS 4 |
michael@0 | 409 | .ie n \{\ |
michael@0 | 410 | \h'-04'\(bu\h'+03'\c |
michael@0 | 411 | .\} |
michael@0 | 412 | .el \{\ |
michael@0 | 413 | .sp -1 |
michael@0 | 414 | .IP \(bu 2.3 |
michael@0 | 415 | .\} |
michael@0 | 416 | 28 \- PKCS12 add cert and key error |
michael@0 | 417 | .RE |
michael@0 | 418 | .sp |
michael@0 | 419 | .RS 4 |
michael@0 | 420 | .ie n \{\ |
michael@0 | 421 | \h'-04'\(bu\h'+03'\c |
michael@0 | 422 | .\} |
michael@0 | 423 | .el \{\ |
michael@0 | 424 | .sp -1 |
michael@0 | 425 | .IP \(bu 2.3 |
michael@0 | 426 | .\} |
michael@0 | 427 | 29 \- PKCS12 encode error |
michael@0 | 428 | .RE |
michael@0 | 429 | .SH "EXAMPLES" |
michael@0 | 430 | .PP |
michael@0 | 431 | \fBImporting Keys and Certificates\fR |
michael@0 | 432 | .PP |
michael@0 | 433 | The most basic usage of |
michael@0 | 434 | \fBpk12util\fR |
michael@0 | 435 | for importing a certificate or key is the PKCS#12 input file (\fB\-i\fR) and some way to specify the security database being accessed (either |
michael@0 | 436 | \fB\-d\fR |
michael@0 | 437 | for a directory or |
michael@0 | 438 | \fB\-h\fR |
michael@0 | 439 | for a token)\&. |
michael@0 | 440 | .PP |
michael@0 | 441 | pk12util \-i p12File [\-h tokenname] [\-v] [\-d [sql:]directory] [\-P dbprefix] [\-k slotPasswordFile|\-K slotPassword] [\-w p12filePasswordFile|\-W p12filePassword] |
michael@0 | 442 | .PP |
michael@0 | 443 | For example: |
michael@0 | 444 | .PP |
michael@0 | 445 | |
michael@0 | 446 | .sp |
michael@0 | 447 | .if n \{\ |
michael@0 | 448 | .RS 4 |
michael@0 | 449 | .\} |
michael@0 | 450 | .nf |
michael@0 | 451 | # pk12util \-i /tmp/cert\-files/users\&.p12 \-d sql:/home/my/sharednssdb |
michael@0 | 452 | |
michael@0 | 453 | Enter a password which will be used to encrypt your keys\&. |
michael@0 | 454 | The password should be at least 8 characters long, |
michael@0 | 455 | and should contain at least one non\-alphabetic character\&. |
michael@0 | 456 | |
michael@0 | 457 | Enter new password: |
michael@0 | 458 | Re\-enter password: |
michael@0 | 459 | Enter password for PKCS12 file: |
michael@0 | 460 | pk12util: PKCS12 IMPORT SUCCESSFUL |
michael@0 | 461 | .fi |
michael@0 | 462 | .if n \{\ |
michael@0 | 463 | .RE |
michael@0 | 464 | .\} |
michael@0 | 465 | .PP |
michael@0 | 466 | \fBExporting Keys and Certificates\fR |
michael@0 | 467 | .PP |
michael@0 | 468 | Using the |
michael@0 | 469 | \fBpk12util\fR |
michael@0 | 470 | command to export certificates and keys requires both the name of the certificate to extract from the database (\fB\-n\fR) and the PKCS#12\-formatted output file to write to\&. There are optional parameters that can be used to encrypt the file to protect the certificate material\&. |
michael@0 | 471 | .PP |
michael@0 | 472 | pk12util \-o p12File \-n certname [\-c keyCipher] [\-C certCipher] [\-m|\-\-key_len keyLen] [\-n|\-\-cert_key_len certKeyLen] [\-d [sql:]directory] [\-P dbprefix] [\-k slotPasswordFile|\-K slotPassword] [\-w p12filePasswordFile|\-W p12filePassword] |
michael@0 | 473 | .PP |
michael@0 | 474 | For example: |
michael@0 | 475 | .sp |
michael@0 | 476 | .if n \{\ |
michael@0 | 477 | .RS 4 |
michael@0 | 478 | .\} |
michael@0 | 479 | .nf |
michael@0 | 480 | # pk12util \-o certs\&.p12 \-n Server\-Cert \-d sql:/home/my/sharednssdb |
michael@0 | 481 | Enter password for PKCS12 file: |
michael@0 | 482 | Re\-enter password: |
michael@0 | 483 | .fi |
michael@0 | 484 | .if n \{\ |
michael@0 | 485 | .RE |
michael@0 | 486 | .\} |
michael@0 | 487 | .PP |
michael@0 | 488 | \fBListing Keys and Certificates\fR |
michael@0 | 489 | .PP |
michael@0 | 490 | The information in a |
michael@0 | 491 | \&.p12 |
michael@0 | 492 | file are not human\-readable\&. The certificates and keys in the file can be printed (listed) in a human\-readable pretty\-print format that shows information for every certificate and any public keys in the |
michael@0 | 493 | \&.p12 |
michael@0 | 494 | file\&. |
michael@0 | 495 | .PP |
michael@0 | 496 | pk12util \-l p12File [\-h tokenname] [\-r] [\-d [sql:]directory] [\-P dbprefix] [\-k slotPasswordFile|\-K slotPassword] [\-w p12filePasswordFile|\-W p12filePassword] |
michael@0 | 497 | .PP |
michael@0 | 498 | For example, this prints the default ASCII output: |
michael@0 | 499 | .sp |
michael@0 | 500 | .if n \{\ |
michael@0 | 501 | .RS 4 |
michael@0 | 502 | .\} |
michael@0 | 503 | .nf |
michael@0 | 504 | # pk12util \-l certs\&.p12 |
michael@0 | 505 | |
michael@0 | 506 | Enter password for PKCS12 file: |
michael@0 | 507 | Key(shrouded): |
michael@0 | 508 | Friendly Name: Thawte Freemail Member\*(Aqs Thawte Consulting (Pty) Ltd\&. ID |
michael@0 | 509 | |
michael@0 | 510 | Encryption algorithm: PKCS #12 V2 PBE With SHA\-1 And 3KEY Triple DES\-CBC |
michael@0 | 511 | Parameters: |
michael@0 | 512 | Salt: |
michael@0 | 513 | 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f |
michael@0 | 514 | Iteration Count: 1 (0x1) |
michael@0 | 515 | Certificate: |
michael@0 | 516 | Data: |
michael@0 | 517 | Version: 3 (0x2) |
michael@0 | 518 | Serial Number: 13 (0xd) |
michael@0 | 519 | Signature Algorithm: PKCS #1 SHA\-1 With RSA Encryption |
michael@0 | 520 | Issuer: "E=personal\-freemail@thawte\&.com,CN=Thawte Personal Freemail C |
michael@0 | 521 | A,OU=Certification Services Division,O=Thawte Consulting,L=Cape T |
michael@0 | 522 | own,ST=Western Cape,C=ZA" |
michael@0 | 523 | |
michael@0 | 524 | .fi |
michael@0 | 525 | .if n \{\ |
michael@0 | 526 | .RE |
michael@0 | 527 | .\} |
michael@0 | 528 | .PP |
michael@0 | 529 | Alternatively, the |
michael@0 | 530 | \fB\-r\fR |
michael@0 | 531 | prints the certificates and then exports them into separate DER binary files\&. This allows the certificates to be fed to another application that supports |
michael@0 | 532 | \&.p12 |
michael@0 | 533 | files\&. Each certificate is written to a sequentially\-number file, beginning with |
michael@0 | 534 | file0001\&.der |
michael@0 | 535 | and continuing through |
michael@0 | 536 | file000N\&.der, incrementing the number for every certificate: |
michael@0 | 537 | .sp |
michael@0 | 538 | .if n \{\ |
michael@0 | 539 | .RS 4 |
michael@0 | 540 | .\} |
michael@0 | 541 | .nf |
michael@0 | 542 | pk12util \-l test\&.p12 \-r |
michael@0 | 543 | Enter password for PKCS12 file: |
michael@0 | 544 | Key(shrouded): |
michael@0 | 545 | Friendly Name: Thawte Freemail Member\*(Aqs Thawte Consulting (Pty) Ltd\&. ID |
michael@0 | 546 | |
michael@0 | 547 | Encryption algorithm: PKCS #12 V2 PBE With SHA\-1 And 3KEY Triple DES\-CBC |
michael@0 | 548 | Parameters: |
michael@0 | 549 | Salt: |
michael@0 | 550 | 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f |
michael@0 | 551 | Iteration Count: 1 (0x1) |
michael@0 | 552 | Certificate Friendly Name: Thawte Personal Freemail Issuing CA \- Thawte Consulting |
michael@0 | 553 | |
michael@0 | 554 | Certificate Friendly Name: Thawte Freemail Member\*(Aqs Thawte Consulting (Pty) Ltd\&. ID |
michael@0 | 555 | |
michael@0 | 556 | .fi |
michael@0 | 557 | .if n \{\ |
michael@0 | 558 | .RE |
michael@0 | 559 | .\} |
michael@0 | 560 | .SH "PASSWORD ENCRYPTION" |
michael@0 | 561 | .PP |
michael@0 | 562 | PKCS#12 provides for not only the protection of the private keys but also the certificate and meta\-data associated with the keys\&. Password\-based encryption is used to protect private keys on export to a PKCS#12 file and, optionally, the entire package\&. If no algorithm is specified, the tool defaults to using |
michael@0 | 563 | \fBPKCS12 V2 PBE with SHA1 and 3KEY Triple DES\-cbc\fR |
michael@0 | 564 | for private key encryption\&. |
michael@0 | 565 | \fBPKCS12 V2 PBE with SHA1 and 40 Bit RC4\fR |
michael@0 | 566 | is the default for the overall package encryption when not in FIPS mode\&. When in FIPS mode, there is no package encryption\&. |
michael@0 | 567 | .PP |
michael@0 | 568 | The private key is always protected with strong encryption by default\&. |
michael@0 | 569 | .PP |
michael@0 | 570 | Several types of ciphers are supported\&. |
michael@0 | 571 | .PP |
michael@0 | 572 | Symmetric CBC ciphers for PKCS#5 V2 |
michael@0 | 573 | .RS 4 |
michael@0 | 574 | .sp |
michael@0 | 575 | .RS 4 |
michael@0 | 576 | .ie n \{\ |
michael@0 | 577 | \h'-04'\(bu\h'+03'\c |
michael@0 | 578 | .\} |
michael@0 | 579 | .el \{\ |
michael@0 | 580 | .sp -1 |
michael@0 | 581 | .IP \(bu 2.3 |
michael@0 | 582 | .\} |
michael@0 | 583 | DES\-CBC |
michael@0 | 584 | .RE |
michael@0 | 585 | .sp |
michael@0 | 586 | .RS 4 |
michael@0 | 587 | .ie n \{\ |
michael@0 | 588 | \h'-04'\(bu\h'+03'\c |
michael@0 | 589 | .\} |
michael@0 | 590 | .el \{\ |
michael@0 | 591 | .sp -1 |
michael@0 | 592 | .IP \(bu 2.3 |
michael@0 | 593 | .\} |
michael@0 | 594 | RC2\-CBC |
michael@0 | 595 | .RE |
michael@0 | 596 | .sp |
michael@0 | 597 | .RS 4 |
michael@0 | 598 | .ie n \{\ |
michael@0 | 599 | \h'-04'\(bu\h'+03'\c |
michael@0 | 600 | .\} |
michael@0 | 601 | .el \{\ |
michael@0 | 602 | .sp -1 |
michael@0 | 603 | .IP \(bu 2.3 |
michael@0 | 604 | .\} |
michael@0 | 605 | RC5\-CBCPad |
michael@0 | 606 | .RE |
michael@0 | 607 | .sp |
michael@0 | 608 | .RS 4 |
michael@0 | 609 | .ie n \{\ |
michael@0 | 610 | \h'-04'\(bu\h'+03'\c |
michael@0 | 611 | .\} |
michael@0 | 612 | .el \{\ |
michael@0 | 613 | .sp -1 |
michael@0 | 614 | .IP \(bu 2.3 |
michael@0 | 615 | .\} |
michael@0 | 616 | DES\-EDE3\-CBC (the default for key encryption) |
michael@0 | 617 | .RE |
michael@0 | 618 | .sp |
michael@0 | 619 | .RS 4 |
michael@0 | 620 | .ie n \{\ |
michael@0 | 621 | \h'-04'\(bu\h'+03'\c |
michael@0 | 622 | .\} |
michael@0 | 623 | .el \{\ |
michael@0 | 624 | .sp -1 |
michael@0 | 625 | .IP \(bu 2.3 |
michael@0 | 626 | .\} |
michael@0 | 627 | AES\-128\-CBC |
michael@0 | 628 | .RE |
michael@0 | 629 | .sp |
michael@0 | 630 | .RS 4 |
michael@0 | 631 | .ie n \{\ |
michael@0 | 632 | \h'-04'\(bu\h'+03'\c |
michael@0 | 633 | .\} |
michael@0 | 634 | .el \{\ |
michael@0 | 635 | .sp -1 |
michael@0 | 636 | .IP \(bu 2.3 |
michael@0 | 637 | .\} |
michael@0 | 638 | AES\-192\-CBC |
michael@0 | 639 | .RE |
michael@0 | 640 | .sp |
michael@0 | 641 | .RS 4 |
michael@0 | 642 | .ie n \{\ |
michael@0 | 643 | \h'-04'\(bu\h'+03'\c |
michael@0 | 644 | .\} |
michael@0 | 645 | .el \{\ |
michael@0 | 646 | .sp -1 |
michael@0 | 647 | .IP \(bu 2.3 |
michael@0 | 648 | .\} |
michael@0 | 649 | AES\-256\-CBC |
michael@0 | 650 | .RE |
michael@0 | 651 | .sp |
michael@0 | 652 | .RS 4 |
michael@0 | 653 | .ie n \{\ |
michael@0 | 654 | \h'-04'\(bu\h'+03'\c |
michael@0 | 655 | .\} |
michael@0 | 656 | .el \{\ |
michael@0 | 657 | .sp -1 |
michael@0 | 658 | .IP \(bu 2.3 |
michael@0 | 659 | .\} |
michael@0 | 660 | CAMELLIA\-128\-CBC |
michael@0 | 661 | .RE |
michael@0 | 662 | .sp |
michael@0 | 663 | .RS 4 |
michael@0 | 664 | .ie n \{\ |
michael@0 | 665 | \h'-04'\(bu\h'+03'\c |
michael@0 | 666 | .\} |
michael@0 | 667 | .el \{\ |
michael@0 | 668 | .sp -1 |
michael@0 | 669 | .IP \(bu 2.3 |
michael@0 | 670 | .\} |
michael@0 | 671 | CAMELLIA\-192\-CBC |
michael@0 | 672 | .RE |
michael@0 | 673 | .sp |
michael@0 | 674 | .RS 4 |
michael@0 | 675 | .ie n \{\ |
michael@0 | 676 | \h'-04'\(bu\h'+03'\c |
michael@0 | 677 | .\} |
michael@0 | 678 | .el \{\ |
michael@0 | 679 | .sp -1 |
michael@0 | 680 | .IP \(bu 2.3 |
michael@0 | 681 | .\} |
michael@0 | 682 | CAMELLIA\-256\-CBC |
michael@0 | 683 | .RE |
michael@0 | 684 | .RE |
michael@0 | 685 | .PP |
michael@0 | 686 | PKCS#12 PBE ciphers |
michael@0 | 687 | .RS 4 |
michael@0 | 688 | .sp |
michael@0 | 689 | .RS 4 |
michael@0 | 690 | .ie n \{\ |
michael@0 | 691 | \h'-04'\(bu\h'+03'\c |
michael@0 | 692 | .\} |
michael@0 | 693 | .el \{\ |
michael@0 | 694 | .sp -1 |
michael@0 | 695 | .IP \(bu 2.3 |
michael@0 | 696 | .\} |
michael@0 | 697 | PKCS #12 PBE with Sha1 and 128 Bit RC4 |
michael@0 | 698 | .RE |
michael@0 | 699 | .sp |
michael@0 | 700 | .RS 4 |
michael@0 | 701 | .ie n \{\ |
michael@0 | 702 | \h'-04'\(bu\h'+03'\c |
michael@0 | 703 | .\} |
michael@0 | 704 | .el \{\ |
michael@0 | 705 | .sp -1 |
michael@0 | 706 | .IP \(bu 2.3 |
michael@0 | 707 | .\} |
michael@0 | 708 | PKCS #12 PBE with Sha1 and 40 Bit RC4 |
michael@0 | 709 | .RE |
michael@0 | 710 | .sp |
michael@0 | 711 | .RS 4 |
michael@0 | 712 | .ie n \{\ |
michael@0 | 713 | \h'-04'\(bu\h'+03'\c |
michael@0 | 714 | .\} |
michael@0 | 715 | .el \{\ |
michael@0 | 716 | .sp -1 |
michael@0 | 717 | .IP \(bu 2.3 |
michael@0 | 718 | .\} |
michael@0 | 719 | PKCS #12 PBE with Sha1 and Triple DES CBC |
michael@0 | 720 | .RE |
michael@0 | 721 | .sp |
michael@0 | 722 | .RS 4 |
michael@0 | 723 | .ie n \{\ |
michael@0 | 724 | \h'-04'\(bu\h'+03'\c |
michael@0 | 725 | .\} |
michael@0 | 726 | .el \{\ |
michael@0 | 727 | .sp -1 |
michael@0 | 728 | .IP \(bu 2.3 |
michael@0 | 729 | .\} |
michael@0 | 730 | PKCS #12 PBE with Sha1 and 128 Bit RC2 CBC |
michael@0 | 731 | .RE |
michael@0 | 732 | .sp |
michael@0 | 733 | .RS 4 |
michael@0 | 734 | .ie n \{\ |
michael@0 | 735 | \h'-04'\(bu\h'+03'\c |
michael@0 | 736 | .\} |
michael@0 | 737 | .el \{\ |
michael@0 | 738 | .sp -1 |
michael@0 | 739 | .IP \(bu 2.3 |
michael@0 | 740 | .\} |
michael@0 | 741 | PKCS #12 PBE with Sha1 and 40 Bit RC2 CBC |
michael@0 | 742 | .RE |
michael@0 | 743 | .sp |
michael@0 | 744 | .RS 4 |
michael@0 | 745 | .ie n \{\ |
michael@0 | 746 | \h'-04'\(bu\h'+03'\c |
michael@0 | 747 | .\} |
michael@0 | 748 | .el \{\ |
michael@0 | 749 | .sp -1 |
michael@0 | 750 | .IP \(bu 2.3 |
michael@0 | 751 | .\} |
michael@0 | 752 | PKCS12 V2 PBE with SHA1 and 128 Bit RC4 |
michael@0 | 753 | .RE |
michael@0 | 754 | .sp |
michael@0 | 755 | .RS 4 |
michael@0 | 756 | .ie n \{\ |
michael@0 | 757 | \h'-04'\(bu\h'+03'\c |
michael@0 | 758 | .\} |
michael@0 | 759 | .el \{\ |
michael@0 | 760 | .sp -1 |
michael@0 | 761 | .IP \(bu 2.3 |
michael@0 | 762 | .\} |
michael@0 | 763 | PKCS12 V2 PBE with SHA1 and 40 Bit RC4 (the default for non\-FIPS mode) |
michael@0 | 764 | .RE |
michael@0 | 765 | .sp |
michael@0 | 766 | .RS 4 |
michael@0 | 767 | .ie n \{\ |
michael@0 | 768 | \h'-04'\(bu\h'+03'\c |
michael@0 | 769 | .\} |
michael@0 | 770 | .el \{\ |
michael@0 | 771 | .sp -1 |
michael@0 | 772 | .IP \(bu 2.3 |
michael@0 | 773 | .\} |
michael@0 | 774 | PKCS12 V2 PBE with SHA1 and 3KEY Triple DES\-cbc |
michael@0 | 775 | .RE |
michael@0 | 776 | .sp |
michael@0 | 777 | .RS 4 |
michael@0 | 778 | .ie n \{\ |
michael@0 | 779 | \h'-04'\(bu\h'+03'\c |
michael@0 | 780 | .\} |
michael@0 | 781 | .el \{\ |
michael@0 | 782 | .sp -1 |
michael@0 | 783 | .IP \(bu 2.3 |
michael@0 | 784 | .\} |
michael@0 | 785 | PKCS12 V2 PBE with SHA1 and 2KEY Triple DES\-cbc |
michael@0 | 786 | .RE |
michael@0 | 787 | .sp |
michael@0 | 788 | .RS 4 |
michael@0 | 789 | .ie n \{\ |
michael@0 | 790 | \h'-04'\(bu\h'+03'\c |
michael@0 | 791 | .\} |
michael@0 | 792 | .el \{\ |
michael@0 | 793 | .sp -1 |
michael@0 | 794 | .IP \(bu 2.3 |
michael@0 | 795 | .\} |
michael@0 | 796 | PKCS12 V2 PBE with SHA1 and 128 Bit RC2 CBC |
michael@0 | 797 | .RE |
michael@0 | 798 | .sp |
michael@0 | 799 | .RS 4 |
michael@0 | 800 | .ie n \{\ |
michael@0 | 801 | \h'-04'\(bu\h'+03'\c |
michael@0 | 802 | .\} |
michael@0 | 803 | .el \{\ |
michael@0 | 804 | .sp -1 |
michael@0 | 805 | .IP \(bu 2.3 |
michael@0 | 806 | .\} |
michael@0 | 807 | PKCS12 V2 PBE with SHA1 and 40 Bit RC2 CBC |
michael@0 | 808 | .RE |
michael@0 | 809 | .RE |
michael@0 | 810 | .PP |
michael@0 | 811 | PKCS#5 PBE ciphers |
michael@0 | 812 | .RS 4 |
michael@0 | 813 | .sp |
michael@0 | 814 | .RS 4 |
michael@0 | 815 | .ie n \{\ |
michael@0 | 816 | \h'-04'\(bu\h'+03'\c |
michael@0 | 817 | .\} |
michael@0 | 818 | .el \{\ |
michael@0 | 819 | .sp -1 |
michael@0 | 820 | .IP \(bu 2.3 |
michael@0 | 821 | .\} |
michael@0 | 822 | PKCS #5 Password Based Encryption with MD2 and DES CBC |
michael@0 | 823 | .RE |
michael@0 | 824 | .sp |
michael@0 | 825 | .RS 4 |
michael@0 | 826 | .ie n \{\ |
michael@0 | 827 | \h'-04'\(bu\h'+03'\c |
michael@0 | 828 | .\} |
michael@0 | 829 | .el \{\ |
michael@0 | 830 | .sp -1 |
michael@0 | 831 | .IP \(bu 2.3 |
michael@0 | 832 | .\} |
michael@0 | 833 | PKCS #5 Password Based Encryption with MD5 and DES CBC |
michael@0 | 834 | .RE |
michael@0 | 835 | .sp |
michael@0 | 836 | .RS 4 |
michael@0 | 837 | .ie n \{\ |
michael@0 | 838 | \h'-04'\(bu\h'+03'\c |
michael@0 | 839 | .\} |
michael@0 | 840 | .el \{\ |
michael@0 | 841 | .sp -1 |
michael@0 | 842 | .IP \(bu 2.3 |
michael@0 | 843 | .\} |
michael@0 | 844 | PKCS #5 Password Based Encryption with SHA1 and DES CBC |
michael@0 | 845 | .RE |
michael@0 | 846 | .RE |
michael@0 | 847 | .PP |
michael@0 | 848 | With PKCS#12, the crypto provider may be the soft token module or an external hardware module\&. If the cryptographic module does not support the requested algorithm, then the next best fit will be selected (usually the default)\&. If no suitable replacement for the desired algorithm can be found, the tool returns the error |
michael@0 | 849 | \fIno security module can perform the requested operation\fR\&. |
michael@0 | 850 | .SH "NSS DATABASE TYPES" |
michael@0 | 851 | .PP |
michael@0 | 852 | NSS originally used BerkeleyDB databases to store security information\&. The last versions of these |
michael@0 | 853 | \fIlegacy\fR |
michael@0 | 854 | databases are: |
michael@0 | 855 | .sp |
michael@0 | 856 | .RS 4 |
michael@0 | 857 | .ie n \{\ |
michael@0 | 858 | \h'-04'\(bu\h'+03'\c |
michael@0 | 859 | .\} |
michael@0 | 860 | .el \{\ |
michael@0 | 861 | .sp -1 |
michael@0 | 862 | .IP \(bu 2.3 |
michael@0 | 863 | .\} |
michael@0 | 864 | cert8\&.db for certificates |
michael@0 | 865 | .RE |
michael@0 | 866 | .sp |
michael@0 | 867 | .RS 4 |
michael@0 | 868 | .ie n \{\ |
michael@0 | 869 | \h'-04'\(bu\h'+03'\c |
michael@0 | 870 | .\} |
michael@0 | 871 | .el \{\ |
michael@0 | 872 | .sp -1 |
michael@0 | 873 | .IP \(bu 2.3 |
michael@0 | 874 | .\} |
michael@0 | 875 | key3\&.db for keys |
michael@0 | 876 | .RE |
michael@0 | 877 | .sp |
michael@0 | 878 | .RS 4 |
michael@0 | 879 | .ie n \{\ |
michael@0 | 880 | \h'-04'\(bu\h'+03'\c |
michael@0 | 881 | .\} |
michael@0 | 882 | .el \{\ |
michael@0 | 883 | .sp -1 |
michael@0 | 884 | .IP \(bu 2.3 |
michael@0 | 885 | .\} |
michael@0 | 886 | secmod\&.db for PKCS #11 module information |
michael@0 | 887 | .RE |
michael@0 | 888 | .PP |
michael@0 | 889 | 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 | 890 | .PP |
michael@0 | 891 | 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 | 892 | .sp |
michael@0 | 893 | .RS 4 |
michael@0 | 894 | .ie n \{\ |
michael@0 | 895 | \h'-04'\(bu\h'+03'\c |
michael@0 | 896 | .\} |
michael@0 | 897 | .el \{\ |
michael@0 | 898 | .sp -1 |
michael@0 | 899 | .IP \(bu 2.3 |
michael@0 | 900 | .\} |
michael@0 | 901 | cert9\&.db for certificates |
michael@0 | 902 | .RE |
michael@0 | 903 | .sp |
michael@0 | 904 | .RS 4 |
michael@0 | 905 | .ie n \{\ |
michael@0 | 906 | \h'-04'\(bu\h'+03'\c |
michael@0 | 907 | .\} |
michael@0 | 908 | .el \{\ |
michael@0 | 909 | .sp -1 |
michael@0 | 910 | .IP \(bu 2.3 |
michael@0 | 911 | .\} |
michael@0 | 912 | key4\&.db for keys |
michael@0 | 913 | .RE |
michael@0 | 914 | .sp |
michael@0 | 915 | .RS 4 |
michael@0 | 916 | .ie n \{\ |
michael@0 | 917 | \h'-04'\(bu\h'+03'\c |
michael@0 | 918 | .\} |
michael@0 | 919 | .el \{\ |
michael@0 | 920 | .sp -1 |
michael@0 | 921 | .IP \(bu 2.3 |
michael@0 | 922 | .\} |
michael@0 | 923 | pkcs11\&.txt, which is listing of all of the PKCS #11 modules contained in a new subdirectory in the security databases directory |
michael@0 | 924 | .RE |
michael@0 | 925 | .PP |
michael@0 | 926 | Because the SQLite databases are designed to be shared, these are the |
michael@0 | 927 | \fIshared\fR |
michael@0 | 928 | database type\&. The shared database type is preferred; the legacy format is included for backward compatibility\&. |
michael@0 | 929 | .PP |
michael@0 | 930 | By default, the tools (\fBcertutil\fR, |
michael@0 | 931 | \fBpk12util\fR, |
michael@0 | 932 | \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 | 933 | \fBsql:\fR |
michael@0 | 934 | prefix with the given security directory\&. For example: |
michael@0 | 935 | .sp |
michael@0 | 936 | .if n \{\ |
michael@0 | 937 | .RS 4 |
michael@0 | 938 | .\} |
michael@0 | 939 | .nf |
michael@0 | 940 | # pk12util \-i /tmp/cert\-files/users\&.p12 \-d sql:/home/my/sharednssdb |
michael@0 | 941 | .fi |
michael@0 | 942 | .if n \{\ |
michael@0 | 943 | .RE |
michael@0 | 944 | .\} |
michael@0 | 945 | .PP |
michael@0 | 946 | To set the shared database type as the default type for the tools, set the |
michael@0 | 947 | \fBNSS_DEFAULT_DB_TYPE\fR |
michael@0 | 948 | environment variable to |
michael@0 | 949 | \fBsql\fR: |
michael@0 | 950 | .sp |
michael@0 | 951 | .if n \{\ |
michael@0 | 952 | .RS 4 |
michael@0 | 953 | .\} |
michael@0 | 954 | .nf |
michael@0 | 955 | export NSS_DEFAULT_DB_TYPE="sql" |
michael@0 | 956 | .fi |
michael@0 | 957 | .if n \{\ |
michael@0 | 958 | .RE |
michael@0 | 959 | .\} |
michael@0 | 960 | .PP |
michael@0 | 961 | This line can be set added to the |
michael@0 | 962 | ~/\&.bashrc |
michael@0 | 963 | file to make the change permanent\&. |
michael@0 | 964 | .PP |
michael@0 | 965 | 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 | 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 | https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto |
michael@0 | 976 | .RE |
michael@0 | 977 | .PP |
michael@0 | 978 | For an engineering draft on the changes in the shared NSS databases, see the NSS project wiki: |
michael@0 | 979 | .sp |
michael@0 | 980 | .RS 4 |
michael@0 | 981 | .ie n \{\ |
michael@0 | 982 | \h'-04'\(bu\h'+03'\c |
michael@0 | 983 | .\} |
michael@0 | 984 | .el \{\ |
michael@0 | 985 | .sp -1 |
michael@0 | 986 | .IP \(bu 2.3 |
michael@0 | 987 | .\} |
michael@0 | 988 | https://wiki\&.mozilla\&.org/NSS_Shared_DB |
michael@0 | 989 | .RE |
michael@0 | 990 | .SH "SEE ALSO" |
michael@0 | 991 | .PP |
michael@0 | 992 | certutil (1) |
michael@0 | 993 | .PP |
michael@0 | 994 | modutil (1) |
michael@0 | 995 | .PP |
michael@0 | 996 | The NSS wiki has information on the new database design and how to configure applications to use it\&. |
michael@0 | 997 | .sp |
michael@0 | 998 | .RS 4 |
michael@0 | 999 | .ie n \{\ |
michael@0 | 1000 | \h'-04'\(bu\h'+03'\c |
michael@0 | 1001 | .\} |
michael@0 | 1002 | .el \{\ |
michael@0 | 1003 | .sp -1 |
michael@0 | 1004 | .IP \(bu 2.3 |
michael@0 | 1005 | .\} |
michael@0 | 1006 | https://wiki\&.mozilla\&.org/NSS_Shared_DB_Howto |
michael@0 | 1007 | .RE |
michael@0 | 1008 | .sp |
michael@0 | 1009 | .RS 4 |
michael@0 | 1010 | .ie n \{\ |
michael@0 | 1011 | \h'-04'\(bu\h'+03'\c |
michael@0 | 1012 | .\} |
michael@0 | 1013 | .el \{\ |
michael@0 | 1014 | .sp -1 |
michael@0 | 1015 | .IP \(bu 2.3 |
michael@0 | 1016 | .\} |
michael@0 | 1017 | https://wiki\&.mozilla\&.org/NSS_Shared_DB |
michael@0 | 1018 | .RE |
michael@0 | 1019 | .SH "ADDITIONAL RESOURCES" |
michael@0 | 1020 | .PP |
michael@0 | 1021 | For information about NSS and other tools related to NSS (like JSS), check out the NSS project wiki at |
michael@0 | 1022 | \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 | 1023 | .PP |
michael@0 | 1024 | Mailing lists: https://lists\&.mozilla\&.org/listinfo/dev\-tech\-crypto |
michael@0 | 1025 | .PP |
michael@0 | 1026 | IRC: Freenode at #dogtag\-pki |
michael@0 | 1027 | .SH "AUTHORS" |
michael@0 | 1028 | .PP |
michael@0 | 1029 | The NSS tools were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google\&. |
michael@0 | 1030 | .PP |
michael@0 | 1031 | Authors: Elio Maldonado <emaldona@redhat\&.com>, Deon Lackey <dlackey@redhat\&.com>\&. |
michael@0 | 1032 | .SH "LICENSE" |
michael@0 | 1033 | .PP |
michael@0 | 1034 | 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 | 1035 | .SH "NOTES" |
michael@0 | 1036 | .IP " 1." 4 |
michael@0 | 1037 | Mozilla NSS bug 836477 |
michael@0 | 1038 | .RS 4 |
michael@0 | 1039 | \%https://bugzilla.mozilla.org/show_bug.cgi?id=836477 |
michael@0 | 1040 | .RE |