Граф коммитов

14962 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru aae4ce6e7b Bug 1612731 - Fix a array-into-iter warning with Rust 1.41 r=vporof
Differential Revision: https://phabricator.services.mozilla.com/D61412

--HG--
extra : moz-landing-system : lando
2020-02-02 19:39:13 +00:00
J.C. Jones 799f0cd87c Bug 1606927 - land NSS 4bf79c4d2954 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-27  J.C. Jones  <jjones@mozilla.com>

	* lib/freebl/blinit.c:
	Bug 1602386 - clang-format r=bustage
	[4bf79c4d2954] [tip]

2020-01-27  Piotr Kubaj  <pkubaj@FreeBSD.org>

	* lib/freebl/Makefile, lib/freebl/blinit.c:
	Bug 1602386 - Fix build on FreeBSD/powerpc platforms. r=jcj

	FreeBSD has elf_aux_info instead of getauxval, but only since
	FreeBSD 12. Previous versions (11 is still supported) don't have any
	equivalent and users need to query sysctl manually.

	[f2ac5e318886]

2020-01-27  Jan Beich  <jbeich@FreeBSD.org>

	* lib/freebl/blinit.c:
	Bug 1609181 - Detect ARM CPU features on FreeBSD. r=jcj

	Implement `getauxval` via `elf_aux_info` to avoid code duplication.
	`AT_HWCAP*` can be used on powerpc* and riscv64 as well.
	[edb60bae9219]

2020-01-22  Martin Thomson  <mt@lowentropy.net>

	* lib/zlib/README, lib/zlib/README.nss, lib/zlib/adler32.c,
	lib/zlib/compress.c, lib/zlib/crc32.c, lib/zlib/crc32.h,
	lib/zlib/deflate.c, lib/zlib/deflate.h, lib/zlib/gzguts.h,
	lib/zlib/gzlib.c, lib/zlib/gzread.c, lib/zlib/gzwrite.c,
	lib/zlib/infback.c, lib/zlib/inffast.c, lib/zlib/inffixed.h,
	lib/zlib/inflate.c, lib/zlib/inflate.h, lib/zlib/inftrees.c,
	lib/zlib/trees.c, lib/zlib/trees.h, lib/zlib/uncompr.c,
	lib/zlib/zconf.h, lib/zlib/zlib.h, lib/zlib/zutil.c,
	lib/zlib/zutil.h:
	Bug 1547639 - Update zlib to 1.2.11, r=jcj

	[91f3f0749d0b]

	* lib/zlib/README.nss, lib/zlib/config.mk, lib/zlib/example.c,
	lib/zlib/manifest.mn, lib/zlib/minigzip.c, lib/zlib/vendor.sh,
	lib/zlib/zlib.gyp:
	Bug 1547639 - Automatic vendoring of zlib, r=jcj

	[fc128963a9aa]

Differential Revision: https://phabricator.services.mozilla.com/D61126

--HG--
extra : moz-landing-system : lando
2020-01-28 06:50:08 +00:00
Dimi Lee f9ac16c330 Bug 1599046 - P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
At this point, there is no consumer that uses ContentBlockingLog stored
in the child. This patch removes the following code:
1. Removing nsGlobalWindowOuter::NotifyContentBlockingEvent
2. Removing nsDocLoader::OnContentBlockingEvent
3. Removing contentBlockingEvent in nsISecureBrowserUI.idl
4. Removing mContentBlockingLog from Document.cpp and APIs related to it.

Differential Revision: https://phabricator.services.mozilla.com/D56874

--HG--
extra : moz-landing-system : lando
2020-01-27 10:39:41 +00:00
Brindusan Cristian 00b2950b8d Backed out 4 changesets (bug 1599046) for xpcshell failures at test_ext_cookieBehaviors. CLOSED TREE
Backed out changeset 721f54870498 (bug 1599046)
Backed out changeset 2e165c119a4f (bug 1599046)
Backed out changeset 2bc0fa3bbe0e (bug 1599046)
Backed out changeset 805fb67be8a3 (bug 1599046)
2020-01-27 12:36:11 +02:00
Dimi Lee ffdfd5d51a Bug 1599046 - P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
At this point, there is no consumer that uses ContentBlockingLog stored
in the child. This patch removes the following code:
1. Removing nsGlobalWindowOuter::NotifyContentBlockingEvent
2. Removing nsDocLoader::OnContentBlockingEvent
3. Removing contentBlockingEvent in nsISecureBrowserUI.idl
4. Removing mContentBlockingLog from Document.cpp and APIs related to it.

Differential Revision: https://phabricator.services.mozilla.com/D56874

--HG--
extra : moz-landing-system : lando
2020-01-27 09:13:12 +00:00
ffxbld 2f2c6ee707 No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D60838

--HG--
extra : moz-landing-system : lando
2020-01-23 13:31:34 +00:00
Kirk Steuber 0c6c51ee27 Bug 1607575 - Restore support for saving/restoring MozTree column ordering r=bgrins CLOSED TREE
MozTrees persist column ordering using the XUL persist="ordinal" attribute. This patch synchronizes MozTree with that old mechanism to restore the ability to save and restore column ordering. Because the persist data will be stored in the same place as before, this should prevent people from losing their column ordering data without requiring data migration.

Differential Revision: https://phabricator.services.mozilla.com/D59763

--HG--
extra : rebase_source : 0474619cb817263d7a56b970c44cf8987d719355
extra : histedit_source : d8ed787170f5dd3ac6e19bf318e1a69c9ad0eac5
2020-01-21 18:48:58 +01:00
J.C. Jones c70fa24ea8 Bug 1606927 - land NSS cd55a3a90502 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-22  Kai Engert  <kaie@kuix.de>

	* lib/softoken/lowpbe.c:
	Bug 1606992 - Follow-up to also cache most recent PBKDF1 hash (in
	addition to PBKDF2 hash). r=kjacobs

	[cd55a3a90502] [tip]

2020-01-22  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/freebl/aes-x86.c, lib/freebl/rijndael.c, lib/freebl/rijndael.h:
	Bug 1608493 - Use AES-NI intrinsics for CBC and ECB decrypt when no
	assembly implementation is available. r=mt

	AES-NI is currently not used for //CBC// or //ECB decrypt// when an
	assembly implementation (`intel-aes.s` or `intel-
	aes-x86/64-masm.asm`) is not available. Concretely, this is the case
	on MacOS, Linux32, and other non-Linux OSes such as BSD. This patch
	adds the plumbing to use AES-NI intrinsics when available.

	Before: ``` mode in symmkey opreps cxreps context op time(sec)
	thrgput aes_ecb_d 78Mb 256 10T 0 0.000 395.000 0.395 197Mb aes_cbc_e
	78Mb 256 10T 0 0.000 392.000 0.393 198Mb aes_cbc_d 78Mb 256 10T 0
	0.000 425.000 0.425 183Mb

	```

	After: ``` mode in symmkey opreps cxreps context op time(sec)
	thrgput aes_ecb_d 78Mb 256 10T 0 0.000 39.000 0.039 1Gb aes_cbc_e
	78Mb 256 10T 0 0.000 94.000 0.094 831Mb aes_cbc_d 78Mb 256 10T 0
	0.000 74.000 0.075 1Gb

	```

	[9804c76e76f3]

Differential Revision: https://phabricator.services.mozilla.com/D60763

--HG--
extra : moz-landing-system : lando
2020-01-22 23:13:52 +00:00
Victor Porof 20791b5d6a Bug 1610179 - Remove and recreate the database doesn't actually do anything in RKV safe-mode, r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D60377

