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

210 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 6df09f9c4c Bug 1656285 - libmar: Avoid clobbering ftello() and fseeko() declarations in MinGW's stdio.h. r=mhowell
Include stdio.h before redefining ftello and fseeko to avoid clobbering the ftello() and fseeko() function declarations in MinGW's stdio.h.

I don't know why my change to compile libmar as C11 (bug 1653182) caused this ftello/fseeko problem. From my inspection of MinGW's stdio.h, this problem should have already been happening!

Differential Revision: https://phabricator.services.mozilla.com/D85665
2020-08-03 16:05:49 +00:00
Chris Peterson fd3e777d61 Bug 1652914 - Part 1: Replace MOZ_STATIC_ASSERT with static_assert in C code. r=jwalden
static_assert is available in both C++11 and C11. While C++11's static_assert is a keyword, C11's static_assert is a macro defined in assert.h (that expands to the C11 keywoard _Static_assert). libar's header files are included in both C and C++ code, so we must #include assert.h to use static_assert.

https://en.cppreference.com/w/c/language/_Static_assert

Differential Revision: https://phabricator.services.mozilla.com/D83736
2020-07-17 02:48:19 +00:00
Brindusan Cristian 56bb74ea8e Backed out changeset 3ebab9ec3685 (bug 1653182) as requested by cpeterson for being a duplicate patch. CLOSED TREE 2020-07-30 09:02:15 +03:00
Chris Peterson 623b18b9f5 Bug 1653182 - Part 1: Compile libmar as C11. r=nalexander,mhowell
Compile libmar as C11 so we can replace MOZ_STATIC_ASSERT() with static_assert() (bug 1652914).

Differential Revision: https://phabricator.services.mozilla.com/D85119
2020-07-29 19:12:20 +00:00
Chris Peterson cbf9e68b2f Bug 1653182 - Part 1: Compile libmar as C11. r=nalexander,mhowell
Compile libmar as C11 so we can replace MOZ_STATIC_ASSERT() with static_assert() (bug 1652914).

Differential Revision: https://phabricator.services.mozilla.com/D85119
2020-07-29 19:12:20 +00:00
Molly Howell fea4aee447 Bug 1653371 - Don't used a signed type for a length parameter. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D84031
2020-07-17 22:25:54 +00:00
Stephen A Pohl 5ca302917c Bug 1583854: Fix a build issue that prevented builds with the macOS 10.15 SDK from succeeding. Based on a patch by Pete Collins. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D64447

--HG--
extra : moz-landing-system : lando
2020-02-27 19:26:18 +00:00
J.C. Jones 942507de3e Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-16 17:35:49 +00:00
Csoregi Natalia 5f6f55422f Backed out changeset 5c137b3793a7 (bug 1594931) for failures on test_sdr_preexisting.js. CLOSED TREE
--HG--
rename : security/manager/ssl/tests/unit/test_broken_fips/key4.db => security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db
2019-12-16 18:52:41 +02:00
J.C. Jones 4916451c01 Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-14 18:52:26 +00:00
Andreea Pavel 1adff31cb1 Backed out changeset 7d55de92c194 (bug 1594931) for failing xpcshell at test_sdr_preexisting.js on a CLOSED TREE
--HG--
rename : security/manager/ssl/tests/unit/test_broken_fips/key4.db => security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db
2019-12-13 22:48:02 +02:00
J.C. Jones 515c7f644c Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change removes the legacy libnssdbm database that we migrated away from since Firefox 60.

This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password. It otherwise removes support for libnssdbm everywhere in Gecko.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-13 19:00:35 +00:00
Tom Prince 4ace92a861 Bug 1577760: Don't compile in version of mar-channel-id in `mar` tool; r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D44157

--HG--
extra : moz-landing-system : lando
2019-09-06 18:37:14 +00:00
Sylvestre Ledru 645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Mike Hommey 9f33118c8c Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

... except when building the newly added tools/update-packaging,
which builds the mar tool as a standalone thing, and building signmar
as well causes complications.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 19:01:03 +00:00
Mike Hommey 2e02a47093 Bug 1562952 - #ifdef-out NSS and certificate-related flags with NO_SIGN_VERIFY. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D36991

