summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* Release notes for NSS 3.73.1Benjamin Beurdouche2022-01-061-0/+57
|
* Release notes for NSS 3.72.1Benjamin Beurdouche2022-01-061-0/+57
|
* Release notes for NSS 3.68.2 (ESR)Benjamin Beurdouche2022-01-061-0/+57
|
* Release notes for NSS 3.73Benjamin Beurdouche2022-01-061-0/+65
|
* Release notes for NSS 3.68.1Benjamin Beurdouche2022-01-061-0/+62
|
* Documentation: release notes for NSS 3.72Benjamin Beurdouche2021-10-282-15/+69
|
* Documentation: release notes for NSS 3.71Benjamin Beurdouche2021-10-281-0/+63
|
* Documentation: release notes for NSS 3.70Benjamin Beurdouche2021-09-042-12/+85
|
* Release notes for NSS 3.69.1Benjamin Beurdouche2021-08-311-0/+76
|
* Documentation: update for NSS 3.69 releaseMartin Thomson2021-08-092-13/+77
|
* Documentation: update and release notes for NSS 3.64 to 3.68Benjamin Beurdouche2021-07-2411-168/+862
|
* Display warning on the new NSS documentationBenjamin Beurdouche2021-07-221-0/+4
|
* Bug 1709817 - Import the NSS documentation from MDN in nss/doc. r=beurdoucheBenjamin Beurdouche2021-07-143-0/+446
| | | | Differential Revision: https://phabricator.services.mozilla.com/D119912
* Bug 1712184 NSS tools manpages need to be updated to reflect that sqlite is ↵Robert Relyea2021-05-2022-269/+368
| | | | | | | | | | | | | | | | | | | | | | | | the default database. This patch does 2 things: 1) update certutil.xml pk12util.xml modutil.xml and signver.xml to reflect the fact the the sql database is default. Many of these also has examples of specifying sql:dirname which is now the default. I did not replace them with dbm:dirname since we don't want to encourage regressing back. The one exception is in the paragraph explaining how to get to the old database format. 2) I ran make in the diretory to update the .1 and .html files generated from the .xml files. There are a number of old updates to the .xml files which haven't been picked up in their corresponding html or man page files. This updates are included in this patch. It is really only necessary to review the changes to the .xml files, the rest were reviewed when their patches were applied. bob Differential Revision: https://phabricator.services.mozilla.com/D115658
* Bug 1707130 NSS should use modern algorithms in PKCS#12 files by default r=mtRobert Relyea2021-05-042-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes: Bug 452464 pk12util -o fails when -C option specifies AES or Camellia ciphers Related: Bug 1694689 Firefox should use modern algorithms in PKCS#12 files by default Bug 452471 pk12util -o fails when -c option specifies pkcs12v2 PBE ciphers The base of this fix is was a simple 3 line fix in pkcs12.c, changing the initial setting of cipher and cert cipher. Overview for why this patch is larger than just 3 lines: 1. First issue was found in trying to change the mac hashing value. a. While the decrypt side knew how to handle SHA2 hashes, the equivalent code was not updated on the encrypt side. I refactored that code and placed the common function in p12local.c. Now p12e.c and p12d.c share common code to find the required function to produce the mac key. b. The prf hmac was hard coded to SHA1. I changed the code to pass the hmac matching the hashing algorithm for the mac. This required changes to p12e.c to calculate and pass the new hmac as well and adding new PK11_ExportEncryptedPrivateKey and PK11_ExportEncryptedPrivKey to take the PKCS #5 v2 parameters. I also corrected an error which prevented pkcs12 encoding of ciphers other than AES. 2. Once I've made my changes, I realized we didn't have a way of testing them. While we had code that verified that particular sets of parameters for pkcs12 worked together and could be listed and imported, we didn't have a way to verify what algorithms were actually generated by our tools. a. pk12util -l doesn't list the encryption used for the certs, so I updated pp to take a pkcs12 option. In doing so I had to update pp to handle indefinite encoding when decoding blocks. I also factored that decoding out in it's own function so the change only needed to be placed once. Finally I renabled a function which prints the output of an EncryptedPrivate key. This function was disabled long ago when the Encrypted Private key info was made private for NSS. It has since been exported, so these functions could easily be enabled (archeological note: I verified that this disabling was not a recent think I found I had done it back when I still have a netscape email address;). b. I updated tools.sh to us the new pp -t pkcs12 feature to verify that the key encryption, cert encryption, and hash functions matched what we expected when we exported a new key. I also updated tools.sh to handle the new hash variable option to pk12util. c. I discovered several tests commented out with comments that the don't work. I enabled those tests and discovered that they can now encrypt, but the can't decrypt because of pkcs12 policy. I updated the policy code, but I updated it to use the new NSS system wide policy mechanism. This enabled all the ciphers to work. There is still policy work to do. The pk12 policy currently only prevents ciphers from use in decrypting the certificates, not decrypting the keys and not encrypting. I left that for future work. 3. New options for pp and pk12util were added to the man pages for these tools. --------------------------------------------------------------------------- With that in mind, here's a file by file description of the patch: automation/abi-check/expected-report-libnss3.so.txt -Add new exported functions. (see lib/nss/nss.def) cmd/lib/basicutil.h: -Removed the HAVE_EPV_TEMPLATE ifdefs (NSS has exported the Encrypted Private Key data structure for a while now. cmd/lib/secutil.c: global: Updated several functions to take a const char * m (message) rather than a char * m global: Made the various PrintPKCS7 return an error code. global: Added a state variable to be passed around the various PKCS7 Print functions. It gives the proper context to interpret PKCS7 Data Content. PKCS 12 used PKCS7 to package the various PKCS12 Safes and Bags. -Updated SECU_StripTagAndLength to handle indefinite encoding, and to set the Error code. -Added SECU_ExtractDERAndStep to grab the next DER Tag, Length, and Data. -Updated secu_PrintRawStringQuotesOptional to remove the inline DER parsing and use SECU_ExtractDERAndStep(). -Updated SECU_PrintEncodedObjectID to return the SECOidTag just like SECU_PrintObjectID. -Renable SECU_PrintPrivateKey -Added secu_PrintPKCS12Attributes to print out the Attributes tied to a PKCS #12 Bag -Added secu_PrintPKCS12Bag to print out a PKCS #12 Bag -Added secu_PrintPKCS7Data, which uses the state to determine what it was printing out. -Added secu_PrintDERPKCS7ContentInfo which is identical to the global function SECU_PrintPKCS7ContentInfo except it takes a state variable. The latter function now calls the former. -Added secu_PrintPKCS12DigestInfo to print the Hash information of the Mac. DigestInfo is the name in the PKCS 12 spec. -Added secu_PrintPKCS12MacData to print the Mac portion of the PKCS 12 file. -Added SECU_PrintPKCS12 to print otu the pkcs12 file. cmd/lib/secutil.h -Added string for pkc12 for the command line of pp reenabled SECU_PrintPrivateKey -Added SECU_PrintPKCS12 for export. cmd/pk12util/pk12util.c -Added the -M option to specify a hash algorithm for the mac. updated P12U_ExportPKCS12Object: pass the hash algorithm to the PasswordIntegrity handler. -Added PKCS12U_FindTagFromString: generalized string to SECOidTag which only filters based on the oid having a matching PKCS #11 mechanism. updated PKCS12U_MapCipherFromString to call use PKCS12U_FindTagFromString to get the candidate tag before doing it's post processing to decide if the tag is really an encryption algorithm. -Added PKCS12U_MapHashFromString with is like MapCipherFromString except it verifies the resulting tag is a hash object. -Updated main to 1) change the default cipher, change the default certCipher, and process the new hash argument. NOTE: in the old code we did not encrypt the certs in FIPS mode. That's because the certs were encrypted with RC4 in the default pkcs12 file, which wasn't a FIPS algorithm. Since AES is, we can use it independent on whether or not we are in FIPS mode. cmd/pp/pp.c -Added the pkcs12 option which calls SECU_PrintPKCS12 from secutil.c lib/nss/nss.def -Add exports to the new PK11_ExportEncryptedPrivKeyInfoV2 and PK11_ExportEncryptedPrivateKeyInfoV2 (V2 means PKCS 5 v2, not Version 2 of ExportEncrypted*Info). -Add export for the old HASH_GetHMACOidTagByHashOidTag which should have been exported long ago to avoid the proliferation of copies of this function in places like ssl. lib/pk11wrap/pk11akey.c -Add PK11_ExportEncryptedPrivKeyInfoV2 (which the old function now calls), which takes the 3 PKCS 5 v2 parameters. The underlying pkcs5 code can fill in missing tags if necessary, but supplying all three gives the caller full control of the underlying pkcs5 PBE used. -Add PK11_ExportEncryptedPrivateKeyInfoV2, same as the above function except it takes a cert which is used to look up the private key. It's the function that pkcs12 actually uses, but the former was exported for completeness. lib/pk11wrap/pk11pub.h -Added the new PK11_ExportEncryptedPriv*KeyInfoV2 functions. lib/pkcs12/p12d.c -Remove the switch statement and place it in p12local.c so that p12e.c can use the same function. lib/pkc12/p12e.c -Remove the unnecessary privAlg check so we can encode any mechanism we support. This only prevented encoding certificates in the pk12 file, not the keys. -add code to get the hmac used in the pbe prf from the integrity hash, which is under application control. -Do the same for key encryption, then use the new PK11_ExportEncryptedPrivateKeyInfo to pass that hash value. -Use the new sec_pkcs12_algtag_to_keygen_mech so there is only one switch statement to update rather than 2. -Update the hash data to old the length of the largest hash rather than the length of a SHA1 hash. lib/pkcs12/p12local.c - Add new function new sec_pkcs12_algtag_to_keygen_mech to factor out the common switch statement between p12e and p12d. lib/pkcs12/p12local.h -Export the new sec_pkcs12_algtag_to_keygen_mech lib/pkcs12/p12plcy.c -Map the old p12 policy functions to use the new NSS_GetAlgorithmPolicy. We keep the old table so that applications can change the policy with the old PKCS12 specific defines (so the old code keeps working). NOTE: policies now default to true rather than false. lib/util/secoidt.h -Add new NSS_USE_ALG_IN_PKCS12 used by pk11plcy.c NOTE: I have not updated the policy table in pk11wrap/pk11pars.c, so we can't yet control pkcs12 policy with the nss system policy table. That's a patch for another time. test/tools/tool.sh -global: Remove trailing spaces -global: DEFAULT is changed to 'default' -Update the PBE mechanism to exactly match the string in secoid.c. PKCS #12 does case independent compares, so case doesn't matter there, but now I'm comparing to the output of pp, and I didn't want to spend the time to figure out case independent compares in bash. -Add our defauts and shell variables at the top so there are easy to change in the future. export_with_*** have all been colapsed into a single export_p12_file which handles taking 'default' and turning off that argument. -Add for loops for the hash functions. -Restore the camellia ciphers back now that they work. -Restore the pkcs12V2pbe back now that they work. -Collect various pbe types into single variables and use those variables in loops -Reduce the number of tests ran in optimized mode (which takes 60x the time to do a pbe then than debug mode based on a larger iterator). -Add verify_p12 which dumps out the p12 file and makes sure the expected CERT_ENCRYPTION, KEY_ENCRYPTION, and HASH are used. doc/pp.xml -Add pkcs12 option doc/pk12util.xml -Add -M option -Update synopsis with options in the description but not in the synopsis Differential Revision: https://phabricator.services.mozilla.com/D113699
* Bug 1546229 Add IPSEC IKE support to softoken.Robert Relyea2019-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://phabricator.services.mozilla.com/D28519 Patch notes: cmd/fipstest: Update fipstest to allow using old CAVS vectors in our all.sh. The various scripts have been moved to tests/fips/cavs_scripts. IKE functions were added to fipstest, and fipstest was updated to support verifying the output of ecdh and dh key agreement tests (kas). fipstest.c: NOTE: fipstest is the program NSS uses to process CAVS vectors from NIST. For historical reasons, it has known memory management issues. In general if there is a mistake, fipstest will likely crash. It has very little error checking. It has a very simplistic parser for the CAVS files. It requires the elements of the CAVS files to be in the correct order (most notably it requires the last element to always be in the last position. This is true of all the tests in fipstest, not just the new code. 1. when verifying ec_dh and dh, accept both CAVSHashZZ and HashZZ as the input hash. This allows verify not only to verify NIST CAVS vectors, but also the output of ec_dh and dh functional tests. 2. create ike functions modelled after the tls test functions. We test ike at the pkcs #11 level. There are three ike tests (driven by the three types of ike tests that NIST supplies): 2.1) ikev1. This generates the ike v1 keys from the provided input. It used ike_prf to generate SKEYID and ikev1_prf to generate SKEYID_d, SKEYID_a, and SKEYID_e. 2.2) ikev1_psk. This generates ike v1 keys from the provided input. It uses a pre-shared-secret-key. It also used ike_prf to generate SKEYID (though it uses it with bDataAsKey=false), and ikev1_prf to generate SKEYID_d, SKEYID_a, and SKEYID_e. 2.3) ikev2. This generates ike v2 keys from the provided input. It uses ike_prf to generate SKEYSEED and ike_prf_plus to generate the key material. It also does a rekey using ike_prf and bRekey = true. 3. Add parameters so the tls can be called. lib/softoken This is the main location where the new functionality is provided. fipstest.c Add the power up self test for ike. The actual test lives in sftkike.c. manifest.mn Add sftkike.c to the build. pkcs11.c Add AES XCBC MAC and IKE Mechanisms to the softoken mechanism table. pkcs11c.c sftk_MapCryptError() is now a 'global' within softoken and lives in pkcs11u.c. This was done so that sftkike.c can use it. sftk_InitCBCMac(). Update to handle AES XCBC., which is AES CBC MAC except 1) the underlying AES key is derived from the input key, and 2) the pad block is obscured using 2 new keys (k2, k3) also derived from the input key. sftk_MACFinal() handle the special pad processing for the XCBC case. sftk_MACUpdate() change the padding code to keep one full pad in the buffer. This won't affect normal MACs, but means that the last block in the Mac is always in the buffer so it can be processed in the XCBC case. NSC_DerviceKey() add the ike functions into the mechanism swtich table. The actual implementations are in sftkike.c pkcs11i.h Add the XCBC state information into the SessionContext structure. sftk_MapCryptError is now global, include it in the header. include the ike and aes_xcbc helper functions. pkcs11u.c sftk_MapCryptError() now lives in pkcs11 utilities. sftkike.c prf_* functions implement all the underlying prf specific stuff. It hides whether the prf is an hmac or aes_xcbc. If there are additional prfs, they can be implemented here without affecting the rest of the derivation code. The AES_XCBC code is aes specific. If we ever add another XCBC type operation, we would probably want to initialize some encryption functions in prf_setup and only handle the difference between hmac and xcbc in the other prf functions. sftk_aes_xcbc_get_keys - takes in input key and derives k1, k2, and k3. This function handles this derivation for both the prf_ functions in sftkike and the exported AES_XCBC Mac in pkcs11c.c sftk_xcbc_mac_pad - function to handle the correct padding method for the last block of an xcbc operation. Unlike sftk_aes_xcbc_get_keys, it is independent of the xcbc's underlying encryption method, though only AES_XCBC is defined at this time. sftk_ike_prf - common prf between ikev1 and ikev2 to generate SKEYID/SKEYSEED. See comments in code. sftk_ike1_prf - ikev1 prf to generate the session keys in ikev1 from SKEYID. See comments in code. sftk_ike_prf_plus - ike prf+ to generate the session keys in ikev2 from SKEYSEED. See comments in code. sftk_aes_xcbc_new_keys - used in pkcs11c.c to generate the 2 derived keys used in aes_xcbc. Loads k1 into the pkcs11 slot as a session key. prf_test - helper function to test our known test vectors for our FIPS powerup self tests. sftk_fips_IKE_PowerUpSelfTests - test to make sure our basic system is working correctly. softokn.gyp - add sftkike.c to gyp lib/util pkcs11n.h add defines and structures for IKE. Since they are not yet an official PKCS #11 mechanism, use CKM_NSS and CK_NSS names for them. pkcs11t.h add CKM_AES_XCBC* mechanisms. These are defined in the latest PKCS #11 spec. tests/fips The work in this directory hooks up the CAVS tests we run to do fips validation into our normal test suite. This lets us use the NIST generated samples for cavs_samples/* These are all vectors generated by the NIST CAVS tools (*.req) or the expected results generated by the last openssl or NSS runs and verified by the NIST CAVS tools (*.fax). These are the inputs to our fipstest. No need to detail review these. The are not explicitly included in this patch because they are too big for phabricator to handle. cavs_scripts/* See the read me in that directory. These scripts were originally in cmd/fipstest. I added ike.sh, and I updated the verify target of all the scripts so they they return 0 on success and 1 on failure. This allows us to use the tests in fips.sh fips.sh run the CAVS tests as part of the fips tests. This works to test our IKE support. Three of the cavs tests can take significant type (dsa and rsa takes several minutes, tdea is just over a minute). The code currently skips running those tests. You can run all the cavs tests by setting CAV_VECTORS=all
* Bug 1537927 - IPsec usage is too restrictive for existing deploymentsRobert Relyea2019-03-211-0/+35
| | | | | | try: -p linux64,linux64-fuzz -u gtest -t clang-format,scan-build Differential Revision: https://phabricator.services.mozilla.com/D24399
* Bug 1513909, add manual for nss-policy-check, r=rrelyeaDaiki Ueno2019-03-044-5/+106
|
* Bug 1413308, document PKCS #11 URI usage in tools manual, r=rrelyeaDaiki Ueno2018-11-169-16/+37
|
* Bug 291383, certutil: Allow -F to delete orphaned private key, r=kaieDaiki Ueno2018-07-203-14/+10
| | | | | | | | | | | | Summary: This change makes it possible to remove orphaned private key with the `-F` command. Similarly to `-R` (bug 430198), it reads a key ID from `-k`. Reviewers: kaie Reviewed By: kaie Bug #: 291383 Differential Revision: https://phabricator.services.mozilla.com/D2094
* Bug 1429393, Clarify certutil docs/help that -F deletes both cert and key, ↵Kai Engert2018-02-131-3/+3
| | | | not just the key, r=rrelyea
* Bug 1341302, certutil: document RSA-PSS options, r=hkario, r=kaieDaiki Ueno2017-10-273-29/+61
|
* Bug 1406891, Make pk12util documentation mention only working ciphers, ↵Daiki Ueno2017-10-093-277/+88
| | | | r=hkario, r=kaie
* Bug 1253912 - drop more than suite b support, r=mt,rrelyeaFranziskus Kiefer2016-08-033-42/+40
|
* Bug 1301375 - Clarify the meaning of the 'u' trust flag, r=kaieDaiki Ueno2016-09-083-39/+25
|
* bug 1301071, Fix mistake in certutil docs: C and T trust flags are mixed up, ↵NSS_3_27_BETA3Kai Engert2016-09-083-9/+9
| | | | r=rrelyea
* Bug 1142209 - Implement nickname renaming in certutil, update manpage, ↵Kai Engert2015-08-133-5/+25
| | | | r=emaldona
* bug 1129573 - increase the default RSA key size for certutil to 2048 bits r=kaieDavid Keeler2015-02-043-6/+6
|
* Bug 112029 - Remove obsolete tarball tag target from docs manpages Makefile, ↵Elio Maldonado2015-01-121-13/+0
| | | | r=rsleevi
* Bug 1058870 - Document certutil -Z signature hash option. r=emaldonaCykesiopka2015-01-083-4/+114
|
* Bug 1038526 - Update pp manpage to match changes introduced in nss-3.16.2 -Elio Maldonado2014-07-293-10/+34
| | | | r=kaie
* Bug 1038728 - Update the certutil manpage for the latest changes in certutilElio Maldonado2014-07-293-6/+143
| | | | from nss-3.16.2 - r=kaie
* Bug 1007126 - various flaws in the man pages, r=rrelyeaElio Maldonado2014-06-0530-545/+464
|
* Fix Bug 989558 - Fix certutil -g keysize description maximum key size, r=rrelyeaElio Maldonado2014-03-313-9/+9
|
* Fix Bug 977673 - prevent users from disabling the internal module, r=wtcElio Maldonado2014-03-261-1/+1
| | | | Hers from disabling the internal module, r=wtc: changed doc/modutil.xml
* Fix Bug 937677 - Incorrectly named options in certutil man page, r=kaieElio Maldonado2013-11-1218-33/+33
| | | | - Rename keyFlagsOn and keyFlagsOff as keyOpFlagsOn and keyOpFlagsOff, respectively.
* Fix Bug 932001 - certutil is missing the description of the --email option, ↵Elio Maldonado2013-11-0515-26/+26
| | | | | | r=kai - Update the pre-built html/man-page documentation
* Bug 933688, certutil should allow shell script or user to set empty password ↵Eric Wong2013-11-053-5/+20
| | | | non-interactively when creating certificate database using -N option, r=kaie
* Fix Bug 932001 - certutil is missing the description of the --email option, ↵Elio Maldonado2013-10-301-0/+5
| | | | r=kaie
* Bug 836477 - Complete the initial review of the docbook documentation for ↵Elio Maldonado2013-07-1924-318/+433
| | | | | | | NSS command line tools, r=kaie - Supply missing option descriptions for certutil, cmsutil, and crlutil - Regenerate the html and man pages files
* Bug 869608 - Remove the .cvsignore files, r=wtcNSS_3_15_BETA4Elio Maldonado2013-05-073-0/+1
| | | | | - Rename .cvsignore to .hgignore in nss/doc and nss/doc/html - Remove generated html/*.proc files as part of the clean target
* Bug 836477 - Complete the initial review of the docbook documentation for ↵Elio Maldonado2013-04-1811-45/+23
| | | | | | NSS command line tools - update authors and licence sections for all tools as was done on certutil, r=rrelyea
* Bug 836477 - Complete the initial review of the docbook documentation for ↵Elio Maldonado2013-04-181-95/+111
| | | | NSS command line tools - certutil, r=rrelyea
* Bug 845556, reorganize NSS directory layout, moving files, very large ↵Kai Engert2013-02-2840-0/+14043
changeset! r=wtc