--HG--
extra : moz-landing-system : lando
2020-01-21 18:52:09 +00:00
J.C. Jones 4cb75803d7 Bug 1606927 - land NSS 124c43a9f768 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-16  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/common/testvectors/cbc-vectors.h, gtests/common/testvectors
	/chachapoly-vectors.h, gtests/common/testvectors/cmac-vectors.h,
	gtests/common/testvectors/curve25519-vectors.h,
	gtests/common/testvectors/gcm-vectors.h, gtests/common/testvectors
	/p256ecdh-vectors.h, gtests/common/testvectors_base/chachapoly-
	vectors_base.h,
	gtests/common/testvectors_base/curve25519-vectors_base.h,
	gtests/common/testvectors_base/gcm-vectors_base.h,
	gtests/common/testvectors_base/test-structs.h,
	gtests/common/wycheproof/genTestVectors.py,
	gtests/common/wycheproof/source_vectors/aes_cbc_pkcs5_test.json,
	gtests/common/wycheproof/source_vectors/aes_cmac_test.json,
	gtests/common/wycheproof/source_vectors/aes_gcm_test.json,
	gtests/common/wycheproof/source_vectors/chacha20_poly1305_test.json,
	gtests/common/wycheproof/source_vectors/ecdh_secp256r1_test.json,
	gtests/common/wycheproof/source_vectors/x25519_test.json,
	gtests/freebl_gtest/ghash_unittest.cc,
	gtests/pk11_gtest/manifest.mn,
	gtests/pk11_gtest/pk11_aes_cmac_unittest.cc,
	gtests/pk11_gtest/pk11_aes_gcm_unittest.cc,
	gtests/pk11_gtest/pk11_cbc_unittest.cc,
	gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	gtests/pk11_gtest/pk11_curve25519_unittest.cc,
	gtests/pk11_gtest/pk11_ecdh_unittest.cc,
	gtests/pk11_gtest/pk11_gtest.gyp, mach:
	Bug 1604596 - Update Wycheproof vectors and add support for CBC,
	P256-ECDH, and CMAC tests r=franziskus

	This patch updates to the latest Wycheproof vectors and adds
	Wycheproof support for CBC, CMAC, and P256-ECDH:

	ChaCha20: +141 tests Curve25519: +431 tests GCM: +39 tests CBC
	(new): +183 tests CMAC (new): +308 tests P256 ECDH (new): +460 tests

	[124c43a9f768] [tip]

2020-01-17  Kai Engert  <kaie@kuix.de>

	* lib/softoken/lowpbe.c:
	Bug 1606992 - Permit sftk_PBELockInit being called multiple times.
	r=kjacobs

	[9d1ced9ae01e]

	* lib/softoken/lowpbe.c:
	Bug 1606992 - follow up to fix clang-format, whitespace only. rs=me
	DONTBUILD
	[7c9dcf601c83]

2020-01-15  Kai Engert  <kaie@kuix.de>

	* lib/softoken/lowpbe.c:
	Bug 1606992 - Follow-up to cleanup PBE cache code. r=kjacobs

	[1d782fb6eede]

2020-01-03  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/freebl/mpi/mp_comba_amd64_masm.asm, lib/freebl/mpi/mpi-priv.h:
	Bug 1605314 - Compare all 8 bytes of an mp_digit when clamping in
	Windows assembly/mp_comba. r=mt

	Compare all 8 bytes of an `mp_digit` when clamping in Windows x64
	assembly (mp_sqr/mp_mul). Also adds an assertion to ensure that the
	size of `mp_digit` matches implementation assumptions.

	[09673f933c6d]

Differential Revision: https://phabricator.services.mozilla.com/D60538

--HG--
extra : moz-landing-system : lando
2020-01-21 18:46:42 +00:00
ffxbld 2dea3bc808 No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D60400

--HG--
extra : moz-landing-system : lando
2020-01-20 17:59:00 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

Differential Revision: https://phabricator.services.mozilla.com/D60323

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
ffxbld 5a611b020b No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D60144

--HG--
extra : moz-landing-system : lando
2020-01-16 19:24:27 +00:00
Brian Grinstead d8480acf44 Bug 1608278 - Export DER as DERDecoder to avoid duplicate DER global in DER.jsm r=keeler
We need to stop relying on the global `this` in order to support ES Modules.
In this case we have `this.DER` (which is exported) and `class DER` in the
same module.

Because of this, changing `this.DER` to `const DER` would lead to an error.
So this change renames the class to avoid the conflict.

Differential Revision: https://phabricator.services.mozilla.com/D60078

--HG--
extra : moz-landing-system : lando
2020-01-16 18:20:41 +00:00
J.C. Jones 5e7e635bc0 Bug 1606927 - land NSS 5f9f410d0b60 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-15  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/freebl/chacha20poly1305.c:
	Bug 1574643 - Check for AVX support before using vectorized ChaCha20
	decrypt r=jcj

	The addition of an AVX support check in `ChaCha20Poly1305_Seal`
	seems to have stopped the Encrypt crashes on old Intel CPUs, however
	we're seeing new reports from
	`Hacl_Chacha20Poly1305_128_aead_decrypt` (which is called from
	`ChaCha20Poly1305_Open`). This needs an AVX check as well...

	[5f9f410d0b60] [tip]

2020-01-14  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/pk11_gtest/manifest.mn, gtests/pk11_gtest/pk11_gtest.gyp,
	gtests/pk11_gtest/pk11_rsaencrypt_unittest.cc:
	Bug 1573911 - Add RSA Encryption test r=jcj

	Add a test for various sizes of RSA encryption input.

	[4abc6ff828ab]

2020-01-13  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/common/testvectors/hkdf-vectors.h,
	gtests/pk11_gtest/manifest.mn, gtests/pk11_gtest/pk11_gtest.gyp,
	gtests/pk11_gtest/pk11_hkdf_unittest.cc:
	Bug 1585429 - Add HKDF test vectors r=jcj

	Adds test vectors for SHA1/256/384/512 HKDF. This includes the RFC
	test vectors, as well as upper-bound length checks for the output
	key material.

	[239797efc34b]

2020-01-14  J.C. Jones  <jjones@mozilla.com>

	* coreconf/config.gypi:
	Bug 1608327 - Fixup for dc57fe5d65d4, add a default for
	softfp_cflags r=bustage
	[05b923624b73]

2020-01-14  Sylvestre Ledru  <sledru@mozilla.com>

	* automation/buildbot-slave/bbenv-example.sh, automation/buildbot-
	slave/build.sh, automation/buildbot-slave/reboot.bat, automation
	/buildbot-slave/startbuild.bat:
	Bug 1607099 - Remove the buildbot configuration r=jcj

	[7a87cef808f3]

2020-01-14  Greg V  <greg@unrelenting.technology>

	* lib/freebl/blinit.c:
	Bug 1575843 - Detect AArch64 CPU features on FreeBSD r=jcj

	Environment checks are reogranized to be separate from platform code
	to make it impossible to forget to check disable_FEATURE on one
	platform but not the other.

	[fbde548e8114]

2020-01-14  Mike Hommey  <mh@glandium.org>

	* lib/freebl/Makefile, lib/freebl/aes-armv8.c, lib/freebl/freebl.gyp,
	lib/freebl/gcm-arm32-neon.c, lib/freebl/gcm.c,
	lib/freebl/rijndael.c:
	Bug 1608327 - Fix freebl arm NEON code use on tier3 platforms. r=jcj

	Despite the code having runtime detection of NEON and crypto
	extensions, the optimized code using those instructions is disabled
	at build time on platforms where the compiler doesn't enable NEON by
	default of with the flags it's given for the caller code.

	In the case of gcm, this goes as far as causing a build error.

	What is needed is for the optimized code to be enabled in every
	case, letting the caller code choose whether to use that code based
	on the existing runtime checks.

	But this can't be simply done either, because those optimized parts
	of the code need to be built with NEON enabled, unconditionally, but
	that is not compatible with platforms using the softfloat ABI. For
	those, we need to use the softfp ABI, which is compatible. However,
	the softfp ABI is not compatible with the hardfp ABI, so we also
	can't unconditionally use the softfp ABI, so we do so only when the
	compiler targets the softfloat ABI, which confusingly enough is
	advertized via the `__SOFTFP__` define.

	[dc57fe5d65d4]