--HG--
extra : moz-landing-system : lando
2019-07-11 21:08:47 +00:00
Bogdan Tara 4d6dbdf94c Backed out 2 changesets (bug 1562952) for causing mar-tools failures a=backout
Backed out changeset 6b09d4c0868c (bug 1562952)
Backed out changeset 250696e18e7d (bug 1562952)
2019-07-12 00:04:53 +03:00
Mike Hommey c957b25a9f Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 06:09:02 +00:00
Mike Hommey 2722dc474d Bug 1562952 - #ifdef-out NSS and certificate-related flags with NO_SIGN_VERIFY. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D36991

--HG--
extra : moz-landing-system : lando
2019-07-10 15:17:53 +00:00
Andreea Pavel 5d60cdbd27 Backed out 2 changesets (bug 1562952) for failing xpcshell at test_create.js on a CLOSED TREE
Backed out changeset 12099ffad9ca (bug 1562952)
Backed out changeset fc4a6e8f6e34 (bug 1562952)
2019-07-10 11:06:58 +03:00
Mike Hommey 1c3ea4d6bf Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

--disable-verify-mar is kept to still allow to disable mar verification in
the updater for debugging purpose.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 03:17:26 +00:00
Mike Hommey d1a8b5ca20 Bug 1562952 - #ifdef-out NSS and certificate-related flags with NO_SIGN_VERIFY. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D36991

--HG--
extra : moz-landing-system : lando
2019-07-10 06:52:57 +00:00
Sylvestre Ledru 49c4fc149d Bug 1563903 - Reformat libmar to the coding style r=Ehsan
Depends on D37152

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

--HG--
extra : moz-landing-system : lando
2019-07-08 15:38:50 +00:00
Victor Porof 8c3cfe4881 Bug 1561435 - Format modules/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 3faab607a196e49a51059a8639b8e44afb078edc
2019-07-05 10:54:01 +02:00
Kathy Brade 2bc2db8906 Bug 1561636 - intermittent updater failures on Win64 (Error 19) r=rstrong
Avoid MinGW's _ftelli64() and _fseeki64() implementations because they
are unreliable.

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

--HG--
extra : moz-landing-system : lando
2019-06-27 09:11:48 +00:00
Mike Hommey fdf0cf5124 Bug 1547217 - Reshuffle how verifymar is linked. r=chmanchester
The conditions under which verifymar is built were not aligned with what
kind of setups are actually doing something. For instance
--disable-signmar --enable-verify-mar was building the verifymar library
but not doing anything with it.

OTOH, building with --enable-signmar --disable-verify-mar did build it
but its code was eliminated at link time because it's unused.

Finally, the conditions between modules/libmar/verify/moz.build and
toolkit/mozapps/update/updater/updater-common.build weren't aligned and
broke some non-Linux tier-3 platforms. We remedy the latter by moving
the flags and libraries verifymar needs to verifymar, so that things
that link verifymar inherit them.

And while in the vicinity, replace a use of NSPR_LIBS with the
pseudo-library `nspr` which has the same effect.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 23:26:40 +00:00
Ian Moody 17422d41ac Bug 1539176 - modules/ manual ESLint no-throw-literal fixes. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D25651

--HG--
extra : moz-landing-system : lando
2019-04-02 13:41:10 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Ya'ar Hever 531ae2db82 Bug 1501932 - Enable ESLint for modules/ (automatic changes). r=njn,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D14645

--HG--
extra : moz-landing-system : lando
2019-02-15 20:03:05 +00:00
Robert Strong 954bce564e Bug 1514532 - followup comment format fix. r=me 2018-12-17 11:43:11 -08:00
Robert Strong 6468b181f7 Bug 1514532 - the modules/libmar directory isn't clang formatted and there are a few deprecation warnings in app update code. r=mhowell
Added defines to mar_extract.c, mar_read.c, bsdiff.c so they use the ISO C and C++ conformant name.
Ran clang format on bspatch.cpp and the files under modules/libmar except for nss_secutil.c and nss_secutil.h since they are copies of nss code.
2018-12-17 11:17:21 -08:00
June Wilde 3dba77a779 Bug 1468556 - Protect against overlapping files in libmar; r=mhowell
Disallows files from referencing the same bytes in the content blocks of a MAR
file by storing a list of structs containing a file's byte offsets and lengths.
A list was chosen since the cap of 256 files wouldn't produce considerable
overhead when extracting/reading/searching/etc through the archive.

