summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1831983 - Add a constant time select function. r=mtHEADmasterJohn M. Schanck2023-05-179-0/+160
| | | | Differential Revision: https://phabricator.services.mozilla.com/D177803
* Bug 1774657 Updating an old dbm with lots of certs with keys to sql results ↵Robert Relyea2023-05-158-8/+68
| | | | | | | | | | | | | | in a database that is slow to access. This patch solves the problems in 3 ways: 1) The initial underlying issue is solved by not generating a trust record for user certs if they have default trust values (lib/softoken/legacydb/pcertdb.c). This will cause new databases created from old dbm databases to function normally. 2) Skip the integrity check if the record we are reading is already the default trust value (lib/softoken/sftkdb.c). This will increase the performance of reading sqlite databases created from the old dbm databases before patch 1 to perform reasonably. 3) Increase the cashe count. (lib/softoken/lowpbe.c). This affects applications which do multiple private key operations on the same private keys. Usually high speed operations would copy the keys to a session key for better performance, but sometimes that's not possible. This allows up to 20 RSA keys to be references by the application without a performance hit from the PBE checking integrity and/or decrypting the key entry. Differential Revision: https://phabricator.services.mozilla.com/D165221
* Bug 1830973 - output early build errors by default. r=nkulatovaJohn M. Schanck2023-05-091-3/+3
| | | | Differential Revision: https://phabricator.services.mozilla.com/D176951
* Release notes for NSS 3.89.1Dennis Jackson2023-05-052-29/+65
|
* Bug 1804505 - Update the technical constraints for KamuSM. ↵Dennis Jackson2023-05-051-10/+2
| | | | | | | | r=nss-reviewers,jschanck Depends on D177241 Differential Revision: https://phabricator.services.mozilla.com/D177242
* Bug 1822921 - Add BJCA Global Root CA1 and CA2 root certificates ↵Dennis Jackson2023-05-051-0/+283
| | | | | | r=nss-reviewers,jschanck Differential Revision: https://phabricator.services.mozilla.com/D177241
* Bug 1790763 - Enable default UBSan Checks. r=mtDennis Jackson2023-05-052-2/+3
| | | | | | The two exceptions will require a bit of work to remediate. Differential Revision: https://phabricator.services.mozilla.com/D167650
* Bug 1786018 - Add explicit handling of zero length records. r=mtDennis Jackson2023-05-052-17/+40
| | | | | | | | | This is based on the patch developed by Leander in D157183, but is a little more explicit. Co-Authored-By: Leander Schwarz Differential Revision: https://phabricator.services.mozilla.com/D176157
* Bug 1829391 - Tidy up DTLS ACK Error Handling Path. r=mtDennis Jackson2023-05-052-6/+13
| | | | Differential Revision: https://phabricator.services.mozilla.com/D176156
* Bug 1786018 - Refactor zero length record tests. r=mtDennis Jackson2023-05-051-33/+55
| | | | | | | This ensures we properly test the different DTLS / TLS versions and makes the expected behaviour explicit. Differential Revision: https://phabricator.services.mozilla.com/D176155
* Bug 1829112 - Fix compiler warning via correct assert. r=nkulatova.Dennis Jackson2023-05-051-4/+4
| | | | Differential Revision: https://phabricator.services.mozilla.com/D176056
* Bug 1755267 - run linux tests on nss-t/t-linux-xlarge-gcp. ↵Julien Cristau2023-05-031-1/+5
| | | | | | | | | | | | | | | r=nss-reviewers,bbeurdouche NSS tasks using LSAN seem to run into frequent failures due to ptrace(2) failing with EACCES (Permission Denied), apparently coming from the apparmor profile for docker on the VM. Until now Linux tests tasks were using the nss-{1,3}/linux-gcp pools, which use the same base image as gecko builders. This switches them to a new pool using the same base image as used by gecko's test tasks, where ptrace appears to work reliably. Differential Revision: https://phabricator.services.mozilla.com/D177037
* Bug 1806496 In FIPS mode, nss should reject RSASSA-PSS salt lengths larger ↵Robert Relyea2022-12-194-65/+93
| | | | | | | | | | | than the output size of the hash function used, or provide an indicator This patch adds a new mechanism specific check for PSS in fip_algorithms.h. The new check uses the hash mechanism provided in the pss mechanism list to look up the hash length. A static utility function in pkcs11c.c is moved to pkcs11u.c and made global so it can be reused in this code. We know that mechanism supplied in the parameters matches the hash because that check is enforces in pkcs11c.c for the combined hash and signed functions. Differential Revision: https://phabricator.services.mozilla.com/D165176
* Bug 1784163 - Fix reading raw negative numbers r=nss-reviewers,nkulatova,mtIaroslav Gridin2023-04-202-6/+22
| | | | | | set sign after adding digits Differential Revision: https://phabricator.services.mozilla.com/D154315
* Bug 1748237 - Repairing unreachable code in clang built with gyp r=jschanckNatalia Kulatova2023-04-171-6/+4
| | | | Differential Revision: https://phabricator.services.mozilla.com/D175684
* Bug 1783647 - Integrate Vale Curve25519 r=nss-reviewers,bbeurdoucheNatalia Kulatova2023-04-177-2/+218
| | | | Differential Revision: https://phabricator.services.mozilla.com/D153944
* Bug 1799468 - Removing unused flags for Hacl* r=bbeurdoucheAnna Weine2023-04-171-6/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D161464
* Bug 1748237: Adding a better error message. r=nss-reviewers,rrelyeaNatalia Kulatova2023-04-171-1/+10
| | | | Differential Revision: https://phabricator.services.mozilla.com/D135359
* Bug 1727555 - Update HACL* till 51a72a953a4ee6f91e63b2816ae5c4e62edf35d6 ↵Anna Weine2023-04-1762-1394/+4701
| | | | | | r=nss-reviewers,jschanck Differential Revision: https://phabricator.services.mozilla.com/D158327
* Bug 1782980, Fall back to the softokn when writing certificate trust ↵Rob Crittenden2022-08-231-31/+36
| | | | | | | | | | | | | | | | | | r=rrelyea@redhat.com Trust is stored in the softokn. When adding a certificate or modifying the trust of a certificate in an external token the operation may fail because the internal token is not authenticated. Instead the provided token name is authenticated multiple times (particularly in the case of AddCert). Catch a failed authentication to the provided token name where the error is SEC_ERROR_TOKEN_NOT_LOGGED_IN and attempt to authenticate to the softokn before calling CERT_ChangeCertTrust. Signed-off-by: Rob Crittenden <rcritten@redhat.com>
* Bug 1806010 FIPS-104-3 requires we restart post programmaticallyRobert Relyea2023-04-1222-236/+285
| | | | | | | | | | | | | FIPS -140-3 requires that we give applications a way to restart the Power On Self-Tests programmatically. Unloading the shared library is insufficient. Shutting down softoken and restarting it with a special flag is. This path accomplishes this task by: 1) adding a new startup flag init argument flag called forcePost which is parsed at FC_Initialize time. 2) Code which checks if the post ran properly takes a new Bool which tells the function whether or not to rerun the post operations. If post operations are to be rerun, all test flags are set to unknown or fail and the tests are rerun. The results are returned. 3) Public facing functions to verify integrity looks for a special non-valid character flag as the first character of the filename and uses that to decide if we should rerun post or not. Callers add the flag if post should be rerun. 4) pk11mode, the general FIPS test program makes sure we can turn on the forcePost flag. Differential Revision: https://phabricator.services.mozilla.com/D165050
* Bug 1826650 - cmd/ecperf: fix dangling pointer warning on gcc 13. r=djacksonJohn M. Schanck2023-04-131-0/+12
| | | | Differential Revision: https://phabricator.services.mozilla.com/D174822
* Bug 1818766: Update ACVP dockerfile for compatibility with debian package ↵Iaroslav Gridin2023-04-041-0/+1
| | | | | | changes r=nkulatova Differential Revision: https://phabricator.services.mozilla.com/D170903
* Bug 1815796: Add a CI task for tracking ECCKiila code status, update ↵Iaroslav Gridin2023-04-048-9/+123
| | | | | | whitespace in ECCKiila files r=nss-reviewers,nkulatova Differential Revision: https://phabricator.services.mozilla.com/D169262
* Bug 1819958. Removed deprecated sprintf function and replaced with snprintf. ↵Noah Lokocz2023-03-1633-180/+172
| | | | | | r=djackson Differential Revision: https://phabricator.services.mozilla.com/D171859
* Bug 1822076 - fix rst warnings in nss doc r=jschanckogiorgis2023-03-1389-204/+21
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172428
* Bug 1821997 - Fix incorrect pygment style r=nss-reviewers,bbeurdoucheogiorgis2023-03-1319-39/+30
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172398
* Set version numbers to 3.90 BetaJohn M. Schanck2023-03-095-12/+7
|
* Documentation: release notes for NSS 3.89John M. Schanck2023-03-092-0/+84
|
* Bug 1821292: Change GYP directive to apply across platforms. r=bbeurdoucheDennis Jackson2023-03-091-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D172103
* Add libsmime3 abi-check exception for NSS_CMSSignerInfo_GetDigestAlgTagJohn M. Schanck2023-03-071-0/+5
|
* Bug 1820834 - revert freebl/softoken RSA_MIN_MODULUS_BITS increase. r=rrelyeaJohn Schanck2023-03-071-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D171882
* Bug 1820175 - PR_STATIC_ASSERT is cursed. r=jschanckDennis Jackson2023-03-061-2/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D171754
* Bug 1767883 - Need to add policy control to keys lengths for signatures. ↵Robert Relyea2023-03-0318-23/+311
| | | | | | | | | | | | | | | | | r=nss-reviewers There are three changes in the patch which are related to key length processing: Change RSA_MIN_MODULUS_BITS in blalpit.h from 128 to 1023. This necessitated changes to the following tests: testcrmf.c: up the generated key for the test from 512 to 1024. pk11_rsapkcs1_unittest.cc (in pk11_gtest): skip the min padding test if the MIN_RSA_MODULUS_BITS is more than 736 (The largest hash we support is 512, which fits in an RSA key less then 736. If we can't generate a key less than 736, we can't test minimum padding, but we can never get into that situation anyway now). tls_subcerts_unittest.cc: set our key size to at least RSA_MIN_MODULUS_BITS, and then make sure the policy had a higher minimum key length so we still trigger the 'weakKey' event. pk11kea.c: use 1024 bits for the transfer key now that smaller keysizes aren't supported by softoken. Expand the add a new flag to meaning of NSS_XXX_MIN_KEY_SIZE beyond it's use in SSL (add the ability to limit signing and verification to this as well). This allows us to set strict FIPS 140-3 policies, where we can only sign with 2048, but can still verify 1024. This part includes: New utility functions in seckey.c: SECKEY_PrivateKeyStrengthInBits(): The private key equivalent to SECKEY_PublicKeyStrengthInBits(). This function could be exported globally, but isn't in this patch. seckey_EnforceKeySize(). Takes a key type and a length and makes sure that length falls into the range set by policy. secsign.c and secvfy.c: add policy length check where we check the other policy flags. nss.h, nssoptions.c: add NSS_KEY_SIZE_POLICY_FLAGS and define flags for SSL, VERIFY, and SIGN. SSL is set by default (to maintain the current behavior). pk11parse.c: add keywords for the new NSS_KEY_SIZE_POLICY_FLAGS. ssl3con.c: use the flags to decide if the policy lengths are active for SSL. policy.txt: Test that the new policy flags are parsed correctly sslpolicy.txt: Add tests to make sure the policy flags are functioning. Update fips_algorithms.h to make sure the FIPS indicators are exactly compliant with FIPS 140-3 current guidance (RSA 2028 and above, any key size, Legacy verification allowed for 1024, 1280, 1536, and 1792 [1024-1792, step 256]). The previous attempt to push failed because the pk11_rsapkcs1_unittest.cc change was eaten in the merge. Differential Revision: https://phabricator.services.mozilla.com/D146341
* Bug 1820175 - Fix unreachable code warning in fuzz builds. r=keelerJohn M. Schanck2023-03-031-4/+11
| | | | Differential Revision: https://phabricator.services.mozilla.com/D171603
* Bug 1820175 - Fix various compiler warnings in NSS. r=jschanck.Dennis Jackson2023-03-038-122/+54
| | | | Differential Revision: https://phabricator.services.mozilla.com/D171581
* Bug 1820175 - Enable various compiler warnings for clang builds. r=jschanck.Dennis Jackson2023-03-031-2/+22
| | | | | | | | This patch enables various compiler warnings in NSS, sourced from `warnings.configure` in mozilla-central. Several checks were too noisy to adopt and were already silenced in mozilla-central builds of NSS. Differential Revision: https://phabricator.services.mozilla.com/D171580
* Backed out changeset 761e7d215e0a for causing gtest failuresNSS_3_89_BETA1John M. Schanck2023-03-0217-303/+22
|
* Bug 1815136 - set PORT error after sftk_HMACCmp failure. ↵John M. Schanck2023-03-021-1/+6
| | | | | | r=nss-reviewers,nkulatova Differential Revision: https://phabricator.services.mozilla.com/D171495
* Bug 1767883 Need to add policy control to keys lengths for signatures.Robert Relyea2022-12-1917-22/+303
| | | | | | | | | | | | There are three changes in the patch which are related to key length processing: Change RSA_MIN_MODULUS_BITS in blalpit.h from 128 to 1023. This necessitated changes to the following tests: testcrmf.c: up the generated key for the test from 512 to 1024. pk11_rsapkcs1_unittest.cc (in pk11_gtest): skip the min padding test if the MIN_RSA_MODULUS_BITS is more than 736 (The largest hash we support is 512, which fits in an RSA key less then 736. If we can't generate a key less than 736, we can't test minimum padding, but we can never get into that situation anyway now). tls_subcerts_unittest.cc: set our key size to at least RSA_MIN_MODULUS_BITS, and then make sure the policy had a higher minimum key length so we still trigger the 'weakKey' event. pk11kea.c: use 1024 bits for the transfer key now that smaller keysizes aren't supported by softoken. Expand the add a new flag to meaning of NSS_XXX_MIN_KEY_SIZE beyond it's use in SSL (add the ability to limit signing and verification to this as well). This allows us to set strict FIPS 140-3 policies, where we can only sign with 2048, but can still verify 1024. This part includes: New utility functions in seckey.c: SECKEY_PrivateKeyStrengthInBits(): The private key equivalent to SECKEY_PublicKeyStrengthInBits(). This function could be exported globally, but isn't in this patch. seckey_EnforceKeySize(). Takes a key type and a length and makes sure that length falls into the range set by policy. secsign.c and secvfy.c: add policy length check where we check the other policy flags. nss.h, nssoptions.c: add NSS_KEY_SIZE_POLICY_FLAGS and define flags for SSL, VERIFY, and SIGN. SSL is set by default (to maintain the current behavior). pk11parse.c: add keywords for the new NSS_KEY_SIZE_POLICY_FLAGS. ssl3con.c: use the flags to decide if the policy lengths are active for SSL. policy.txt: Test that the new policy flags are parsed correctly sslpolicy.txt: Add tests to make sure the policy flags are functioning. Update fips_algorithms.h to make sure the FIPS indicators are exactly compliant with FIPS 140-3 current guidance (RSA 2028 and above, any key size, Legacy verification allowed for 1024, 1280, 1536, and 1792 [1024-1792, step 256]). Differential Revision: https://phabricator.services.mozilla.com/D146341
* Finish backout. (sigh)Robert Relyea2023-02-28585-77020/+0
|
* Sigh, even when I explicitly push to nss-try, it's pushing to nss!Robert Relyea2023-02-279-16/+2
|
* Add liboqsRobert Relyea2023-02-27594-2/+77036
|
* This change was supposed to be pushed to nss-try,Robert Relyea2023-02-27592-76589/+2
| | | | but something went out of wack. Back this change out of the tip
* Add liboqsRobert Relyea2023-02-27592-2/+76589
|
* Bug 1804662 - remove data length assertion in sec_PKCS7Decrypt. ↵John M. Schanck2023-02-231-1/+0
| | | | | | r=nss-reviewers,nkulatova Differential Revision: https://phabricator.services.mozilla.com/D170672
* Bug 1804660 - Make high tag number assertion failure an error. ↵John M. Schanck2023-02-231-3/+7
| | | | | | | | | | | | | | r=nss-reviewers,djackson If a template has an OPTIONAL field, and we find that the input does not match that field's tag number, we mark the field as missing. If the next field is an ASN.1 ANY, we need to write the previously-parsed tag number out. Since high tag number forms are rare, we never implemented the necessary re-encoding of multi-byte tags, and we noted this with an assertion. That assertion is remotely triggerable in debug builds. This patch removes the assertion and returns a SEC_ERROR_LIBRARY_FAILURE instead. Differential Revision: https://phabricator.services.mozilla.com/D170678
* Bug 1817513 - CKM_SHA384_KEY_DERIVATION correction maximum key length from ↵Anna Weine2023-02-231-1/+1
| | | | | | 284 to 384 r=nss-reviewers,jschanck Differential Revision: https://phabricator.services.mozilla.com/D170481
* Fix formatting in ssl_extension_unittest.ccDennis Jackson2023-02-231-2/+2
|
* Bug 1815167: Tolerate certificate_authorities xtn in ClientHello. ↵Dennis Jackson2023-02-225-1/+31
| | | | | | r=mt,nss-reviewers Differential Revision: https://phabricator.services.mozilla.com/D169918