2020-01-14  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* automation/saw/chacha20.saw, automation/taskcluster/docker-
	builds/Dockerfile, automation/taskcluster/docker-
	hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc,
	automation/taskcluster/docker-hacl/Dockerfile,
	automation/taskcluster/docker-hacl/bin/checkout.sh,
	automation/taskcluster/docker-hacl/license.txt,
	automation/taskcluster/docker-hacl/setup-user.sh,
	automation/taskcluster/docker-hacl/setup.sh,
	automation/taskcluster/graph/src/extend.js,
	automation/taskcluster/scripts/run_hacl.sh,
	gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	lib/freebl/Makefile, lib/freebl/blapii.h, lib/freebl/blinit.c,
	lib/freebl/chacha20poly1305.c, lib/freebl/det_rng.c,
	lib/freebl/ecl/curve25519_64.c, lib/freebl/freebl.gyp,
	lib/freebl/freebl_base.gypi, nss-tool/hw-support.c:
	Bug 1574643 - NSS changes for haclv2 r=jcj,kjacobs

	This patch contains the changes in NSS, necessary to pick up HACL*v2
	in D55413. It has a couple of TODOs:
	* The chacha20 saw verification fails for some reason; it's disabled
	pending Bug 1604130.
	* The hacl task on CI requires Bug 1593647 to get fixed.

	Depends on D55413.

	[a8df94132dd3]

2019-12-21  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* lib/freebl/verified/FStar.c, lib/freebl/verified/FStar.h,
	lib/freebl/verified/Hacl_Chacha20.c,
	lib/freebl/verified/Hacl_Chacha20.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.h,
	lib/freebl/verified/Hacl_Chacha20_Vec128.c,
	lib/freebl/verified/Hacl_Chacha20_Vec128.h,
	lib/freebl/verified/Hacl_Curve25519.c,
	lib/freebl/verified/Hacl_Curve25519.h,
	lib/freebl/verified/Hacl_Curve25519_51.c,
	lib/freebl/verified/Hacl_Curve25519_51.h,
	lib/freebl/verified/Hacl_Kremlib.h,
	lib/freebl/verified/Hacl_Poly1305_128.c,
	lib/freebl/verified/Hacl_Poly1305_128.h,
	lib/freebl/verified/Hacl_Poly1305_32.c,
	lib/freebl/verified/Hacl_Poly1305_32.h,
	lib/freebl/verified/Hacl_Poly1305_64.c,
	lib/freebl/verified/Hacl_Poly1305_64.h,
	lib/freebl/verified/kremlib.h, lib/freebl/verified/kremlib_base.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/callconv.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/compat.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/target.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/types.h,
	lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h,
	lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128.h, li
	b/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128_Verifie
	d.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt_8_1
	6_32_64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/LowStar_
	Endianness.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar
	_uint128_gcc64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/f
	star_uint128_msvc.h, lib/freebl/verified/libintvector.h,
	lib/freebl/verified/specs/Spec.CTR.fst,
	lib/freebl/verified/specs/Spec.Chacha20.fst,
	lib/freebl/verified/specs/Spec.Curve25519.fst,
	lib/freebl/verified/specs/Spec.Poly1305.fst,
	lib/freebl/verified/vec128.h:
	Bug 1574643 - haclv2 code r=kjacobs

	This updates the in-tree version of our existing HACL* code to v2,
	replacing what we have already. Once this landed NSS can pick up
	more (faster) code from HACL*.

	[5bf2547d671f]

2020-01-13  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/taskcluster/windows/build_gyp.sh:
	Bug 1608895 - Install setuptools<45.0.0 until workers are upgraded
	to python3 r=jcj

	[[ https://setuptools.readthedocs.io/en/latest/history.html#v45-0-0
	| Setuptools 45.0.0 ]] drops support for Python2, which our Windows
	workers are running.

	This patch installs the prior version during build, in order to
	unblock CI until the workers can be upgraded.

	[64c5410f98e0]

Differential Revision: https://phabricator.services.mozilla.com/D60086

--HG--
extra : moz-landing-system : lando
2020-01-16 00:13:09 +00:00
Cosmin Sabou 877a36559e Backed out changeset 3006febc4c38 (bug 1606927) for causing startup crashes in latest nightly version. UPGRADE_NSS_RELEASE a=backout
--HG--
extra : amend_source : 11f3873c8a2163cdc5ae51f5f54175e07666b8a6
2020-01-15 18:52:15 +02:00
J.C. Jones 3dd40eb5a5 Bug 1606927 - land NSS 239797efc34b UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-13  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/common/testvectors/hkdf-vectors.h,
	gtests/pk11_gtest/manifest.mn, gtests/pk11_gtest/pk11_gtest.gyp,
	gtests/pk11_gtest/pk11_hkdf_unittest.cc:
	Bug 1585429 - Add HKDF test vectors r=jcj

	Adds test vectors for SHA1/256/384/512 HKDF. This includes the RFC
	test vectors, as well as upper-bound length checks for the output
	key material.

	[239797efc34b] [tip]

2020-01-14  J.C. Jones  <jjones@mozilla.com>

	* coreconf/config.gypi:
	Bug 1608327 - Fixup for dc57fe5d65d4, add a default for
	softfp_cflags r=bustage
	[05b923624b73]

2020-01-14  Sylvestre Ledru  <sledru@mozilla.com>

	* automation/buildbot-slave/bbenv-example.sh, automation/buildbot-
	slave/build.sh, automation/buildbot-slave/reboot.bat, automation
	/buildbot-slave/startbuild.bat:
	Bug 1607099 - Remove the buildbot configuration r=jcj

	[7a87cef808f3]

2020-01-14  Greg V  <greg@unrelenting.technology>

	* lib/freebl/blinit.c:
	Bug 1575843 - Detect AArch64 CPU features on FreeBSD r=jcj

	Environment checks are reogranized to be separate from platform code
	to make it impossible to forget to check disable_FEATURE on one
	platform but not the other.

	[fbde548e8114]

2020-01-14  Mike Hommey  <mh@glandium.org>

	* lib/freebl/Makefile, lib/freebl/aes-armv8.c, lib/freebl/freebl.gyp,
	lib/freebl/gcm-arm32-neon.c, lib/freebl/gcm.c,
	lib/freebl/rijndael.c:
	Bug 1608327 - Fix freebl arm NEON code use on tier3 platforms. r=jcj

	Despite the code having runtime detection of NEON and crypto
	extensions, the optimized code using those instructions is disabled
	at build time on platforms where the compiler doesn't enable NEON by
	default of with the flags it's given for the caller code.

	In the case of gcm, this goes as far as causing a build error.

	What is needed is for the optimized code to be enabled in every
	case, letting the caller code choose whether to use that code based
	on the existing runtime checks.

	But this can't be simply done either, because those optimized parts
	of the code need to be built with NEON enabled, unconditionally, but
	that is not compatible with platforms using the softfloat ABI. For
	those, we need to use the softfp ABI, which is compatible. However,
	the softfp ABI is not compatible with the hardfp ABI, so we also
	can't unconditionally use the softfp ABI, so we do so only when the
	compiler targets the softfloat ABI, which confusingly enough is
	advertized via the `__SOFTFP__` define.

	[dc57fe5d65d4]