Removing the ability for a MAR file to reference the same content block
repeatedly seems like a better solution than what was suggested in the BLRG
report. (limiting the number of files or checking for overly large
decompressed files)

Allows us to prohibit this type of file bomb while only losing an attribute
of the MAR file format that wasn't being leveraged. The fix is applied in
mar_enum_items and mar_find_item so that the manifest the updater uses is
equally safeguarded as the mar host tool.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 17:25:24 +00:00
June Wilde 337c696973 Bug 1468542 - Restrict acceptable bounds for i in nss_secutil; r=rstrong
Summary:
Adds some missing braces on if structures
Adds a check for i being larger or equal to nb

Reviewers: rstrong

Reviewed By: rstrong

Bug #: 1468542

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

--HG--
extra : rebase_source : 51a99f5376ed8877162e82b6c15f147df81981f8
2018-11-19 20:57:50 +02:00
June Wilde 64fa52c710 Bug 1468544 - Replace mar_hash_name with CityHash algorithm. r=rstrong
Make CityHash64, CityHash64WithSeed, and CityHash64WithSeeds usable from C code
Remove unnecessary includes from mar_read.c as well
Add DisableStlWrapping to mar tool's moz.build to fix linkage break when
building in Windows with MSVC

Differential Revision: https://phabricator.services.mozilla.com/D10774
2018-11-06 13:34:21 -05:00
June Wilde cc0933a625 Bug 1468539 - Limit libmar from reading more than a single Additional_Section. r=mhowell
Only a single type of additional block has ever been defined for the MAR
archive format and only a single block of that type is needed per file.
Limiting ourselves to reading only that until we define more seems
sensible.

Move additionalBlockSize check before first fread
Add MAXADDITIONALBLOCKSIZE as a constant for checking block sizes

Differential Revision: https://phabricator.services.mozilla.com/D10797
2018-11-05 21:29:42 -05:00
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Alex Gaynor c60557350c Bug 1497937 - fixed a deprecation warning due to including an older header; r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D8561

--HG--
extra : moz-landing-system : lando
2018-10-23 16:47:30 +00:00
June Wilde 6b5c6e91be Bug 1458129 - Prevent double free in mar_sign.c. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D8924
2018-10-18 13:29:08 -04:00
Sylvestre Ledru aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Matt Howell 3eedff1868 Bug 1473113 - Defer initializing the MAR index until it's needed. r=rstrong
--HG--
extra : source : 6ea6dde8422f745f10dbc004293d1c1bc96e6b8e
2018-07-11 10:12:08 -07:00
Ted Mielczarek dcdf597820 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Gurzau Raul bbe856eaf5 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Ted Mielczarek 2a410dbcc3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e

--HG--
extra : rebase_source : 9140be949b206bb595d9188ce7e8357347ecd9a9
2018-01-10 14:26:12 -05:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Matt Brubeck 0875e0c11c Bug 1407014 - Fix typo in CyprtoAPI_VerifySignature function name. r=rstrong
MozReview-Commit-ID: 9K61LOVzTrJ

--HG--
extra : rebase_source : f8140a8dc999c1c951d781c0f0edb42df712df3f
2017-10-09 11:57:43 -07:00
Cosm d4680517be Bug 1396795 - mar_read_product_info_block: Value stored to 'location' is never read. r=rstrong 2017-09-05 22:53:16 -07:00
Tom Ritter 24a5f680de Bug 1392626 Fix warning about unused consoleName r=rstrong
MozReview-Commit-ID: IRPnvHfELqs

--HG--
extra : rebase_source : 3618723f3650185592b2db56deec9bd55df9b5a7
2017-08-22 09:09:59 -05:00
Robert Strong 7b64a51b7d Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 3 - libmar test extracted SHA384 signatures from the test mar files. r=mhowell, a=app_update_sha384 2017-07-30 23:27:36 -07:00