* latest FIPS changes incl. testsuite fixes (enabled now) nss-fips-180-3-csp-clearing.patch nss-fips-tests-enable-fips.patch nss-fips-tests-skip.patch nss-fips-pbkdf-kat-compliance.patch - update to NSS 3.79 * bmo#205717 - Use PK11_GetSlotInfo instead of raw C_GetSlotInfo calls. * bmo#1766907 - Update mercurial in clang-format docker image. * bmo#1454072 - Use of uninitialized pointer in lg_init after alloc fail. * bmo#1769295 - selfserv and tstclnt should use PR_GetPrefLoopbackAddrInfo. * bmo#1753315 - Add SECMOD_LockedModuleHasRemovableSlots. * bmo#1387919 - Fix secasn1d parsing of indefinite SEQUENCE inside indefinite GROUP. * bmo#1765753 - Added RFC8422 compliant TLS <= 1.2 undefined/compressed ECPointFormat extension alerts. * bmo#1765753 - TLS 1.3 Server: Send protocol_version alert on unsupported ClientHello.legacy_version. * bmo#1764788 - Correct invalid record inner and outer content type alerts. * bmo#1757075 - NSS does not properly import or export pkcs12 files with large passwords and pkcs5v2 encoding. * bmo#1766978 - improve error handling after nssCKFWInstance_CreateObjectHandle. * bmo#1767590 - Initialize pointers passed to NSS_CMSDigestContext_FinishMultiple. * bmo#1769302 - NSS 3.79 should depend on NSPR 4.34 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/mozilla-nss?expand=0&rev=386
61 lines
2.5 KiB
Diff
61 lines
2.5 KiB
Diff
Index: nss/lib/softoken/lowpbe.c
|
|
===================================================================
|
|
--- nss.orig/lib/softoken/lowpbe.c
|
|
+++ nss/lib/softoken/lowpbe.c
|
|
@@ -1745,7 +1745,7 @@ loser:
|
|
return ret_algid;
|
|
}
|
|
|
|
-#define TEST_KEY "pbkdf test key"
|
|
+#define TEST_KEY "qrfhfgkeWKZsYyLfUddaKQKLGhwqjQhNCiAdfweKEPaRf"
|
|
SECStatus
|
|
sftk_fips_pbkdf_PowerUpSelfTests(void)
|
|
{
|
|
@@ -1755,17 +1755,22 @@ sftk_fips_pbkdf_PowerUpSelfTests(void)
|
|
unsigned char iteration_count = 5;
|
|
unsigned char keyLen = 64;
|
|
char *inKeyData = TEST_KEY;
|
|
- static const unsigned char saltData[] =
|
|
- { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
|
|
+ static const unsigned char saltData[] = {
|
|
+ 0x11, 0x39, 0x93, 0x54, 0x1C, 0xDD, 0xD7, 0x18,
|
|
+ 0x2F, 0x4A, 0xC1, 0x14, 0x03, 0x7A, 0x0B, 0x64,
|
|
+ 0x48, 0x99, 0xF4, 0x6D, 0xB7, 0x48, 0xE3, 0x3B,
|
|
+ 0x91, 0xBF, 0x65, 0xA9, 0x26, 0x83, 0xE8, 0x22
|
|
+ };
|
|
+
|
|
static const unsigned char pbkdf_known_answer[] = {
|
|
- 0x31, 0xf0, 0xe5, 0x39, 0x9f, 0x39, 0xb9, 0x29,
|
|
- 0x68, 0xac, 0xf2, 0xe9, 0x53, 0x9b, 0xb4, 0x9c,
|
|
- 0x28, 0x59, 0x8b, 0x5c, 0xd8, 0xd4, 0x02, 0x37,
|
|
- 0x18, 0x22, 0xc1, 0x92, 0xd0, 0xfa, 0x72, 0x90,
|
|
- 0x2c, 0x8d, 0x19, 0xd4, 0x56, 0xfb, 0x16, 0xfa,
|
|
- 0x8d, 0x5c, 0x06, 0x33, 0xd1, 0x5f, 0x17, 0xb1,
|
|
- 0x22, 0xd9, 0x9c, 0xaf, 0x5e, 0x3f, 0xf3, 0x66,
|
|
- 0xc6, 0x14, 0xfe, 0x83, 0xfa, 0x1a, 0x2a, 0xc5
|
|
+ 0x44, 0xd2, 0xae, 0x2d, 0x45, 0xb9, 0x42, 0x70,
|
|
+ 0xcb, 0x3e, 0x40, 0xc5, 0xcf, 0x36, 0x9b, 0x5f,
|
|
+ 0xfc, 0x64, 0xb1, 0x10, 0x18, 0x4d, 0xd8, 0xb6,
|
|
+ 0x71, 0xa3, 0xc4, 0x4f, 0x1d, 0xa7, 0x8f, 0xa5,
|
|
+ 0x0c, 0x4b, 0x13, 0xce, 0x2f, 0x2b, 0x48, 0xe0,
|
|
+ 0xfc, 0x10, 0x6d, 0xf4, 0xfb, 0x71, 0x1b, 0x0e,
|
|
+ 0x33, 0x2c, 0x43, 0x43, 0xe1, 0x77, 0x16, 0xf5,
|
|
+ 0x1e, 0x96, 0xcd, 0x93, 0x21, 0xb8, 0x78, 0x32
|
|
};
|
|
|
|
sftk_PBELockInit();
|
|
@@ -1794,11 +1799,12 @@ sftk_fips_pbkdf_PowerUpSelfTests(void)
|
|
* for NSSPKCS5_PBKDF2 */
|
|
pbe_params.iter = iteration_count;
|
|
pbe_params.keyLen = keyLen;
|
|
- pbe_params.hashType = HASH_AlgSHA256;
|
|
+ pbe_params.hashType = HASH_AlgSHA384;
|
|
pbe_params.pbeType = NSSPKCS5_PBKDF2;
|
|
pbe_params.is2KeyDES = PR_FALSE;
|
|
|
|
result = nsspkcs5_ComputeKeyAndIV(&pbe_params, &inKey, NULL, PR_FALSE);
|
|
+
|
|
if ((result == NULL) || (result->len != sizeof(pbkdf_known_answer)) ||
|
|
(PORT_Memcmp(result->data, pbkdf_known_answer, sizeof(pbkdf_known_answer)) != 0)) {
|
|
SECITEM_FreeItem(result, PR_TRUE);
|