2020-01-14  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* automation/saw/chacha20.saw, automation/taskcluster/docker-
	builds/Dockerfile, automation/taskcluster/docker-
	hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc,
	automation/taskcluster/docker-hacl/Dockerfile,
	automation/taskcluster/docker-hacl/bin/checkout.sh,
	automation/taskcluster/docker-hacl/license.txt,
	automation/taskcluster/docker-hacl/setup-user.sh,
	automation/taskcluster/docker-hacl/setup.sh,
	automation/taskcluster/graph/src/extend.js,
	automation/taskcluster/scripts/run_hacl.sh,
	gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	lib/freebl/Makefile, lib/freebl/blapii.h, lib/freebl/blinit.c,
	lib/freebl/chacha20poly1305.c, lib/freebl/det_rng.c,
	lib/freebl/ecl/curve25519_64.c, lib/freebl/freebl.gyp,
	lib/freebl/freebl_base.gypi, nss-tool/hw-support.c:
	Bug 1574643 - NSS changes for haclv2 r=jcj,kjacobs

	This patch contains the changes in NSS, necessary to pick up HACL*v2
	in D55413. It has a couple of TODOs:
	* The chacha20 saw verification fails for some reason; it's disabled
	pending Bug 1604130.
	* The hacl task on CI requires Bug 1593647 to get fixed.

	Depends on D55413.

	[a8df94132dd3]

2019-12-21  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* lib/freebl/verified/FStar.c, lib/freebl/verified/FStar.h,
	lib/freebl/verified/Hacl_Chacha20.c,
	lib/freebl/verified/Hacl_Chacha20.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.h,
	lib/freebl/verified/Hacl_Chacha20_Vec128.c,
	lib/freebl/verified/Hacl_Chacha20_Vec128.h,
	lib/freebl/verified/Hacl_Curve25519.c,
	lib/freebl/verified/Hacl_Curve25519.h,
	lib/freebl/verified/Hacl_Curve25519_51.c,
	lib/freebl/verified/Hacl_Curve25519_51.h,
	lib/freebl/verified/Hacl_Kremlib.h,
	lib/freebl/verified/Hacl_Poly1305_128.c,
	lib/freebl/verified/Hacl_Poly1305_128.h,
	lib/freebl/verified/Hacl_Poly1305_32.c,
	lib/freebl/verified/Hacl_Poly1305_32.h,
	lib/freebl/verified/Hacl_Poly1305_64.c,
	lib/freebl/verified/Hacl_Poly1305_64.h,
	lib/freebl/verified/kremlib.h, lib/freebl/verified/kremlib_base.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/callconv.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/compat.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/target.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/types.h,
	lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h,
	lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128.h, li
	b/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128_Verifie
	d.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt_8_1
	6_32_64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/LowStar_
	Endianness.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar
	_uint128_gcc64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/f
	star_uint128_msvc.h, lib/freebl/verified/libintvector.h,
	lib/freebl/verified/specs/Spec.CTR.fst,
	lib/freebl/verified/specs/Spec.Chacha20.fst,
	lib/freebl/verified/specs/Spec.Curve25519.fst,
	lib/freebl/verified/specs/Spec.Poly1305.fst,
	lib/freebl/verified/vec128.h:
	Bug 1574643 - haclv2 code r=kjacobs

	This updates the in-tree version of our existing HACL* code to v2,
	replacing what we have already. Once this landed NSS can pick up
	more (faster) code from HACL*.

	[5bf2547d671f]

2020-01-13  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/taskcluster/windows/build_gyp.sh:
	Bug 1608895 - Install setuptools<45.0.0 until workers are upgraded
	to python3 r=jcj

	[[ https://setuptools.readthedocs.io/en/latest/history.html#v45-0-0
	| Setuptools 45.0.0 ]] drops support for Python2, which our Windows
	workers are running.

	This patch installs the prior version during build, in order to
	unblock CI until the workers can be upgraded.

	[64c5410f98e0]

Differential Revision: https://phabricator.services.mozilla.com/D59928

--HG--
extra : moz-landing-system : lando
2020-01-14 21:21:55 +00:00
Eric Rahm 56daa6db3f Bug 1609107 - Update CertBlocklist to use UniquePtr. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D59898

--HG--
extra : moz-landing-system : lando
2020-01-14 17:29:06 +00:00
J.C. Jones 1cbe67b6fb Bug 1606927 - land NSS a06bd0f6bbe8 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-11  Kai Engert  <kaie@kuix.de>

	* lib/softoken/lowpbe.c, lib/softoken/pkcs11.c:
	Bug 1606992 - Cache the most recent PBKDF2 password hash, to speed
	up repeated SDR operations. r=jcj
	[a06bd0f6bbe8] [tip]

Differential Revision: https://phabricator.services.mozilla.com/D59741

--HG--
extra : moz-landing-system : lando
2020-01-13 17:09:45 +00:00
ffxbld f55cc5e382 No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D59687

--HG--
extra : moz-landing-system : lando
2020-01-13 13:50:15 +00:00
Masatoshi Kimura 77c94aa3e6 Bug 1607652 - Handle non-ASCII profile path correctly when dealing with key3.db and pkcs11.txt on Windows. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D59136

--HG--
extra : moz-landing-system : lando
2020-01-09 20:57:04 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58175

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Dana Keeler 2949126c39 bug 1607845 - regenerate all test certificates before they expire r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D59380

--HG--
extra : moz-landing-system : lando
2020-01-09 21:28:07 +00:00
ffxbld 47f9f24123 No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D59324

--HG--
extra : moz-landing-system : lando
2020-01-09 15:43:49 +00:00
Michael Kaply fcc14ee4a8 Bug 1603221 - Use isCertTrusted instead of asyncVerify to check for policy installed certs. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D59199

--HG--
extra : moz-landing-system : lando
2020-01-08 21:42:18 +00:00
J.C. Jones 390a1a8923 Bug 1606927 - Bug 1602020 - land NSS 4921046404f1 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-07  J.C. Jones  <jjones@mozilla.com>

	* tests/fips/cavs_samples/KBKDF/fax/KBKDFCounter.fax.orig,
	tests/fips/cavs_samples/KBKDF/req/KBKDFCounter.req.orig:
	Bug 1599603 - Remove .orig files accidentally committed in
	4349f611f7b96de63934837d6940095ac1a5db33 r=bustage
	[4921046404f1] [tip]

2020-01-07  Giulio Benetti  <giulio.benetti@benettiengineering.com>

	* cmd/signtool/manifest.mn, lib/ssl/manifest.mn:
	Bug 1603438 - Fix native tools build failure due to lack of zlib
	include dir if external r=jcj

	Add ZLIB_INCLUDE_DIR variable

	On Linux platform[1], the build system forces to use zlib from the
	system instead of compiling the one located intree.

	The following error is raised when the zlib header is installed
	somewhere else than in the default system include path:

	 ssl3con.c:39:18: fatal error: zlib.h: No such file or directory
	#include "zlib.h"

	The same trick setup for sqlite include directory is reproduced for
	zlib. The build system disallows in any manner to give arguments to
	the compiler explicity.

	The variable ZLIB_INCLUDE_DIR point to the directory where the zlib
	header is located.

	[1]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreco
	nf/Linux.mk#l180 [2]: https://hg.mozilla.org/projects/nss/file/NSS_3
	_33_BRANCH/lib/softoken/manifest.mn#l17
	[477d370d1bab]

2020-01-06  Kevin Jacobs  <kjacobs@mozilla.com>

	* cpputil/databuffer.h, cpputil/scoped_ptrs_ssl.h,
	cpputil/tls_parser.h, gtests/ssl_gtest/manifest.mn,
	gtests/ssl_gtest/ssl_aead_unittest.cc,
	gtests/ssl_gtest/ssl_ciphersuite_unittest.cc,
	gtests/ssl_gtest/ssl_drop_unittest.cc,
	gtests/ssl_gtest/ssl_gtest.gyp,
	gtests/ssl_gtest/ssl_masking_unittest.cc,
	gtests/ssl_gtest/ssl_primitive_unittest.cc,
	gtests/ssl_gtest/ssl_record_unittest.cc,
	gtests/ssl_gtest/ssl_recordsize_unittest.cc,
	gtests/ssl_gtest/ssl_tls13compat_unittest.cc,
	gtests/ssl_gtest/tls_agent.cc, gtests/ssl_gtest/tls_filter.cc,
	gtests/ssl_gtest/tls_filter.h, gtests/ssl_gtest/tls_protect.cc,
	gtests/ssl_gtest/tls_protect.h, lib/ssl/dtls13con.c,
	lib/ssl/dtls13con.h, lib/ssl/dtlscon.c, lib/ssl/dtlscon.h,
	lib/ssl/ssl3con.c, lib/ssl/ssl3gthr.c, lib/ssl/ssl3prot.h,
	lib/ssl/sslexp.h, lib/ssl/sslimpl.h, lib/ssl/sslprimitive.c,
	lib/ssl/sslsock.c, lib/ssl/sslspec.c, lib/ssl/sslspec.h,
	lib/ssl/tls13con.c, lib/ssl/tls13con.h:
	Bug 1599514 - Update DTLS 1.3 support to draft-30 r=mt

	This patch updates the DTLS 1.3 implementation to draft version 30,
	including unified header format and sequence number encryption.

	Also added are new `SSL_CreateMask` experimental functions.

	[8b7f0180c5b0]

2020-01-06  Robert Relyea  <rrelyea@redhat.com>

	* cmd/fipstest/fipstest.c, gtests/pk11_gtest/manifest.mn,
	gtests/pk11_gtest/pk11_gtest.gyp, gtests/pk11_gtest/pk11_kbkdf.cc,
	lib/softoken/kbkdf.c, lib/softoken/manifest.mn,
	lib/softoken/pkcs11.c, lib/softoken/pkcs11c.c,
	lib/softoken/pkcs11i.h, lib/softoken/pkcs11u.c,
	lib/softoken/sftkhmac.c, lib/softoken/softoken.gyp,
	lib/util/pkcs11n.h, lib/util/pkcs11t.h,
	tests/fips/cavs_samples/KBKDF/fax/KBKDFCounter.fax,
	tests/fips/cavs_samples/KBKDF/fax/KBKDFCounter.fax.orig,
	tests/fips/cavs_samples/KBKDF/fax/README,
	tests/fips/cavs_samples/KBKDF/req/KBKDFCounter.req,
	tests/fips/cavs_samples/KBKDF/req/KBKDFCounter.req.orig,
	tests/fips/cavs_samples/KBKDF/req/README,
	tests/fips/cavs_scripts/README, tests/fips/cavs_scripts/kbkdf.sh,
	tests/fips/cavs_scripts/runtest.sh:
	This implements NIST SP800-108 Counter, Feedback, and Double
	Pipeline mode KDFs suitable for use in SCP03 and other protocols.
	These KDFs were introduced in PKCS#11 v3.0.

	Resolves: BZ#1599603

	[4349f611f7b9]

2020-01-03  J.C. Jones  <jjones@mozilla.com>

	* automation/abi-check/previous-nss-release, lib/nss/nss.h,
	lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.50 Beta
	[569ca5b163e7]

Differential Revision: https://phabricator.services.mozilla.com/D59210

--HG--
rename : security/nss/gtests/ssl_gtest/ssl_primitive_unittest.cc => security/nss/gtests/ssl_gtest/ssl_aead_unittest.cc
extra : moz-landing-system : lando
2020-01-08 23:46:00 +00:00
Martin Thomson 06d4c069b8 Bug 1606734 - Disable TLS 1.0 and 1.1 by default, r=keeler
Also backs out the changes from Bug 1599756.

Differential Revision: https://phabricator.services.mozilla.com/D58583

--HG--
extra : moz-landing-system : lando
2020-01-07 00:54:27 +00:00
ffxbld 92b26fef5d No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D58770

--HG--
extra : moz-landing-system : lando
2020-01-06 13:40:52 +00:00
J.C. Jones b560bdb144 Bug 1602020 - land NSS NSS_3_49_RTM UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-03  J.C. Jones  <jjones@mozilla.com>

	* lib/nss/nss.h, lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.49 final
	[d41f5350554e] [NSS_3_49_RTM] <NSS_3_49_BRANCH>

2020-01-02  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/ssl_gtest/ssl_version_unittest.cc, lib/ssl/ssl3con.c:
	Bug 1513586 - Set downgrade sentinel for client TLS versions lower
	than 1.2. r=mt

	Per-[[ https://tools.ietf.org/html/rfc8446#section-4.1.3 | RFC 8446
	]], the downgrade sentinel must be set by a TLS 1.3 server (and
	should be set by a TLS 1.2 server) that negotiates TLS 1.0 or 1.1.
	This patch corrects the behavior and adds a test.

	[993717228da0]

2020-01-02  J.C. Jones  <jjones@mozilla.com>

	* .hgtags:
	Added tag NSS_3_49_BETA1 for changeset 9ecd41cd2fa3
	[62d36f2ee1cc]

Differential Revision: https://phabricator.services.mozilla.com/D58655

--HG--
extra : moz-landing-system : lando
2020-01-03 22:13:28 +00:00
Andreas Tolfsen 691d52fe90 bug 1606317: security: allow remote agent to disable security checks; r=keeler
The remote agent is an implementation of a subset of
the Chromium Remote Debugging Protocol (CDP) for Gecko.
For similar reasons as Marionette it needs the ability to call
nsCertOverrideService::SetDisableAllSecurityChecksAndLetAttackersInterceptMyData().

It calls this method from remote/domains/parent/Security.jsm which
implements the Security.setIgnoreCertificateErrors protocol method.

The remote agent is slated to replace Marionette, but there is
currently no timeline for this.

Differential Revision: https://phabricator.services.mozilla.com/D58435

--HG--
extra : moz-landing-system : lando
2020-01-03 13:46:00 +00:00
Andreas Tolfsen a0465d6c54 bug 1606317: security: use nsIMarionette.running() for disable security check; r=keeler
It must only be possible to call
nsCertOverrideService::SetDisableAllSecurityChecksAndLetAttackersInterceptMyData()
when Marionette is actually active, but the MOZ_MARIONETTE environment
variable can in theory be set by any user.

MOZ_MARIONETTE was introduced to support in-application restarts
so that the forked main process knows to re-initialise Marionette.
This makes it approximately equivalent to passing the --marionette flag.

Because Marionette can be started and stopped at runtime through
modifying the marionette.enabled preference, and Marionette never
resets MOZ_MARIONETTE, this makes it theoretically possible that
a future caller could circumvent this security check.

This is however not a security problem at present because the
method is only ever called from within testing/marionette/cert.js,
which itself is never called unless Marionette indeed is active.

Still, it would be safer for this to use nsIMarionette.running()
which returns true whenever the Marionette server is listening for
connections, and false when the Marionette automation protocol is
not enabled.

Differential Revision: https://phabricator.services.mozilla.com/D58434

--HG--
extra : moz-landing-system : lando
2020-01-03 13:46:38 +00:00
Coroiu Cristina 9513ceda80 Backed out 3 changesets (bug 1606317) for build bustage at build/src/security/manager/ssl/nsCertOverrideService.cpp on a CLOSED TREE
Backed out changeset 9c34a0a40e62 (bug 1606317)
Backed out changeset 467db2b310a7 (bug 1606317)
Backed out changeset b12669c3ade7 (bug 1606317)
2020-01-03 15:11:29 +02:00
Andreas Tolfsen bb0887db1e bug 1606317: security: allow remote agent to disable security checks; r=keeler
The remote agent is an implementation of a subset of
the Chromium Remote Debugging Protocol (CDP) for Gecko.
For similar reasons as Marionette it needs the ability to call
nsCertOverrideService::SetDisableAllSecurityChecksAndLetAttackersInterceptMyData().

It calls this method from remote/domains/parent/Security.jsm which
implements the Security.setIgnoreCertificateErrors protocol method.

The remote agent is slated to replace Marionette, but there is
currently no timeline for this.

Differential Revision: https://phabricator.services.mozilla.com/D58435

--HG--
extra : moz-landing-system : lando
2020-01-03 10:16:48 +00:00
Andreas Tolfsen 3d48cf1cf1 bug 1606317: security: use nsIMarionette.running() for disable security check; r=keeler
It must only be possible to call
nsCertOverrideService::SetDisableAllSecurityChecksAndLetAttackersInterceptMyData()
when Marionette is actually active, but the MOZ_MARIONETTE environment
variable can in theory be set by any user.

MOZ_MARIONETTE was introduced to support in-application restarts
so that the forked main process knows to re-initialise Marionette.
This makes it approximately equivalent to passing the --marionette flag.

Because Marionette can be started and stopped at runtime through
modifying the marionette.enabled preference, and Marionette never
resets MOZ_MARIONETTE, this makes it theoretically possible that
a future caller could circumvent this security check.

This is however not a security problem at present because the
method is only ever called from within testing/marionette/cert.js,
which itself is never called unless Marionette indeed is active.

Still, it would be safer for this to use nsIMarionette.running()
which returns true whenever the Marionette server is listening for
connections, and false when the Marionette automation protocol is
not enabled.

Differential Revision: https://phabricator.services.mozilla.com/D58434

--HG--
extra : moz-landing-system : lando
2020-01-03 10:16:35 +00:00
J.C. Jones 956d95c76c Bug 1602020 - land NSS NSS_3_49_BETA1 UPGRADE_NSS_RELEASE, r=kjacobs
2020-01-02  Giulio Benetti  <giulio.benetti@benettiengineering.com>

	* lib/ssl/sslsnce.c:
	Bug 1606025 - Remove -Wmaybe-uninitialized warning in sslsnce.c
	r=jcj

	(Amended by jcj to also set privKeyCopy to NULL)
	[9ecd41cd2fa3] [NSS_3_49_BETA1]

	* lib/freebl/gcm.h:
	Bug 1606119 - Fix PPC HW Crypto build failure r=jcj

	All Altivec *_be() functions are supported from gcc version 8.x not
	5.x so modify gcc version check that at the moment cause build
	failure due to missing Altivec *_be() functions.
	[7ab634a7d772]

2020-01-01  Alex Henrie  <alexhenrie24@gmail.com>

	* cmd/modutil/install-ds.c:
	Bug 1605545 - Fix memory leak in Pk11Install_Platform_Generate. r=mt

	[748b308170a4]

Differential Revision: https://phabricator.services.mozilla.com/D58541

--HG--
extra : moz-landing-system : lando
2020-01-02 17:54:36 +00:00
ffxbld e81b921296 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D58514

--HG--
extra : moz-landing-system : lando
2020-01-02 13:26:27 +00:00
ffxbld cbe062ca0b No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D58244

--HG--
extra : moz-landing-system : lando
2019-12-26 21:30:40 +00:00
Bob Owen 9e974a273b Bug 1605867: Don't duplicate IPC shared memory when we might fail to launch the process correctly. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D58271

--HG--
extra : moz-landing-system : lando
2019-12-26 19:19:49 +00:00
J.C. Jones 75b1a5ab89 Bug 1602020 - land NSS b6eb18f04260 UPGRADE_NSS_RELEASE, r=kjacobs
2019-12-20  J.C. Jones  <jjones@mozilla.com>

	* lib/freebl/verified/FStar.c, lib/freebl/verified/FStar.h,
	lib/freebl/verified/Hacl_Chacha20.c,
	lib/freebl/verified/Hacl_Chacha20.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.h,
	lib/freebl/verified/Hacl_Chacha20_Vec128.c,
	lib/freebl/verified/Hacl_Chacha20_Vec128.h,
	lib/freebl/verified/Hacl_Curve25519.c,
	lib/freebl/verified/Hacl_Curve25519.h,
	lib/freebl/verified/Hacl_Curve25519_51.c,
	lib/freebl/verified/Hacl_Curve25519_51.h,
	lib/freebl/verified/Hacl_Kremlib.h,
	lib/freebl/verified/Hacl_Poly1305_128.c,
	lib/freebl/verified/Hacl_Poly1305_128.h,
	lib/freebl/verified/Hacl_Poly1305_32.c,
	lib/freebl/verified/Hacl_Poly1305_32.h,
	lib/freebl/verified/Hacl_Poly1305_64.c,
	lib/freebl/verified/Hacl_Poly1305_64.h,
	lib/freebl/verified/kremlib.h, lib/freebl/verified/kremlib_base.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/callconv.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/compat.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/target.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/types.h,
	lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h,
	lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128.h, li
	b/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128_Verifie
	d.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt_8_1
	6_32_64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/LowStar_
	Endianness.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar
	_uint128_gcc64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/f
	star_uint128_msvc.h, lib/freebl/verified/libintvector.h,
	lib/freebl/verified/specs/Spec.CTR.fst,
	lib/freebl/verified/specs/Spec.Chacha20.fst,
	lib/freebl/verified/specs/Spec.Curve25519.fst,
	lib/freebl/verified/specs/Spec.Poly1305.fst,
	lib/freebl/verified/vec128.h:
	Backed out changeset c351b2f60b40 (Bug 1574643) for crashes on early
	SSE4 CPUs
	[b6eb18f04260] [tip]

	* automation/saw/chacha20.saw, automation/taskcluster/docker-
	builds/Dockerfile, automation/taskcluster/docker-
	hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc,
	automation/taskcluster/docker-hacl/Dockerfile,
	automation/taskcluster/docker-hacl/bin/checkout.sh,
	automation/taskcluster/docker-hacl/license.txt,
	automation/taskcluster/docker-hacl/setup-user.sh,
	automation/taskcluster/docker-hacl/setup.sh,
	automation/taskcluster/graph/src/extend.js,
	automation/taskcluster/scripts/run_hacl.sh,
	gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	lib/freebl/Makefile, lib/freebl/blapii.h, lib/freebl/blinit.c,
	lib/freebl/chacha20poly1305.c, lib/freebl/det_rng.c,
	lib/freebl/ecl/curve25519_64.c, lib/freebl/freebl.gyp,
	lib/freebl/freebl_base.gypi, nss-tool/hw-support.c:
	Backed out changeset ac51d2490f9c (Bug 1574643) for crashes on early
	SSE4 CPUs
	[f6d8c73584e0]

2019-12-19  Giulio Benetti  <giulio.benetti@benettiengineering.com>

	* coreconf/Linux.mk, coreconf/config.gypi:
	Bug 1602288 - Fix build failure due to missing posix signal.h
	r=kjacobs
	[82bae6299c8e]

2019-12-12  Makoto Kato  <m_kato@ga2.so-net.ne.jp>

	* lib/freebl/blinit.c, lib/freebl/ctr.c, lib/freebl/freebl.gyp,
	lib/freebl/rijndael.c:
	Bug 1588714 - Implement CheckARMSupport for Win64/aarch64. r=kjacobs

	aarch64 doesn't have `cpuid` like instruction set. Actually, we use
	getauxval system call on Linux/aarch64 to check CPU features.

	Windows has `IsProcessorFeaturePresent` API to get CPU features, so
	we should use it to check whether current CPU supports ARM Crypto
	extension.

	[3ba8a584ddea]

Differential Revision: https://phabricator.services.mozilla.com/D58060

--HG--
extra : moz-landing-system : lando
2019-12-20 23:39:43 +00:00
Emilio Cobos Álvarez 43934482ac Bug 1605291 - Fix non-chrooted processes after bug 1603999. r=gsvelto
Bug 1603999 changed the environment so that whether you can enter the chroot is
passed as the first character in the environment variable. This caused all
content processes that don't enter the chroot to crash. This can happen
trivially with any sandbox level < 4.

Differential Revision: https://phabricator.services.mozilla.com/D57927

--HG--
extra : moz-landing-system : lando
2019-12-20 21:19:20 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
J.C. Jones 0f42784b56 Bug 1602020 - land NSS ac51d2490f9c UPGRADE_NSS_RELEASE, r=kjacobs
2019-12-18  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* automation/saw/chacha20.saw, automation/taskcluster/docker-
	builds/Dockerfile, automation/taskcluster/docker-
	hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc,
	automation/taskcluster/docker-hacl/Dockerfile,
	automation/taskcluster/docker-hacl/bin/checkout.sh,
	automation/taskcluster/docker-hacl/license.txt,
	automation/taskcluster/docker-hacl/setup-user.sh,
	automation/taskcluster/docker-hacl/setup.sh,
	automation/taskcluster/graph/src/extend.js,
	automation/taskcluster/scripts/run_hacl.sh,
	gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	lib/freebl/Makefile, lib/freebl/blapii.h, lib/freebl/blinit.c,
	lib/freebl/chacha20poly1305.c, lib/freebl/det_rng.c,
	lib/freebl/ecl/curve25519_64.c, lib/freebl/freebl.gyp,
	lib/freebl/freebl_base.gypi, nss-tool/hw-support.c:
	Bug 1574643 - NSS changes for haclv2 r=jcj,kjacobs

	This patch contains the changes in NSS, necessary to pick up HACL*v2
	in D55413. It has a couple of TODOs:
	* The chacha20 saw verification fails for some reason; it's disabled
	pending Bug 1604130.
	* The hacl task on CI requires Bug 1593647 to get fixed.

	Depends on D55413.

	[ac51d2490f9c] [tip]

	* lib/freebl/verified/FStar.c, lib/freebl/verified/FStar.h,
	lib/freebl/verified/Hacl_Chacha20.c,
	lib/freebl/verified/Hacl_Chacha20.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_128.h,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.c,
	lib/freebl/verified/Hacl_Chacha20Poly1305_32.h,
	lib/freebl/verified/Hacl_Chacha20_Vec128.c,
	lib/freebl/verified/Hacl_Chacha20_Vec128.h,
	lib/freebl/verified/Hacl_Curve25519.c,
	lib/freebl/verified/Hacl_Curve25519.h,
	lib/freebl/verified/Hacl_Curve25519_51.c,
	lib/freebl/verified/Hacl_Curve25519_51.h,
	lib/freebl/verified/Hacl_Kremlib.h,
	lib/freebl/verified/Hacl_Poly1305_128.c,
	lib/freebl/verified/Hacl_Poly1305_128.h,
	lib/freebl/verified/Hacl_Poly1305_32.c,
	lib/freebl/verified/Hacl_Poly1305_32.h,
	lib/freebl/verified/Hacl_Poly1305_64.c,
	lib/freebl/verified/Hacl_Poly1305_64.h,
	lib/freebl/verified/kremlib.h, lib/freebl/verified/kremlib_base.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/callconv.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/compat.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/target.h,
	lib/freebl/verified/kremlin/include/kremlin/internal/types.h,
	lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h,
	lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128.h, li
	b/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt128_Verifie
	d.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/FStar_UInt_8_1
	6_32_64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/LowStar_
	Endianness.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar
	_uint128_gcc64.h, lib/freebl/verified/kremlin/kremlib/dist/minimal/f
	star_uint128_msvc.h, lib/freebl/verified/libintvector.h,
	lib/freebl/verified/specs/Spec.CTR.fst,
	lib/freebl/verified/specs/Spec.Chacha20.fst,
	lib/freebl/verified/specs/Spec.Curve25519.fst,
	lib/freebl/verified/specs/Spec.Poly1305.fst,
	lib/freebl/verified/vec128.h:
	Bug 1574643 - haclv2 code r=kjacobs

	This updates the in-tree version of our existing HACL* code to v2,
	replacing what we have already. Once this landed NSS can pick up
	more (faster) code from HACL*.

	[c351b2f60b40]

Differential Revision: https://phabricator.services.mozilla.com/D57821

--HG--
extra : moz-landing-system : lando
2019-12-19 17:57:08 +00:00
ffxbld 0d4a7ec64a No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D57856

--HG--
extra : moz-landing-system : lando
2019-12-19 19:44:12 +00:00
Thinker Li d5fb470caa Bug 1603999 - Make mozsandbox being preloaded for the fork server. r=gsvelto
- make the fork server use the same sandbox level as content processes to make preloading work correctly.
 - pass |canChroot| through env instead of hard coding.

Differential Revision: https://phabricator.services.mozilla.com/D57221

--HG--
extra : moz-landing-system : lando
2019-12-19 15:47:48 +00:00
Dana Keeler 16434162c5 bug 1603833 - re-purpose unused intermediate preloading failure telemetry categories to investigate failures r=kjacobs,leplatrem
Intermediate preloading telemetry is overwhelmingly "failedToObserve", which at
the moment is a catch-all indicating that something in
updatePreloadedIntermediates failed. We need to figure out why, so this patch
re-purposes the categories "emptyAttachment", "failedToFetch", and
"unexpectedLength", which are currently not used, to indicate failures in
specific sub-operations in that function.

Differential Revision: https://phabricator.services.mozilla.com/D57676

--HG--
extra : moz-landing-system : lando
2019-12-19 10:29:57 +00:00
Dana Keeler b909ee58e2 bug 1602593 - add dedicated thread for osclientcerts OS API calls r=jcj
The OS APIs used by the osclientcerts module aren't guaranteed to be
thread-safe. To deal with this, this patch introduces a dedicated thread to
perform these operations.

Differential Revision: https://phabricator.services.mozilla.com/D56465

--HG--
extra : moz-landing-system : lando
2019-12-18 00:20:28 +00:00
J.C. Jones 50132af158 Bug 1602020 - land NSS fc636973ad06 UPGRADE_NSS_RELEASE, r=kjacobs
2019-11-25  Robert Relyea  <rrelyea@redhat.com>

	* lib/softoken/legacydb/keydb.c, lib/softoken/legacydb/lgcreate.c,
	lib/softoken/legacydb/lgdb.h, lib/softoken/legacydb/lginit.c,
	lib/softoken/lgglue.c, lib/softoken/lowpbe.c, lib/softoken/lowpbe.h,
	lib/softoken/pkcs11c.c, lib/softoken/pkcs11i.h,
	lib/softoken/pkcs11u.c, lib/softoken/sdb.c, lib/softoken/sdb.h,
	lib/softoken/sftkdb.c, lib/softoken/sftkdb.h,
	lib/softoken/sftkdbti.h, lib/softoken/sftkpwd.c, lib/util/pkcs11n.h:
	Bug 1585189 - Changed the algorithm used to encrypt NSS database
	entries, from 3DES to AES256.

	Our NSS DB uses 3DES internally to encrypt their entries. This patch
	changes the default algorithm for AES256 to increase the security.
	This patch also adds code to use AES Wrap in the future. It also
	adds an integrity check to the AES256 CBC. The change only affects
	sqlite databases.

	bob

	[fc636973ad06] [tip]

2019-12-12  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc,
	lib/softoken/pkcs11c.c:
	Bug 1603257 - Fix UBSAN issue in softoken CKM_NSS_CHACHA20_CTR
	initialization r=mt

	This patch adds an explicit cast to fix a UBSAN issue that was
	flagged in https://treeherder.mozilla.org/#/jobs?repo=nss-
	try&selectedJob=280720441.

	It also updates the test to use a random IV.

	[9ca79efd6d29]

2019-12-10  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/ssl_gtest/ssl_hrr_unittest.cc:
	Bug 1590001 - Additional HRR Tests. r=mt

	This patch adds new tests for version limitations after a HRR.

	[8a2bd40e7f89]

2019-12-11  Martin Thomson  <mt@lowentropy.net>

	* gtests/ssl_gtest/ssl_hrr_unittest.cc:
	Bug 1600144 - clang-format, a=bustage
	[014f37ecee3e]

2019-11-29  Martin Thomson  <mt@lowentropy.net>

	* gtests/ssl_gtest/ssl_hrr_unittest.cc, lib/ssl/dtlscon.c:
	Bug 1600144 - Treat ClientHello with message_seq of 1 as a second
	ClientHello, r=kjacobs

	Summary: The logic that deals with stateless HelloRetryRequest in
	DTLS allows this one-off increment to the message_seq field in case
	the server was operating statelessly. However, when it does, it
	should insist on the ClientHello carrying a cookie; concretely, it
	should set the flag that says that a HelloRetryRequest was sent,
	even if it doesn't currently remember that it sent one. That is the
	only way that this condition could be met.

	[f55fe2a2dab9]

2019-12-11  Martin Thomson  <mt@lowentropy.net>

	* gtests/ssl_gtest/tls_esni_unittest.cc:
	Bug 1603027 - clang-format, a=bustage
	[ca9adb8eb899]

2019-12-11  EKR  <ekr@rtfm.com>

	* gtests/ssl_gtest/tls_esni_unittest.cc:
	Bug 1603027 - Check that ESNI gets regenerated with HRR r=mt

	[6655d8a1f4bd]

2019-12-09  Andi-Bogdan Postelnicu  <bpostelnicu@mozilla.com>

	* mach:
	Bug 1598485 - Exclude files that are not part of the nss repository
	from the analysis artifact. r=jcj

	[38a1c27aadf3]

Differential Revision: https://phabricator.services.mozilla.com/D57470

--HG--
extra : moz-landing-system : lando
2019-12-17 18:01:18 +00:00
Emilio Cobos Álvarez 36164b7b54 Bug 1600734 - Fix content sandbox level 1 on linux. r=jld,gcp
Right now we crash on socketpair here:

https://searchfox.org/mozilla-central/rev/04d8e7629354bab9e6a285183e763410860c5006/ipc/chromium/src/chrome/common/ipc_channel_posix.cc#261

As there is no broker.

Differential Revision: https://phabricator.services.mozilla.com/D55532

--HG--
extra : moz-landing-system : lando
2019-12-16 22:35:03 +00:00
J.C. Jones 5615541267 Bug 1602020 - land NSS c46bc59ce7d4 UPGRADE_NSS_RELEASE, r=kjacobs
2019-12-06  Daiki Ueno  <dueno@redhat.com>

	* lib/pki/pki3hack.c:
	Bug 1593167, certdb: propagate trust information if trust module is
	loaded afterwards, r=rrelyea,keeler

	Summary: When the builtin trust module is loaded after some temp
	certs being created, these temp certs are usually not accompanied by
	trust information. This causes a problem in Firefox as it loads the
	module from a separate thread while accessing the network cache
	which populates temp certs.

	This change makes it properly roll up the trust information, if a
	temp cert doesn't have trust information.

	Reviewers: rrelyea, keeler

	Reviewed By: rrelyea, keeler

	Subscribers: reviewbot, heftig

	Bug #: 1593167

	[c46bc59ce7d4] [tip]

2019-11-08  Martin Thomson  <mt@lowentropy.net>

	* lib/ssl/tls13subcerts.c:
	Bug 1594965 - Include saltLength in DC SPKI, r=kjacobs

	Summary: I discovered this when validating new additions to our root
	store policy. The encodings there didn't line up with what we were
	producing with DC.

	[661058254ade]

2019-12-04  J.C. Jones  <jjones@mozilla.com>

	* automation/release/nss-release-helper.py:
	Bug 1535787 - Further improvements to the release-helper API r=mt

	[7baba392bf8b]

	* automation/release/nss-release-helper.py:
	Bug 1535787 - flake8 style updates to nss-release-helper.py
	r=kjacobs

	Depends on D23757

	[b31e68a789fa]

	* automation/release/nss-release-helper.py:
	Bug 1535787 - Use Python for the regexes in nss-release-helper
	r=keeler,kjacobs

	automation/release/nss-release-helper.py doesn't actually edit the
	files correctly on MacOS due to differences between GNU and BSD sed.
	It's python, so let's just use python regexes.

	[92271739e848]

2019-12-04  Franziskus Kiefer  <franziskuskiefer@gmail.com>

	* automation/taskcluster/graph/src/extend.js,
	automation/taskcluster/graph/src/queue.js,
	automation/taskcluster/scripts/check_abi.sh, build.sh,
	coreconf/config.gypi, help.txt, lib/freebl/freebl_base.gypi, mach,
	tests/all.sh, tests/common/init.sh, tests/remote/Makefile:
	Bug 1594933 - disable libnssdbm by default; keep build on CI, r=jcj

	Disale libnssdbm by default and add flag to enable it in builds. On
	CI a build and certs test with enabled legacy DB are added.

	Note that for some reason the coverage build fails. I have no idea
	why. I'm open for ideas.

	[c1fad130dce2]

2019-12-03  Makoto Kato  <m_kato@ga2.so-net.ne.jp>

	* lib/freebl/Makefile, lib/freebl/freebl.gyp, lib/freebl/gcm-
	arm32-neon.c, lib/freebl/gcm.c:
	Bug 1562548 - Improve GCM perfomance on aarch32 using NEON.
	r=kjacobs

	Optimize GCM perfomance using
	https://conradoplg.cryptoland.net/files/2010/12/gcm14.pdf via ARM's
	NEON.

	[a9ba652046e6]

2019-12-03  J.C. Jones  <jjones@mozilla.com>

	* automation/abi-check/expected-report-libssl3.so.txt, automation/abi-
	check/previous-nss-release, lib/nss/nss.h, lib/softoken/softkver.h,
	lib/util/nssutil.h:
	Set version numbers to 3.49 beta
	[3051793c68fc]

2019-12-02  J.C. Jones  <jjones@mozilla.com>

	* .hgtags:
	Added tag NSS_3_48_BETA1 for changeset 77976f3fefca
	[06d5b4f91a9c]

Differential Revision: https://phabricator.services.mozilla.com/D56378

--HG--
extra : moz-landing-system : lando
2019-12-16 20:53:59 +00:00