Commit Graph

4283 Commits

Author SHA1 Message Date
David Keeler
247986c342 bug 1298056 - fix HSTS preload update script so it will continue when requests result in errors r=jcj DONTBUILD NPOTB a=KWierso
MozReview-Commit-ID: b697Aa4iqQ

--HG--
extra : amend_source : 96e9e1c05520fab13f79990a99a4c507fe83fd44
2016-08-26 14:18:39 -07:00
Ryan VanderMeulen
69113163cf Merge m-c to inbound. a=merge 2016-08-24 09:09:05 -04:00
David Keeler
de93e5e361 bug 1296619 - add a test to ensure that prompting for the master password probably works r=Cykesiopka
MozReview-Commit-ID: 5p5Pn5Mk1km

--HG--
extra : rebase_source : e6ca122e4000048aad6fcde377ae25c51ece343f
2016-08-18 15:31:56 -07:00
Cykesiopka
ba96e52654 Bug 1296219 - Use the Mozilla Base64 functions instead of the NSPR ones in PSM. r=keeler
NSPR should generally be avoided in favour of modern C++ code.

This patch does not convert uses of the NSS Base64 functions. It does however
take the opportunity to switch over some IDL functions to use the safer Mozilla
string classes, and fixes Bug 1251050 along the way.

MozReview-Commit-ID: CM8g9DzIcnC

--HG--
extra : rebase_source : 9d07db1bcefc9d9ed6a1f7e102f5c01bd9caa522
2016-08-23 13:29:15 +08:00
Cykesiopka
a16f7b0f6a Bug 1296316 - Convert nsNSSShutDownObject::CalledFromType to an enum class. r=mgoodwin
enum classes are in general safer than plain enums, and as such should be
preferred.

MozReview-Commit-ID: 1FK89SNhdk4

--HG--
extra : rebase_source : 764c4855026c02d8c9e33ca33637fec54ea5ca31
2016-08-20 23:00:19 +08:00
Dragana Damjanovic
3cf6ee23d9 Bug 1264578 - NSS support for http with TLS 1.3. r=keeler
--HG--
extra : rebase_source : 26b322f6d6f8e0160087c5214024dc9cccd328f9
2016-08-19 05:01:00 -04:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Wes Kocher
bb22cc4067 Merge inbound to central, a=merge 2016-08-19 18:16:20 -07:00
Cykesiopka
a2072b8e93 Bug 1275841 - Make nsISecretDecoderRing.idl encryptString() and decryptString() use the Mozilla string classes. r=keeler
The Mozilla string classes don't require manual memory management and
automatically keep track of length, making them a safer choice than raw C
strings.

MozReview-Commit-ID: EwCiiP9EhDr

--HG--
extra : transplant_source : %05%D4%B6s%C1%DBye%2C3%C3%85%DB%22%91h%B4%27%E1l
2016-08-19 09:37:48 +08:00
Cykesiopka
a120c3d754 Bug 1275841 - Remove unnecessary methods and interfaces from nsISecretDecoderRing.idl. r=keeler
1. encrypt() and decrypt() are C++ only.
The only callers are in SecretDecoderRing.cpp, and binary add-ons aren't
supported anymore. So, there is no need for these methods to be defined in the
IDL, and they should be treated as private to the nsISecretDecoderRing
implementation.

2. nsISecretDecoderRingConfig has never been implemented.
The interface and implementation are currently just bloat. If there is a need
for specifying the window for prompts in the future, a better way can be devised
then.

MozReview-Commit-ID: 1wXCDTIBJA2

--HG--
extra : transplant_source : %D7%27%5E3%BF%E9%16%0E%A3%8B%E1%8E%ADj%3F%25%B3i%9Al
2016-08-19 09:37:43 +08:00
Cykesiopka
1f4d5333d5 Bug 1275841 - Move nsISecretDecoderRing.idl from netwerk/ to security/manager/ssl. r=mcmanus
The interfaces defined within have basically nothing to do with Necko.

MozReview-Commit-ID: 5J4D3w61Yry

--HG--
rename : netwerk/base/nsISecretDecoderRing.idl => security/manager/ssl/nsISecretDecoderRing.idl
extra : transplant_source : %AAP%26%5D%DE%ED%F6Q%C4%5Eia%F1%84T%8D%A7E%8Aw
2016-08-19 09:37:38 +08:00
Cykesiopka
986f32c262 Bug 1275841 - Rename nsSDR.(cpp|h) to SecretDecoderRing.(cpp|h). r=keeler
There are currently two ways of naming files containing the implementation of
interface nsIFoo:
1. nsFoo.(cpp|h) (previous convention)
2. Foo.(cpp|h) (new convention)

nsSDR.(cpp|h) matches neither of these. Renaming the files to follow convention
makes it easier to discover what the files implement, and increases codebase
consistency.

MozReview-Commit-ID: 3ThPxPouiie

--HG--
rename : security/manager/ssl/nsSDR.cpp => security/manager/ssl/SecretDecoderRing.cpp
rename : security/manager/ssl/nsSDR.h => security/manager/ssl/SecretDecoderRing.h
extra : transplant_source : %7D%FC%AD%9C%E8%AD%CFz%FE%F2%D6%1E%A0%0A%06sk%3D%AD%AC
2016-08-19 09:36:53 +08:00
Robert Strong
2719d42c9a Bug 1182352 nsISecurityUITelemetry.idl - Remove custom cert check code from app update. r=dveditz 2016-08-18 10:34:18 -07:00
Sebastian Hengst
e50251a747 Backed out changeset 80942fb9a0f1 (bug 1264578) 2016-08-18 17:28:09 +02:00
Cykesiopka
a4ee314af5 Bug 1296218 - Clean up PK11PasswordPromptRunnable::RunOnTargetThread(). r=keeler
MozReview-Commit-ID: Bhp192YgldD

--HG--
extra : rebase_source : 918aa393c22cb409265f6e5b004e30f8cceec3fe
2016-08-19 22:16:00 +08:00
Dragana Damjanovic
4cf673afa8 Bug 1264578 - NSS support for http with TLS 1.3. r=keeler
--HG--
extra : rebase_source : ed323e68723ecbe2687dcc23acd279a64225c5ba
2016-08-17 13:57:00 -04:00
Wes Kocher
45575a7f86 Merge m-c to autoland, a=merge
a=release for the webidl hook for a comment-only change

--HG--
extra : amend_source : e590e515ab273d097f88b35be0e5c999502ebdf4
2016-08-16 22:07:30 -07:00
Wes Kocher
48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Nicholas Nethercote
ca40b738e4 Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.

--HG--
extra : rebase_source : f82426e7584d0d5cddf7c2524356f0f318fbea7d
2016-08-12 15:19:29 +10:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Cykesiopka
cb172720f2 Bug 623917 - Add basic client authentication tests. r=keeler
This patch adds tests for the core aspects of the client authentication code,
mainly to ensure the client auth process even works.

MozReview-Commit-ID: DzV4BuwlrDE

--HG--
extra : rebase_source : 43224d3159964f02b175e8c54491b2cabba2cb8a
2016-08-12 16:36:43 +08:00
Wes Kocher
88bc8189f9 Merge m-c to autoland, a=merge 2016-08-15 14:54:25 -07:00
Cykesiopka
9529f2321e Bug 1294011 - Obviate manual calls to SECITEM_FreeItem() in PSM. r=keeler
MozReview-Commit-ID: 7RNV0YNraBx

--HG--
extra : rebase_source : bd4c8981b52e3f5a504fc09958872415cf757eff
2016-08-13 21:45:00 +08:00
Cykesiopka
2c9b1285df Bug 1289455 - Obviate manual CERT_DestroyCertificate() calls in PSM. r=dkeeler
MozReview-Commit-ID: Aoi1VWvkNjp

--HG--
extra : transplant_source : B%8F9%E7%E8%84%7D%D1%7B%5Due%ED%9A%E8%DE%05%5B%E2D
2016-08-05 23:57:44 +08:00
J.C. Jones
afe8f0c2f8 Bug 1273475 - use release assertions for PSM->NSS shutdown. r=ttaubert
Update the prior patch to use MOZ_RELEASE_ASSERT so that we cleanly crash
if there's still an error somewhere in this logic, instead of deadlocking
on beta (but crashing on aurora).

MozReview-Commit-ID: InttEcC55Dn

--HG--
extra : rebase_source : c79726acbaf1eb8374500f43cd3c7d33362466ad
2016-08-05 14:47:23 -07:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Nicholas Nethercote
bb1d1454ea Bug 1275309 (part 4) - Inline nsSecretDecoderRing::{decode,encode}. r=cykesiopka.
--HG--
extra : rebase_source : 6328c6e0dd211e43b5d171df50c6079853e6b15a
2016-08-04 11:53:09 +10:00
Nicholas Nethercote
afef61ac1b Bug 1275309 (part 3) - Use unsigned integers for lengths in nsSecretDecoderRing. r=cykesiopka.
This avoids the need for some range checks and some casts.

--HG--
extra : rebase_source : e4dc7647791236085fdf65beda82ce063042d182
2016-08-04 11:53:07 +10:00
Nicholas Nethercote
f02b5adb6c Bug 1275309 (part 2) - Use Base64Decode() in nsSecretDecoderRing::decode(). r=cykesiopka.
This mirrors the changes made to encoding in bug 1273711.

--HG--
extra : rebase_source : 3976f9888f05a588549fd6c309fc451a020aa9e9
2016-08-04 11:53:06 +10:00
David Cook
7d4c71cc9c Bug 1115718 - Check for empty issuer name in mozilla::pkix; r=keeler
MozReview-Commit-ID: 6Ymgo7dQE7b

--HG--
extra : rebase_source : 54ee27fd46c2139125a40deabb11a6aca04c84bc
2016-07-28 20:36:18 -05:00
David Keeler
d922ace809 Bug 1273475 - fix deadlock and potential crash when PSM shuts down NSS. r=ttaubert, r=jcj
This fixes two issues:
1. nsNSSShutDownList::evaporateAllNSSResources could deadlock by acquiring
sListLock and then the singleton's mNSSActivityStateLock in
nsNSSActivityState::restrictActivityToCurrentThread.

2. Calling UnloadLoadableRoots before
nsNSSShutDownList::evaporateAllNSSResources could result in removing modules
that were still in use, causing assertion failures and potential crashes.

MozReview-Commit-ID: 8ZgZTVw7sWh

--HG--
extra : rebase_source : 43452add4612b3d12c2b877c3a38169c9676f445
2016-08-02 12:16:37 -07:00
Tom Schuster
473d3dc22d Bug 1197324 - Fix new warnings. r=froydnj 2016-08-03 14:37:31 +02:00
David Keeler
a033a593cb bug 1119778 - make "Forget About This Site" clear HSTS and HPKP info r=MattN,mgoodwin
MozReview-Commit-ID: IJVQBsryfHq

--HG--
extra : rebase_source : c8d3c431ee44112985d53907e3e3e83d80108805
2016-07-27 17:11:52 -07:00
Thomas Wisniewski
6a1fb99d2b Bug 709991 - Fire onerror instead of throwing on network errors for async XHRs. r=bz 2016-07-30 00:24:56 -04:00
Makoto Kato
2e27b62687 Bug 1288644 - Don't define RTLD_NOLOAD when __ANDROID_API__ >= 21. r=glandium
MozReview-Commit-ID: AUEQjIBk50H

--HG--
extra : rebase_source : 6ce4e2d3537951054432ce2a9689222a8923f69a
2016-07-22 16:40:21 +09:00
Cykesiopka
13116b6d68 Bug 1289151 - Remove obsolete nsIWalletService related code. r=jcj
It appears the wallet code was not included during the initial 2007 import of
code from CVS to Mercurial, so anything referencing wallet has been dead code
ever since.

MozReview-Commit-ID: BRTd1M0DsT0

--HG--
extra : transplant_source : %BC%FC%05%AE%B5%8C%DC%21J%DC%B4%B17M%19%AA%F3%B9%05L
2016-07-27 01:53:20 +08:00
Cykesiopka
4a43c75897 Bug 1287290 - Use ScopedAutoSECItem in PSM more. r=dkeeler
ScopedAutoSECItem is useful for:
1. Removing manual memory management.
2. Getting rid of this pattern:
   > UniqueSECItem item(SECITEM_AllocItem(nullptr, nullptr, 0));
   While this pattern works, ScopedAutoSECItem is slightly superior in that it
   doesn't unnecessarily cause a SECItem to be allocated from the heap.

MozReview-Commit-ID: 8DPD9gtzeru

--HG--
extra : transplant_source : %10l%27C%12%3E%08%85q%06%1A%FC%FB%DE%F9%A3%99%0AN%A1
2016-07-25 15:06:34 +08:00
Cykesiopka
8297eb8984 Bug 1281665 - Change nsIClientAuthDialogs.chooseCertificate() to use hostname instead of CN. r=keeler
chooseCertificate() currently uses a concatenation of the Common Name of the
server cert and the port of the server to allow the user to identify the server
requesting client authentication. Unfortunately, this approach is flawed, since
it doesn't take into account things like SAN entries, which might be very
different from the CN.

Using the hostname instead avoids this problem.

MozReview-Commit-ID: 6XjGCknWNi9

--HG--
extra : transplant_source : k%10N%7B%E8%A4%9B%C9%9A%23Q%D1%99%D2%A3%C0.%2B%7F%A5
2016-07-26 20:16:58 +08:00
Iris Hsiao
caea40742f Backed out changeset 8dc198cd46ff (bug 1246540) for Mochitest failures 2016-07-27 13:14:07 +08:00
Kate McKinley
c6650db185 Bug 1246540 HSTS Priming Proof of Concept
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

(r=ckerschb,r=mayhemer,r=jld,r=smaug,r=dkeeler,r=jmaher,p=ally)
2016-07-26 13:03:00 +08:00
Iris Hsiao
a7c8429fc4 Backed out changeset d7e39be85498 (bug 1246540) for Mochitest failures 2016-07-27 11:15:52 +08:00
Kate McKinley
567ebcf321 Bug 1246540 - HSTS Priming Proof of Concept. r=ckerschb, r=mayhemer, r=jld, r=smaug, r=dkeeler, r=jmaher, p=ally
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.
2016-07-26 13:03:00 -04:00
Carsten "Tomcat" Book
25aa8617fc Backed out changeset 1825b8fa636a (bug 1246540) for bustage
--HG--
extra : rebase_source : 45defacae713b2c2f75813fea6f2f289ebc481cd
2016-07-26 12:52:15 +02:00
Kate McKinley
01cbd73591 Bug 1246540 - HSTS Priming Proof of Concept. r=ckerschb,r=mayhemer,r=jld,r=smaug,r=dkeeler,r=jmaher,p=ally
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

(r=ckerschb,r=mayhemer,r=jld,r=smaug,r=dkeeler,r=jmaher,p=ally)
2016-07-25 12:37:00 +02:00
Franziskus Kiefer
249fa77287 Bug 1263793 - update SAN, r=mgoodwin,ulfr
MozReview-Commit-ID: HtMKl2gP1xi

--HG--
extra : rebase_source : 5173dda521679b2ce6c8caabb3b54cce4f658640
2016-07-25 09:44:19 +02:00
Carsten "Tomcat" Book
0a5622c093 Backed out changeset 640247e978ba (bug 1246540) for bustage 2016-07-24 15:59:31 +02:00
Kate McKinley
547500d5a7 Bug 1246540 - HSTS Priming Proof of Concept. r=honzab
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

(r=ckerschb,r=mayhemer,r=jld,r=smaug,r=dkeeler,r=jmaher,p=ally)
2016-07-22 18:35:00 +02:00
David Keeler
f3ec60ef5f backout changeset 1a1d7ef3cb0e (bug 1279479) for causing WebRTC compatibility issues
The WebRTC implementation inherits cipher suite preferences from PSM and then
enables a few mandatory ones and disables a number of undesirable ones. If PSM
makes a change to a cipher suite preference that isn't in WebRTC's whitelist or
blacklist, compatibility issues can arise. See bug 1288246 for an example.

--HG--
rename : security/manager/ssl/tests/unit/test_fallback_cipher.js => security/manager/ssl/tests/unit/test_weak_crypto.js
2016-07-22 10:31:34 -07:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Franziskus Kiefer
dd5231632f Bug 1263793 - Using content signature verifier for verifying remote newtab, r=keeler,mayhemer
MozReview-Commit-ID: ABXYYseKImq

--HG--
extra : rebase_source : 79614e5215e738dff9683ad447245bd830c887bf
2016-05-19 10:59:48 +02:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Wes Kocher
e2d9911273 Backed out changeset 21d8bb5af7b4 (bug 1263793) for leaks in various jobs CLOSED TREE 2016-07-20 11:16:37 -07:00
Franziskus Kiefer
9b9c643025 Bug 1263793 - Using content signature verifier for verifying remote newtab, r=keeler,mayhemer
MozReview-Commit-ID: CHUPgBr8WaC

--HG--
extra : rebase_source : 969bd058a157c7307b7a4d3c2a4c5d62e82b7489
2016-05-19 10:59:48 +02:00
Thomas Zimmermann
4bee1b2945 Bug 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj
MozReview-Commit-ID: 4RBeHDyhQgr
2016-07-20 17:29:36 +02:00
Masatoshi Kimura
c37817e366 Bug 1250582 - Remove SSL_FALLBACK_LIMIT_REACHED telemetry. r=keeler
Bug 1084025 added this telemetry to measure the impact of bumping the fallback limit.
But we already bumped the fallback limit to TLS 1.2 long before. We will not need this kind of telemetry until we bump the fallback limit to TLS 1.3 that will not happen in the near future. So let's just remove wasting resource for now.

MozReview-Commit-ID: 22o8FirlYql

--HG--
extra : rebase_source : c04b6a7aa7bf8970b22c24dcb1d8f0184330cb43
2016-07-16 14:16:06 +09:00
David Keeler
56d2f86c86 bug 1284946 - remove usages-related APIs from nsIX509Cert r=Cykesiopka,Felipe,jcj
nsIX509Cert provided the APIs getUsagesArray, requestUsagesArrayAsync, and
getUsagesString. These APIs were problematic in that the synchronous ones would
cause certificate verification to block the main thread and the asynchronous one
was needlessly indirect in its definition (it made use of two additional
special-case xpidl types) and needlessly complex in its implementation (it
required nsNSSComponent to manually manage a background thread without the aid
of recent improvements in that area (e.g. CryptoTask)). Furthermore, these APIs
would return string descriptions of the usages the certificate in question had
been verified for rather than using more concrete identifiers or values. This
paradigm is usable but imprecise. The new nsIX509CertDB API
asyncVerifyCertAtTime is much more expressive, enforces off-main-thread
computation, and makes use of CryptoTask for a simple implementation. Using this
API, previous uses of the old nsIX509Cert APIs can be replaced. As an additional
benefit, this removes a ton of obsolete C++ code.

MozReview-Commit-ID: KXVTcjAKehu

--HG--
extra : rebase_source : 50c51f73b2b61ed0ad4dc9702cc5df470ce998bc
2016-07-06 14:45:36 -07:00
David Keeler
16124386f7 bug 1284946 - fix dialog parameter passing in browser_certViewer.js r=Cykesiopka
The changes in bug 1217602 missed that browser_certViewer.js should have been
updated to use a nsIDialogParamBlock instead of a (mock) nsIPKIParamBlock.
"Luckily" the test harness completely ignored the errors resulting from this
oversight.

MozReview-Commit-ID: JlA62L5PPW8

--HG--
extra : rebase_source : ec06cd026f3aec8cc7a7c032cd1c9a9c5a8e9536
2016-07-07 11:14:17 -07:00
Cykesiopka
97767e3585 Bug 1284438 - Enable more ESLint rules for PSM. r=mgoodwin
PSM JS code already pass these rules, so enabling these rules will just help
catch future bugs.

MozReview-Commit-ID: AXM2VoG8jBP

--HG--
extra : transplant_source : 4h%89%5BV7%C6%FB%B2%80%CE%B16%DC%22%BA%20%09%FB%92
2016-07-06 01:59:03 +08:00
Carsten "Tomcat" Book
8262976cf1 merge fx-team to mozilla-central a=merge 2016-07-12 10:57:34 +02:00
David Keeler
48c3eabeea bug 1286067 - add missing parameter for second test case added in bug 1284840 r=emk
MozReview-Commit-ID: 3aQBZeGLjxn

--HG--
extra : rebase_source : bff6a016e806aaec3b79e3aa2ff29fa33ba6663c
2016-07-11 14:35:55 -07:00
Masatoshi Kimura
25ce2ba428 Bug 1284840 - Don't forget TLS intolerance when a DHE-based cipher is used. r=keeler
MozReview-Commit-ID: 70pa7lCLAxQ

--HG--
extra : rebase_source : f7ac3984139ebab86997041550e255c80a90fda2
2016-07-09 13:44:10 +09:00
Johann Hofmann
22b8fe594a Bug 1253771 - Add previous state info to mixed content callback. r=tanvi r=florian
MozReview-Commit-ID: 5msNz97psok

--HG--
extra : rebase_source : 640f86c3cc0b9b5a842a0c104cb269915b727b4b
extra : histedit_source : 6ca75dac152d5135089f9053eb91440058b124e4
2016-04-27 10:38:26 +02:00
Carsten "Tomcat" Book
838f21f656 merge mozilla-inbound to mozilla-central a=merge 2016-07-08 11:58:46 +02:00
Wes Kocher
b5739bf710 Bug 1285052 - Followup to fix eslint a=me
--HG--
extra : rebase_source : 32803bdd9e5ec564709645d0e1cba1f0d781b7e5
2016-07-07 11:29:13 -07:00
Richard Barnes
8fc350a13d Bug 1285052 - Enforce a maximum max-age for HPKP r=keeler
MozReview-Commit-ID: 1LD02GkqzTe

--HG--
extra : rebase_source : 127c9dd479b6a48e72da378a4df357a1bba1e6f3
2016-07-06 19:16:29 -04:00
Cykesiopka
54a22335cb Bug 1281569 - Remove unnecessary step of converting nsIX509Certs to Raw DER just to create a CERTCertificate in nsNSSCertificateDB. r=keeler
There are a few places in nsNSSCertificateDB.cpp where the following is done:
1. GetRawDER() is called on a nsIX509Cert to obtain the DER representation of
   the cert.
2. The DER is used to construct a CERTCertificate for use with NSS functions.

This step of converting to the DER is unnecessary, since GetCert() will provide
an already constructed CERTCertificate.

MozReview-Commit-ID: 35KMYI7dCXc

--HG--
extra : transplant_source : %CA%ED%AC/%E3%29D%BB%8D%0F%A9Y%19%B2%E7a%1B%BE%ADv
2016-07-05 02:59:18 -07:00
David Keeler
0b291c778a bug 1023621 - add asynchronous certificate verification API r=Cykesiopka
This API (nsIX509CertDB.asyncVerifyCertAtTime) will eventually replace
nsIX509Cert.getUsagesArray, nsIX509Cert.requestUsagesArrayAsync, and
nsIX509Cert.getUsagesString because those APIs are architecturally problematic
and don't give very precise information in any case.

MozReview-Commit-ID: OzQaBnDRIo

--HG--
extra : rebase_source : 270de8dfa5ed5221a1e012661161842c0afb3e70
2016-06-30 14:09:18 -07:00
Cykesiopka
90d2c0d630 Bug 1281955 - Don't Adopt() NSS allocated strings in PSM to avoid using the wrong deallocator. r=dkeeler
There are a few places in PSM where the result of an NSS function returning
char* is adopted by e.g. an nsXPIDLCString, which will use the wrong deallocator
when the string eventually gets destroyed.

This is basically Bug 1281564, but the free() call is buried within the Mozilla
string code instead.

MozReview-Commit-ID: HVSMyRpLnjS

--HG--
extra : transplant_source : Msmc%DB%16%23%87%00%A1%05%ABB%0BD%97%3B%A1%E7x
2016-06-29 18:42:37 -07:00
Sergei Chernov
edb1f658f6 Bug 1275238 - Certificate Transparency support in mozilla::pkix; r=keeler
MozReview-Commit-ID: HZwzSgxarTw

--HG--
extra : transplant_source : %BF%F9%A8T%C6x%82%03%3Ez%9F%3BT%E3%1B%11s%294%F4
2016-06-15 11:11:00 +03:00
Carsten "Tomcat" Book
3a42c363cc merge mozilla-inbound to mozilla-central a=merge 2016-06-30 12:33:41 +02:00
Cykesiopka
d93f9d1b28 Bug 1282004 - Convert TestMD4 CPP unit test into a GTest. r=mgoodwin
Nothing in the file requires functionality provided by the CPP unit test harness,
so making the file a GTest makes it more accessible.

MozReview-Commit-ID: FaAtF0blCwV

--HG--
rename : security/manager/ssl/tests/compiled/TestMD4.cpp => security/manager/ssl/tests/gtest/MD4Test.cpp
extra : transplant_source : edV%1F%0B97%1B%25%FA%0ABH%14%F5%A2Ms/%7E
2016-06-27 09:06:51 -07:00
Cykesiopka
3f7ca34d26 Bug 1282004 - Make it easier to run all PSM GTests at once. r=mgoodwin
Currently, running all the PSM GTests involves providing a filter that catches
all the various tests. This is annoying and error prone.

The changes here make running all PSM GTests as easy as:
  mach gtest "psm*"

MozReview-Commit-ID: EqaysNvwJaQ

--HG--
extra : transplant_source : %0CCM%99%12%18%8D%B9%DD%84%0C%A06%0Ba%AD%A7%EB%B3%FB
2016-06-27 09:06:43 -07:00
David Keeler
3fed4e5ecc bug 1272858 - use a name-agnostic method to find the built-in root PKCS#11 slot r=Cykesiopka
Previously this implementation would use the expected names of the built-in
module and slot to get a handle on them. This doesn't work on distributions that
use other names. The new implementation searches through the slots from the
default module list for one where PK11_HasRootCerts returns true (which
indicates that NSS considers that slot to contain the default built-in root
list).

MozReview-Commit-ID: LmX27hQfFJU

--HG--
extra : rebase_source : 50383dcc77257fe08ce2c7d908e95cda7c4bbe9d
2016-06-23 15:43:47 -07:00
David Keeler
fbd578cfcf bug 826783 - make certificate viewer more flexible about its minimum size r=mgoodwin
This makes the certificate viewer able to shrink itself down a bit on small
screen sizes. Without this patch, the "Close" button would be off the screen on
small resolutions like 1024x768. On larger screen sizes, this patch should have
no effect on the initial size of the certificate viewer window (although it now
can be made smaller manually).

MozReview-Commit-ID: IET9dxx23Xc

--HG--
extra : rebase_source : 487c88d626df7184502226b9ce02410adc504f12
2016-06-24 10:23:18 -07:00
Masatoshi Kimura
759c6d2a52 Bug 1279479 - Hide DHE cipher suites from the first handshake. r=keeler
MozReview-Commit-ID: BXZm6EMaLy2

--HG--
rename : security/manager/ssl/tests/unit/test_weak_crypto.js => security/manager/ssl/tests/unit/test_fallback_cipher.js
extra : rebase_source : 925361a6114fa5b09f74e2f61e504a1e3b938805
2016-06-23 03:48:02 +09:00
Cykesiopka
577a05865b Bug 307081 - Make nsIClientAuthDialogs::ChooseCertificate() pass an nsIArray of nsIX509Certs, not strings. r=kats,keeler
This provides implementations of ChooseCertificate() with more flexibility, and
allows callers of ChooseCertificate() to be less complex.

A portion of this work involves reimplementing
nsNSSCertificate::FormatUIStrings() in JS and improving UI strings for l10n.

MozReview-Commit-ID: CE7Uc2ntwmZ

--HG--
extra : transplant_source : R%A8eC%CEO2%DC%20%F7%B4V%F3g%E6h%EB%D5%8D3
2016-06-24 00:12:16 -07:00
Cykesiopka
313db6b516 Bug 307081 - Clean up nsIClientAuthDialogs.idl and implementations. r=kats,keeler
This fixes the following in the IDL:
1. Misleading or unclear parameter names in the IDL. |cn| in practice is the
   concatenation of the CN of the server cert and the port of the server, and
   |issuer| is the Organization of the issuer cert of the server cert.
2. Use of the |wstring| type. |AString| is generally preferred, and has the
   benefit of letting implementations skip null checks due to the use of
   references.
3. Using an explicit |canceled| outparam instead of just setting a return type.
   There is no need for the outparam if the return type can be used.
4. Using |long| (int32_t) for |selectedIndex|. |unsigned long| (uint32_t) is
   more logical, and paves the way for future changes.

This fixes the following in the Android implementation:
1. Lack of checks to ensure the QueryInterface() call succeeded. In practice,
   the call will always succeed, but it's good practice to check anyways.
2. Setting a variable to an nsIPrefService instance initially, then later
   setting it to a pref branch instance later on. This is confusing and
   unnecessary.

This fixes the following in the desktop implementation:
1. Lack of null pointer checking.
2. Trying to get a parent window ref off a context that doesn't actually support
   doing so.
3. Setting a variable to an nsIPrefService instance initially, then later
   setting it to a pref branch instance later on. This is confusing and
   unnecessary.
4. Abusal of the CAPS bundle.
5. Unnecessary variables.
6. Variables declared far away from where they are used.
7. Variable shadowing.
8. Style issues.
9. Lack of documentation.

This also fixes the following:
1. Lack of localisation notes.

MozReview-Commit-ID: FTc6XecJd6h

--HG--
extra : transplant_source : %ABQ%8F%E6%A3%25%FE%94%E4%D6X%3D%28%2C%05%5E%FB%84.-
2016-06-24 00:12:11 -07:00
Cykesiopka
1bc7589c72 Bug 307081 - Expose nsNSSCertificate.cpp GetKeyUsagesString() as the keyUsages attribute on nsIX509Cert. r=keeler
This allows nsNSSCertificate::FormatUIStrings() to be reimplemented in JS, which
is a necessary step for making nsIClientAuthDialogs::ChooseCertificate() pass an
nsIArray of nsIX509Certs.

Also removes some deprecated and unused constants.

MozReview-Commit-ID: CJITKVlUEtP

--HG--
extra : transplant_source : %1C%09%B2%B5%F4%C4%28%1A%B2%E5%CFsu%8B%B6W%8El%9Cn
2016-06-24 00:12:06 -07:00
Cykesiopka
97ab4b046e Bug 1281564 - Fix misuses of free() as the deallocator in PSM. r=keeler
There are a few places in PSM where free() is used to free memory allocated by
NSS instead of PORT_Free() (or higher level deallocation functions that end up
calling PORT_Free()).

In practice, PORT_Free() is just a wrapper around PR_Free(), which is just a
wrapper around free() if we don't ask NSPR to use a zone allocator.
Gecko explicitly tells NSPR not to use a zone allocator, so the changes here are
mainly for making the code more obviously correct.

This patch also includes some misc cleanup.

MozReview-Commit-ID: 9Ccg5OwlhWR

--HG--
extra : rebase_source : 768979a4bedb1cbdab2398d2a416429d9a241dd6
2016-06-22 15:56:11 -07:00
Cykesiopka
26dc8be640 Bug 1280331 - Update HPKP preload script URL to deal with renaming of transport_security_state_static.certs. r=keeler
4361f2ad66
renamed transport_security_state_static.certs to
transport_security_state_static.pins, so the URL needs to be updated to avoid
a 404.

MozReview-Commit-ID: 1FmYdi0mMcI

--HG--
extra : rebase_source : 25ebf2290cab6ee12f98bc65972b696c45d506d0
2016-06-21 16:11:57 -07:00
Masatoshi Kimura
bdcdded91f Bug 1281084 - Enable TLS 1.3 PSK-resumption for AES-256-GCM and ChaCha20/Poly1305. r=keeler 2016-06-22 21:55:13 +09:00
Mark Goodwin
d3dde26071 Bug 1280224 - Initial values for the content signature root pref are ignored. r=keeler
MozReview-Commit-ID: 9y8wsVcz0hz
2016-06-21 15:24:52 +01:00
David Keeler
540b8f3d01 bug 1278041 - skip TLS Feature checks so HPKP can be set r=mgoodwin
This is safe because TLS Feature checks have already been done when connecting
to the site in the first place.

MozReview-Commit-ID: HfbcrAv4bCJ

--HG--
extra : rebase_source : d1f22c1a4e2c8535e10bd071c937a1aac7b8e2fd
2016-06-20 16:36:36 -07:00
Onno Ekker
f1de083a08 Bug 1279953 - Ambiguous string usage for "not encrypted page". r=dolske
--HG--
extra : rebase_source : e6ea020d8b98e9bef2e895e5312edc47d839cc2c
2016-06-13 22:14:04 +02:00
David Keeler
febcbb464f bug 1278605 - ensure that nsICertOverrideService can be implemented in JS r=Cykesiopka
MozReview-Commit-ID: KSVeraWuRPZ

--HG--
extra : rebase_source : 15f7abb08b57c8525e44f39c5e10c9cc5299dc47
2016-06-07 11:27:33 -07:00
Masatoshi Kimura
dfb8d11072 Bug 1268728 - Remove ability to enable RC4. r=keeler 2016-06-07 22:17:43 +09:00
David Keeler
5e35bedf79 bug 1266563 - regenerate CA telemetry hash table r=jcj
MozReview-Commit-ID: 1NXDU2ejfzl

--HG--
extra : rebase_source : 86abe8c3009542557da524f3697414b7cee9fcb3
2016-06-03 16:12:38 -07:00
Carsten "Tomcat" Book
4aea0165dc merge mozilla-inbound to mozilla-central a=merge 2016-06-06 11:55:56 +02:00
ffxbld
989a828304 No bug, Automated HPKP preload list update from host bld-linux64-spot-384 - a=hpkp-update 2016-06-04 05:09:33 -07:00
ffxbld
237f18948d No bug, Automated HSTS preload list update from host bld-linux64-spot-384 - a=hsts-update 2016-06-04 05:09:30 -07:00
Masatoshi Kimura
ee23c0a77c Bug 975832 - Enable AES-256 variants of the AES-128 GCM cipher suites we have already enabled. r=keeler 2016-06-04 08:19:29 +09:00
Cykesiopka
4e54963733 Bug 1275197 - Ensure nsNSSU2FToken.cpp GetSymKeyByNickname() does not cause leaks. r=keeler
Prior to these changes, GetSymKeyByNickname() could theoretically leak. This
should not happen in practice, so the changes here just ensure that the code
doesn't cause leaks.

MozReview-Commit-ID: LWtqLmsBPV2

--HG--
extra : transplant_source : rWE%CD%D8%A7%87%3C%95%03%B5%03E%3E%06E%C7O%0D%F6
2016-06-01 22:43:37 -07:00
Jonas Sicking
c706b7f059 Bug 1275714 - Changes in preparation for FlyWeb landing. Add ability to pin using a cert fingerprint, in addition to using a cert. r=dkeeler
--HG--
extra : amend_source : 41336f6eeaf5e26b91e177dd60a91ad9ed3a064c
2016-06-01 17:02:34 -04:00
J.C. Jones
8524776280 Bug 1275479 - Create nsIU2FToken base interface (Part 2). r=keeler
Create a base "nsIU2FToken" interface that all tokens must implement. This
patch does not change U2F.cpp from initializing tokens monolithically, but
if/when future tokens are added, the implementer may want to do that.

MozReview-Commit-ID: GQuu6NolF4D

--HG--
extra : transplant_source : %3Fi%8E%C4n%BF%C1%DB%DB%03HjG%B5%9Ct%9EMWH
2016-05-27 13:44:20 -07:00
Chris Peterson
6b776e8000 Bug 1277014 - Fix -Wstring-conversion warnings in security/manager/ssl/. r=keeler
security/manager/ssl/nsNSSComponent.cpp:1694:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [31]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1333:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1341:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1349:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1357:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
2016-05-31 21:51:50 -07:00
Carsten "Tomcat" Book
76fd727737 Merge mozilla-central to mozilla-inbound 2016-05-30 15:30:55 +02:00
Carsten "Tomcat" Book
463212f69f merge mozilla-inbound to mozilla-central a=merge 2016-05-30 15:29:19 +02:00
ffxbld
dca36f5e32 No bug, Automated HPKP preload list update from host bld-linux64-spot-593 - a=hpkp-update 2016-05-28 05:20:15 -07:00
ffxbld
3eac728432 No bug, Automated HSTS preload list update from host bld-linux64-spot-593 - a=hsts-update 2016-05-28 05:20:13 -07:00
Chris Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
David Keeler
8ba29d1473 bug 1265113 - implement platform support for enterprise roots r=Cykesiopka,mhowell,rbarnes
MozReview-Commit-ID: JKxwCjoH0Oa

--HG--
extra : rebase_source : 9eaf3f1c5371e7b4b4df304bc6ce132ade5775da
2016-04-13 15:36:22 -07:00
Carsten "Tomcat" Book
b6b164ec6d Merge mozilla-central to mozilla-inbound 2016-05-25 15:20:00 +02:00
Carsten "Tomcat" Book
c715836c7f merge mozilla-inbound to mozilla-central a=merge 2016-05-25 15:04:00 +02:00
Carsten "Tomcat" Book
3cab03a461 Merge mozilla-central to fx-team 2016-05-24 15:15:55 +02:00
Carsten "Tomcat" Book
cb4337c62c merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : dom/presentation/tests/mochitest/file_presentation_non_receiver_oop.html => dom/presentation/tests/mochitest/file_presentation_non_receiver.html
rename : dom/presentation/tests/mochitest/file_presentation_non_receiver_inner_iframe_oop.html => dom/presentation/tests/mochitest/file_presentation_non_receiver_inner_iframe.html
rename : dom/presentation/tests/mochitest/file_presentation_receiver_inner_iframe_oop.html => dom/presentation/tests/mochitest/file_presentation_receiver_inner_iframe.html
2016-05-24 14:52:23 +02:00
ffxbld
d8a85e51ac No bug, Automated HPKP preload list update from host bld-linux64-spot-425 - a=hpkp-update 2016-05-21 05:05:21 -07:00
ffxbld
0ffea88a0a No bug, Automated HSTS preload list update from host bld-linux64-spot-425 - a=hsts-update 2016-05-21 05:05:19 -07:00
Masatoshi Kimura
3e0685deec Bug 1274953 - Bump the lowest valid TLS insecure fallback limit to 3 (TLS 1.2). r=keeler 2016-05-24 19:08:13 +09:00
Masatoshi Kimura
877c4b8482 Bug 1275252 - Deal with some TLS 1.3 intolerance. r=keeler 2016-05-25 19:36:57 +09:00
Mathieu Leplatre
695a9942a4 Bug 1266235 - Use blocklist prefix in preference names. r=MattN
MozReview-Commit-ID: 5aeoiSEMwYw

--HG--
extra : rebase_source : ff4e77c88de58923afe75be2046dcdb98e40ad2f
2016-05-19 12:51:13 +02:00
Johnathan Nightingale
c40db9a65c bug 466011 - clarify comments in cert override service IDL r=kaie DONTBUILD NPOTB
--HG--
extra : rebase_source : 6c67c12f768c4f5e9df84a7ab982d08095ba29ae
2016-05-27 13:11:32 -07:00
David Keeler
e87f6f88e2 bug 1273677 - ensure session cache is properly configured and torn down for TLSServerSocket r=mcmanus
MozReview-Commit-ID: 6i7HxTdLcID

--HG--
extra : rebase_source : 3c1b4c0ed798c166cbc2bcad71de90543af176c1
2016-05-23 13:58:56 -07:00
Carsten "Tomcat" Book
805f86c2b5 Merge mozilla-central to mozilla-inbound 2016-05-24 15:13:51 +02:00
Cykesiopka
0b04616a47 Bug 1271496 - Stop using Scoped.h in non-exported PSM code. r=keeler
Scoped.h is deprecated in favour of the standardised UniquePtr.

This patch removes use of Scoped.h everywhere in PSM except ScopedNSSTypes.h,
which is exported. Other consumers of ScopedNSSTypes.h can move off Scoped.h
at their own pace.

This patch also changes parameters and return types of various functions to make
ownership more explicit.

MozReview-Commit-ID: BFbtCDjENzy

--HG--
extra : transplant_source : %0B%C7%9F%40%FA9%A4%F2%5E%0D%92%1C%A6%A49%94%C3%7E%1Cz
2016-05-23 19:50:26 -07:00
Cykesiopka
378731742d Bug 883718 - Followup: Remove nsIBufEntropyCollector.idl. r=trivial
This file is no longer used post
https://hg.mozilla.org/mozilla-central/rev/8dd88e2a1976, but was not removed.
2016-05-24 00:51:00 +02:00
Nicholas Nethercote
99a82c0ac7 Bug 1273711 - Avoid OOM aborts in nsSecretDecoderRing::encode(). r=cykesiopka.
This patch removes an infallible duplication of the base64-encoded string,
which can be large.

--HG--
extra : rebase_source : c8e709d7afcb53e23fdea919fade857a7fd3fea4
2016-05-19 08:55:48 +10:00
Cykesiopka
5a7878cf2c Bug 1222754 - Replace nsSecureBrowserUIImpl::mOnStateLocationChangeReentranceDetection and nsAutoAtomic. r=keeler
mOnStateLocationChangeReentranceDetection and nsAutoAtomic form an unnecessarily
threadsafe reentrance prevention mechanism that can be replaced by
mozilla::ReentrancyGuard.

MozReview-Commit-ID: KWDdFD5TpCk

--HG--
extra : rebase_source : c3e0a9ad32ff169c6afb00dd10099835b6196682
2016-05-19 22:00:44 -07:00
Cykesiopka
2677d5c111 Bug 1273749 - Address misc issues with nsNSSCertValidity. r=keeler
Prior to the changes here, nsNSSCertValidity had the following issues:
 - Did not check for NSS shut down.
 - Provided an irrelevant zero argument constructor.
 - Did not explicitly delete the unwanted copy constructor and assignment
   operators.
 - Misc style issues.
 - Did not have a dedicated test.

MozReview-Commit-ID: JUPtk1OjsNg

--HG--
extra : rebase_source : 2f6475c842b8c1c2570a7a5e4e9f87f0bb12deae
2016-05-19 17:35:09 -07:00
Cykesiopka
ff87cc2acc Bug 1251133 - Remove DSA telemetry. r=jcj
Firefox no longer supports DSA cipher suites, so this telemetry is dead code.

MozReview-Commit-ID: G3ipd0TADM

--HG--
extra : rebase_source : 6cd2b10727107c048010d39b24e328f5539a7220
2016-05-19 18:42:16 -07:00
Wes Kocher
4f7146f46c Backed out changeset 1b8f35a4774e (bug 1273677) for valgring leaks CLOSED TREE 2016-05-20 18:13:12 -07:00
David Keeler
a53c0feecf bug 1273677 - ensure session cache is properly configured and torn down for TLSServerSocket r=mcmanus
MozReview-Commit-ID: 6i7HxTdLcID

--HG--
extra : rebase_source : 5a64db198fe582e6057bb58f8f51be3e9a63192b
2016-05-17 15:17:33 -07:00
Cykesiopka
6b12fc8650 Bug 1271501 - Use mozilla::BitwiseCast instead of reinterpret_cast in PSM. r=keeler
mozilla::BitwiseCast does the same thing, but provides static asserts that
mitigate some of the risk of using reinterpret_cast.

MozReview-Commit-ID: ENQ8QC6Nl9o

--HG--
extra : rebase_source : c1725c8363c0f7f9877601de5ab5f152ef4d0439
2016-05-18 21:20:56 -07:00
Cykesiopka
179b27667b Bug 1271501 - Downgrade unnecessarily strong reinterpret_casts in PSM. r=keeler
These reinterpret_casts can be static_casts or const_casts instead.

MozReview-Commit-ID: 1KQDWHO9CGS

--HG--
extra : rebase_source : a629d91577bdcb6d7fd94416e61ad46ca43f945d
2016-05-18 18:58:41 -07:00
Cykesiopka
5e0c49ff77 Bug 1271501 - Remove unnecessary uses of reinterpret_cast in PSM. r=keeler
These uses of reinterpret_cast are either pointless, or can be removed via
refactoring.

MozReview-Commit-ID: Aw2rlJfrT6J

--HG--
extra : rebase_source : 243d6c38eedc086c59d47c93d4a57cb6a922910a
2016-05-18 18:58:40 -07:00
Martin Thomson
103d3aba59 Bug 1250568 - Adding TLS 1.3 to nsISSLStatus, r=keeler
MozReview-Commit-ID: 4mLdtsdFoKN

--HG--
extra : rebase_source : 8526499c8765a14efeec22950372c738d8dc8b95
2016-04-04 16:21:19 -03:00
Martin Thomson
ec792f4dff Bug 1250568 - Adding ECDHE_PSK suites, r=keeler
MozReview-Commit-ID: 1MGB7ewpDuZ

--HG--
extra : rebase_source : 5afd535d6f853db31dd98f70dbc189d01a0246fa
2016-04-04 16:21:19 -03:00
Martin Thomson
9b8f068092 Bug 1250568 - Add support for TLS1.3 in prefs and telemetry, r=keeler
MozReview-Commit-ID: AH8SO3fRUp4

--HG--
extra : rebase_source : f7b367bc4577c2fea2741c60793f7cde6cba0aef
2016-04-19 14:29:36 +10:00
Cykesiopka
18c21f386e Bug 1271495 - Replace uses of ScopedPK11Context with UniquePK11Context. r=keeler,mcmanus
ScopedPK11Context is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

MozReview-Commit-ID: HE8UY1hOuph

--HG--
extra : transplant_source : 4%BF%81M%09Q-%2A%E6%04%86i%18%1B%3CL%90%88%04%C7
2016-05-13 05:53:57 -07:00
Chris Peterson
353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Hasse
692b996c80 bug 428421 - fix ordering of FIPS description strings r=keeler
In bug 317630, in the call to PK11_ConfigurePKCS11, the order of the strings
provided was switched such that the FIPS token description appeared before the
FIPS slot description, when in fact the reverse should happen.
2016-05-12 15:45:30 -07:00
David Keeler
c17f3a2733 bug 982932 - only allow Netscape-stepUp to be used for serverAuth for old CA certificates r=Cykesiopka,jcj
MozReview-Commit-ID: 88JhIU1pUji

--HG--
rename : security/manager/ssl/tests/unit/test_cert_eku/ee-int-nsSGC.pem.certspec => security/manager/ssl/tests/unit/test_cert_eku/ee-int-nsSGC-recent.pem.certspec
rename : security/manager/ssl/tests/unit/test_cert_eku/int-nsSGC.pem.certspec => security/manager/ssl/tests/unit/test_cert_eku/int-nsSGC-recent.pem.certspec
extra : rebase_source : 2f6251679a6f31cccb6d88bb51c567de9cc9bc76
2016-05-05 16:11:11 -07:00
Cykesiopka
ebd2e17c94 Bug 1265207 - Enable ESLint "var-only-at-top-level" rule for PSM tests. r=jjones
|let| is generally preferred over |var| in PSM JS.

MozReview-Commit-ID: 7SJWQSKFxI4

--HG--
extra : rebase_source : 387c6259ffa2cb0585ff366edc568ccc39bfd902
2016-05-09 18:04:14 -07:00
David Keeler
3a4d7b486c bug 883718 - remove nsIEntropyCollector and implementation r=mgoodwin,mrbkap
The rationale behind nsIEntropyCollector was to supplement NSS' source of
entropy with randomness from mouse move events. This obviously doesn't work on
platforms without a mouse (e.g. mobile platforms). Furthermore, as NSS seeds its
random number generator with robust randomness from the operating system, this
is unnecessary anyway. The primary concern is that initialization of the random
number generator must happen after forking, which is exactly what we do with the
child process in e10s mode.

MozReview-Commit-ID: GYQDElSCZy0

--HG--
extra : rebase_source : 6273a78203121c4d4ddf3ed97451f393ceef4b88
2016-05-10 16:24:44 -07:00
Cykesiopka
8f7bebaa5c Bug 160122 - Stop using PR_smprintf in PSM. r=keeler
The (more) modern Mozilla string classes can be used instead, which at the very
least provide built in automatic memory management and performance improvements.

MozReview-Commit-ID: 4l2Er5rkeI0

--HG--
extra : transplant_source : %A1%16%AB%02m%CA%25HfW%40%96Mq%0D%F0%91%9C%99%29
2016-05-10 23:38:55 -07:00
Chuck Lee
6ad8527ba5 Bug 1082346 - 02. Test case. r=keeler r=Cykesiopka
MozReview-Commit-ID: 3O8gBQ06Q96

--HG--
extra : rebase_source : b7425f43de7bb2f7200416f2bed35eb6b51866aa
2016-05-10 23:08:04 +08:00
Chuck Lee
d568bac51d Bug 1082346 - 01. Convert PKCS12 password endian using copyAndSwapToBigEndian. r=keeler
MozReview-Commit-ID: 83fRWTRzoMd

--HG--
extra : rebase_source : 7eb145e8d84a4778b46f989d1766db3c9e39bb4b
2016-05-07 15:58:12 +08:00
Randell Jesup
73a32768d1 Bug 1271402: name and cleanup DataStorage thread when running XPCshell r=froyd,dkeeler
MozReview-Commit-ID: 2brXgEcp91J
2016-05-11 00:11:40 -04:00
Cykesiopka
391584fd9d Bug 1270005 - Replace uses of ScopedPK11SlotInfo with UniquePK11SlotInfo in PSM. r=keeler
ScopedPK11SlotInfo is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

Also changes PK11SlotInfo parameters of various functions to make ownership more
explicit, and replaces some manual management of PK11SlotInfo pointers.

MozReview-Commit-ID: JtNH2lJsjwx

--HG--
extra : rebase_source : 9d764e0dd3a1f2df14c16f8f14a3c5392770c9a1
2016-05-09 18:02:40 -07:00
Carsten "Tomcat" Book
56fe0e8f2c merge mozilla-inbound to mozilla-central a=merge 2016-05-09 11:17:59 +02:00
ffxbld
f91f69689f No bug, Automated HPKP preload list update from host bld-linux64-spot-1062 - a=hpkp-update 2016-05-07 05:00:36 -07:00
ffxbld
c67ee9ebbd No bug, Automated HSTS preload list update from host bld-linux64-spot-1062 - a=hsts-update 2016-05-07 05:00:34 -07:00
Cykesiopka
128f004a1f Bug 1267905 - Replace uses of ScopedCERTCertList with UniqueCERTCertList. r=keeler
ScopedCERTCertList is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

Also changes CERTCertList parameters of various functions to make ownership more
explicit.

MozReview-Commit-ID: EXqxTK6inqy

--HG--
extra : transplant_source : %9B%A9a%94%D1%7E%2BTa%9E%9Fu%9F%02%B3%1AT%1B%F1%F6
2016-05-05 14:56:36 -07:00
David Keeler
4c6c57ed83 bug 1269812 - e10s-ify test_bug383369.html and test_unsecureRedirect.html r=Cykesiopka,mrbkap
MozReview-Commit-ID: E6z91sfEjan

--HG--
extra : rebase_source : 0561b67cb63262c46289134a250fb2c59d6af17d
2016-05-03 11:00:50 -07:00
Kyle Huey
941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Cykesiopka
5598e0ec78 Bug 1268365 - Check argument validity more in nsASN1Tree.cpp. r=jcj
MozReview-Commit-ID: 6DqyT1veMR7

--HG--
extra : rebase_source : ca4d914285e651fe4fec1cd032e3106c8fc3a5b3
2016-05-03 21:31:13 -07:00
Carsten "Tomcat" Book
87bdb8ed2d merge fx-team to mozilla-central a=merge 2016-05-02 11:19:50 +02:00
ffxbld
e526d34125 No bug, Automated HPKP preload list update from host bld-linux64-spot-576 - a=hpkp-update 2016-04-30 04:56:03 -07:00
ffxbld
484795c7ec No bug, Automated HSTS preload list update from host bld-linux64-spot-576 - a=hsts-update 2016-04-30 04:56:01 -07:00
Carsten "Tomcat" Book
ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Nicholas Nethercote
2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Wes Kocher
56fe7c4bcb Merge m-c to fx-team a=merge
MozReview-Commit-ID: 3H9BxQQQnNI
2016-04-29 16:05:30 -07:00
Jared Wein
e889366796 Bug 1268159 - Use GreD in addition to XCurProcD for browser_misused_characters_in_strings.js to cover more string files. r=gijs
MozReview-Commit-ID: IlC170W0nlG
* * *
[mq]: temp

MozReview-Commit-ID: GF0k4zvONPD
2016-04-29 09:28:48 -04:00
Cykesiopka
fc68a083a3 Bug 1265164 - Always use nsCOMPtrs with getNSSDialogs(). r=keeler
MozReview-Commit-ID: 430uuWHIZjC

--HG--
extra : rebase_source : 3192e40558ac36a3a8bf6ff3c1399be1196f8dcb
2016-04-27 18:16:48 -07:00
Kyle Huey
48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
David Keeler
1fdc1bdd0a bug 1267463 - add a more nuanced subject common name fallback option for prerelease channels r=Cykesiopka,jcj
MozReview-Commit-ID: 1vHXrPAHTRm

--HG--
extra : rebase_source : dddd8ae973d1d793890bbfc44d9fe84ef4a47ee2
2016-04-25 15:55:18 -07:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Cykesiopka
33825b4eb1 Bug 1257031 - Return more informative error code when encountering invalid integers rather than SEC_ERROR_BAD_DER. r=keeler
Also adds some missing l10n entries to nsserrors.properties (but not for errors
that are specific to TLS 1.3, since TLS 1.3 is not yet finalised).

MozReview-Commit-ID: A42fmTDTe8W

--HG--
extra : transplant_source : x%F7s%DB%05%B4%81%9Dm%FDC%A1f%B3%0D%7DR%C1%BA%B1
2016-04-21 16:41:22 -07:00
Phil Ringnalda
d4f9b788bc Merge m-c to m-i 2016-04-23 20:05:49 -07:00
Phil Ringnalda
af470d6828 Bug 1267012 - Disable test_signed_dir.js for having a timebomb that makes it fail after one year, a=orange 2016-04-23 18:10:46 -07:00
ffxbld
41b0888167 No bug, Automated HPKP preload list update from host bld-linux64-spot-508 - a=hpkp-update 2016-04-23 05:00:27 -07:00
ffxbld
0b254f9255 No bug, Automated HSTS preload list update from host bld-linux64-spot-508 - a=hsts-update 2016-04-23 05:00:25 -07:00
David Keeler
1e53398a23 bug 1182742 - allow users to override small key size errors r=rbarnes
Key size enforcement for TLS certificates happens at two levels: PSM and NSS.
PSM enforces a minimum of 1024 bits. NSS enforces a minimum of 1023 bits by
default. The NSS error is not overridable, but the PSM error is. This change
allows users to connect to devices with small RSA keys (as little as 512 bits)
using the certificate error override functionality.

MozReview-Commit-ID: 2TZ8c4I3hXC

--HG--
extra : rebase_source : a9c550f15261c711e789a670c90c129c65802ff0
2016-04-11 13:45:47 -07:00
David Keeler
13d02ebbb6 bug 1264761 - improve handling of x509 versions in certificate manager r=Cykesiopka
MozReview-Commit-ID: B7EPx63ttlt

--HG--
extra : rebase_source : a39e04a7b2393130888ecfe02b09b495c9e068af
2016-04-18 11:07:24 -07:00
Cykesiopka
372fe1a598 Bug 1260643 - Convert most uses of ScopedCERTCertificate in PSM to UniqueCERTCertificate. r=keeler
MozReview-Commit-ID: JnjoUd7d2M0

--HG--
extra : transplant_source : %99x%B6%F5%09%97%E6%60%B6%3C%3C%C2%D5vt%27%0C-%96%1B
2016-04-20 01:14:22 -07:00
Mark Goodwin
fccc28a54a Bug 1265085 - Replace verification source with a SAN in the content signature verifier interface. r=Cykesiopka,r=fkiefer
This change replaces the hardcoded 'sourceis' in nsIContentSignatureVerifier and
ContentSignatureVerifier.cpp with a string parameter which allows the caller
to specify which hostname the signing certificate must be valid for. This allows
us to create and use new signing certificates without having to wait for new
sources to ride the trains.

MozReview-Commit-ID: KGpOVOuJrk3
2016-04-18 14:55:56 +01:00
Jacek Caban
a9c53bd3c0 Bug 1263622 - Fixed nsNSSComponent.cpp compilation on mingw. r=dkeeler,ted 2016-04-23 10:55:50 +02:00
Wes Kocher
01ea27062a Backed out changeset bb60c7a0b0c5 (bug 1264761) for build failures in nsNSSCertHelper CLOSED TREE
MozReview-Commit-ID: KwFHe6X2WCE
2016-04-19 16:09:49 -07:00
David Keeler
9ae62ef7c9 bug 1264761 - improve handling of x509 versions in certificate manager r=Cykesiopka
MozReview-Commit-ID: B7EPx63ttlt

--HG--
extra : rebase_source : 0234079b42b1a3e46b4a6a790049b8f0769fc79a
2016-04-18 11:07:24 -07:00
Carsten "Tomcat" Book
fbeb4ca1bd Merge mozilla-central to mozilla-inbound 2016-04-18 08:51:38 +02:00
ffxbld
9fa9277647 No bug, Automated HPKP preload list update from host bld-linux64-spot-312 - a=hpkp-update 2016-04-16 04:49:09 -07:00
ffxbld
1d4acf2cee No bug, Automated HSTS preload list update from host bld-linux64-spot-312 - a=hsts-update 2016-04-16 04:49:07 -07:00
Cykesiopka
59774a5b4e Bug 1262645 - Address misc issues with nsGetUserCertChoice(). r=keeler
The follow issues are fixed:
  - Returning a failure result when failing to get a pref value instead of more
    gracefully falling back to a default.
  - Using an enum instead of a more strongly typed enum class.
  - Using a pref branch instead of the preferred Preferences.h API.
  - Manual memory management.
  - Unnecessary use of pointers.

MozReview-Commit-ID: FKw5kBhnwxL

--HG--
extra : transplant_source : %21K%E2%83/%A5%AB%DB3%F4%FB%2CUD%9E%B6l%1C%3A%22
2016-04-15 16:51:41 -07:00
Jonas Sicking
d310d4dcee Fix unified-build bustage from bug 1264706. r=bustage 2016-04-15 15:21:38 -07:00
Jonas Sicking
32e5673b7a Fix linting bustage for bug 1264706. r=bustage 2016-04-15 15:12:39 -07:00
Jonas Sicking
9c521f30da Bug 1264706: Move nsILocalCertService, and implementation, to security/manager/ssl in order to alloow use w use elsewhere in gecko. r=dkeeler
--HG--
rename : devtools/shared/security/LocalCertService.cpp => security/manager/ssl/LocalCertService.cpp
rename : devtools/shared/security/LocalCertService.h => security/manager/ssl/LocalCertService.h
rename : devtools/shared/security/nsILocalCertService.idl => security/manager/ssl/nsILocalCertService.idl
rename : devtools/shared/security/tests/unit/test_cert.js => security/manager/ssl/tests/unit/test_local_cert.js
2016-04-15 14:52:13 -07:00
J.C. Jones
63f7ce5155 Bug 1244960 - Complete FIDO u2f NSSToken (Part 1). r=keeler, r=baku
- Merge in test changes from Bug 1255784.
- Remove the unnecessary mutex
- Stop doing direct memory work in NSS Token
- Clean up direct memory work in ContentParent
- In order to store persistent crypto parameters, the NSSToken had to move
  onto the main thread and be interfaced with via IDL/IPDL.
- Support Register/Sign via NSS using a long-lived secret key
- Rename the softtoken/usbtoken "enable" prefs, because of hierarchy issues
  with the WebIDL Pref shadowing.
- Also orders the includes on nsNSSModule.cpp
- Attestation Certificates are in Part 2.

Updates per keeler review comments:

- Use //-style comments everywhere
- Refactor the PrivateKeyFromKeyHandle method
- Rename the logging and fix extraneous NS_WARN_IF/logging combinations
- Other updates from review

April 11-12:

- Correct usage of the "usageCount" flag for PK11_UnwrapPrivKey
- Rebase up to latest

April 15:
- Rebase to latest

MozReview-Commit-ID: 6T8jNmwFvHJ

--HG--
extra : transplant_source : w%26%CES%2Cu%04%3EAl%04%2Cb%E2v%C9%08%3A%CC%F4
2016-04-15 09:29:12 -07:00
Tim Taubert
501a3b98fe Bug 1235634 - Construct nsNSSShutdownList::singleton lazily on first use r=keeler 2016-04-13 11:06:44 +02:00
Mark Goodwin
23e56a0fd2 Bug 1252882 - Add a Content Signature Service r=keeler,r=franziskus,r=Cykesiopka
MozReview-Commit-ID: 2nS6vN3iDKe
2016-04-13 13:26:01 +01:00
Mark Goodwin
bc46a6a645 Bug 1252882 - Content-Signature Service - some tests r=keeler,r=fkiefer
MozReview-Commit-ID: AQGAABvRbNZ
2016-04-08 14:27:52 +01:00
Cykesiopka
c510e4037b Bug 1029173 - Clean up nsDataSignatureVerifier. r=keeler
This patch does the following:
 - Implements nsNSSShutDownObject.
 - Replaces more raw pointers with smart pointers.
 - Fixes other misc issues.

MozReview-Commit-ID: HulWdonEbP8

--HG--
extra : transplant_source : %DC%27%14%AE%28%A2F%80%1F%2C%83L%D3h%A2%C7k%F0%1C%2B
2016-04-12 18:09:06 -07:00
David Keeler
b2887661d5 bug 1263221 - improve how PSM handles the visibility of __CERT_AddTempCertToPerm r=chmanchester,mgoodwin
MozReview-Commit-ID: GXiXANNa6Op

--HG--
extra : rebase_source : ffb96a89aabd933f200e39d528d6f5f41e035d7e
2016-04-08 10:30:32 -07:00
Cykesiopka
b883b2533f Bug 1259909 - Obviate char PORT_Free() calls in PSM. r=keeler
Also converts the longer |UniquePtr<char, void(&)(void*)> foo(..., PORT_Free)|
to the shorter and equivalent |UniquePORTString foo(...)|.

MozReview-Commit-ID: LlrTNUYBP4V

--HG--
extra : transplant_source : afU%FB%0EC%3E%E0pm%A3-%0E%C8%83%CF%0A%B1%9E%ED
2016-04-09 01:03:59 -07:00
Ryan VanderMeulen
bb5308d31a Merge m-c to inbound. a=merge 2016-04-09 10:08:57 -04:00
ffxbld
e7db699836 No bug, Automated HPKP preload list update from host bld-linux64-spot-428 - a=hpkp-update 2016-04-09 04:47:02 -07:00
ffxbld
eae40b0bb0 No bug, Automated HSTS preload list update from host bld-linux64-spot-428 - a=hsts-update 2016-04-09 04:47:00 -07:00
Wes Kocher
dfc7e5253f Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9YZdlIARozU
2016-04-08 16:47:03 -07:00
Wes Kocher
b6d0503738 Merge fx-team to central, a=merge
MozReview-Commit-ID: yuSA0kqs0F
2016-04-08 15:26:49 -07:00
Dave Townsend
bf59524a62 Bug 1257246: Update security/manager for eslint 2. r=cykesiopka
MozReview-Commit-ID: C04uJOhTbjw

--HG--
extra : rebase_source : 39fb9a3ce183b05e0b924563e055431828bab50d
extra : histedit_source : aacec3a02d251d0ec8e13e78900a6f53bc205ec3
2016-04-05 11:32:28 -07:00
David Keeler
7dd242bb39 bug 1261936 - stop using the subject common name in certificate verification error messages r=Cykesiopka
MozReview-Commit-ID: G08cV5GmNDh

--HG--
extra : rebase_source : c79b34d893e7acddc8ee02a6c354dcaa1de07d61
2016-04-04 16:25:24 -07:00
Tim Taubert
63c7f51d31 Bug 842818 - Make Crypto::GetRandomValues() work off the main thread r=baku,keeler,mt 2015-09-22 10:50:36 +02:00
Cykesiopka
54da7e65e7 Bug 1252384 - Remove nsICertTree.isHostPortOverride(). r=dkeeler
It is unused since the changes in Bug 825583 landed.

MozReview-Commit-ID: 2u2eu0aDqeH

--HG--
extra : transplant_source : f%5Ev%00%B6%8B%3E%5E%26%C3%10%25%D9%16%C1%98yhf%D2
2016-04-06 07:02:17 -07:00
Cykesiopka
efe5b47ede Bug 1260644 - Use UniquePLArenaPool to manage PLArenaPools in PSM. r=keeler
MozReview-Commit-ID: HyLXbWoHMGz

--HG--
extra : rebase_source : 6164b7df51e11c4d3814a06bd41765d40be85a9d
2016-04-04 17:35:24 -07:00
Tim Taubert
313721942c Bug 1261213 - Follow-up to make eslint happy r=bustage 2016-04-06 10:32:16 +02:00
Tim Taubert
96b0d713ad Bug 1261213 - make test_sts_privatebrowsing_perwindowpb.html work under e10s r=keeler,mrbkap,felipe 2016-04-05 12:52:19 +02:00
Cykesiopka
1f493434a0 Bug 1127158 - Remove brittle debug only flag math in nsSecureBrowserUIImpl.cpp. r=dkeeler
MozReview-Commit-ID: 3d5mYDjzJwf

--HG--
extra : rebase_source : ce0b714b92d9deed79a8a9e24e0d8db4b9eef8c7
2016-04-01 06:16:58 -07:00
timeless@mozdev.org
cbc8dc0b64 Bug 550185 - Ensure nsCertTree::GetCellText returns an initialized value. r=kaie
--HG--
extra : rebase_source : 4c4529a62c5acb7bba52e8cb94e69e795a85b7e1
2016-04-04 21:18:00 +02:00
David Keeler
9825c57bc3 bug 1239166 - platform work to support Microsoft Family Safety functionality r=froydnj,mgoodwin,mhowell,rbarnes,vladan
MozReview-Commit-ID: GhpJqJB97r9

--HG--
extra : rebase_source : e943c1e4d0f008ffd6b6bb4bb63e1daf27ae2c96
2016-01-12 15:39:43 -08:00
David Keeler
6e4140d766 bug 1245280 - add policy mechanism to optionally enforce BRs for falling back to subject CN r=Cykesiopka,mgoodwin
MozReview-Commit-ID: 7xT6JGpOH1g

--HG--
extra : rebase_source : 0def29e8be898a2d975ee4390b3bc6a193766b1b
2016-02-09 10:14:27 -08:00
Cykesiopka
ed5502e22f Bug 1252722 - Add additional tests. r=keeler
MozReview-Commit-ID: Ds5t8RSd1Mk

--HG--
extra : transplant_source : %92Nx%E8%7E%3A%E6%97w%8A%D0%102%7D%8D%93%A2%9D%A4%25
2016-03-31 17:33:06 -07:00
Cykesiopka
bc9cb4c633 Bug 1252722 - Improve handling of PK11_* function error codes. r=keeler
MozReview-Commit-ID: DWNNXq8ZJ47

--HG--
extra : transplant_source : N%10%80%B2%9C%DEwu%0B%BF%FB%3B%D4%06%D8W%2AyBh
2016-03-31 17:33:00 -07:00
Cykesiopka
531fe59f42 Bug 1252722 - Ensure arguments of all public methods are checked. r=keeler
MozReview-Commit-ID: 5UJup8k8iGe

--HG--
extra : transplant_source : %D0v%7B%F2%60%04%E3%11%15_%AC%A0%D0%CE%0D%3A0q%96%24
2016-03-31 17:32:53 -07:00
Cykesiopka
0ebbbafe4b Bug 1252722 - Use smart pointers for NSS resources. r=keeler
MozReview-Commit-ID: Gg3DNjGiNIQ

--HG--
extra : transplant_source : _%AC%97%FA%DA%FF%FE%95%E5%D4%3C%BE%82%E4%24%D9F%ADB%89
2016-03-31 17:31:55 -07:00
Cykesiopka
db361c5c2d Bug 1252722 - Fully implement nsNSSShutDownObject everywhere. r=keeler
MozReview-Commit-ID: 4OZ6tCdCGEP

--HG--
extra : transplant_source : U%27%E3%E2A%85%03%AC%FA%C9%9A%9Et%87%E9%F6s%FFy%AC
2016-03-31 17:31:50 -07:00
David Keeler
581a304acb bug 1254667 - change certificate verification SHA1 policy to "allow for locally-installed roots" r=jcj
Before this patch, the default policy for the use of SHA1 in certificate
signatures was "allow all" due to compatibility concerns.
After gathering telemetry, we are confident that we can enforce the policy of
"allow for locally-installed roots" (or certificates valid before 2016) without
too much breakage.

MozReview-Commit-ID: 8GxtgdbaS3P

--HG--
extra : rebase_source : d1bed911f2d5d40229ea06556fee0848668e98b6
2016-03-28 12:52:40 -07:00
Cykesiopka
7167af4f5a Bug 1251801 - Ensure arguments of all public methods are checked. r=keeler
MozReview-Commit-ID: 1UQ4thOmUGb

--HG--
extra : transplant_source : V%24o%40%403%BF%B4o%5E%F5%28%91%B8%8A%E2%E3%E9%8B%BF
2016-03-29 18:14:29 -07:00
Cykesiopka
703b7ef6b1 Bug 1251801 - Improve handling of PK11_* function error codes. r=keeler
MozReview-Commit-ID: 18acVVAuapm

--HG--
extra : transplant_source : %C3%FD%1D%BF/%E4%A5%BBl%DE%03%BC%0E%CA%04%D8%C6%0Fze
2016-03-29 18:14:29 -07:00
Cykesiopka
b2f33b0ba8 Bug 1251801 - Fully implement nsNSSShutDownObject and obviate manual NSS resource management. r=keeler
MozReview-Commit-ID: A7a9TVikRPh

--HG--
extra : transplant_source : v%CE%9Df%F6%0AaqJ%D5A%07%B0%2A.%E2%01c%C5%A5
2016-03-29 18:14:28 -07:00
Martin Thomson
83f1770c2c Bug 1238001 - Allow TLS info to be updated on renegotiation, r=keeler
MozReview-Commit-ID: KJaPgEwTvhv

--HG--
extra : rebase_source : f7d0025eca46e191d23aee182c9ace58b7d59b8b
extra : amend_source : 7e98ef0aa34b0c2def205644e1ab9e576417930d
2016-02-23 08:00:00 -08:00
ffxbld
b83f7e6b04 No bug, Automated HPKP preload list update from host bld-linux64-spot-413 - a=hpkp-update 2016-03-28 14:10:40 -04:00
ffxbld
fbba08e207 No bug, Automated HSTS preload list update from host bld-linux64-spot-413 - a=hsts-update 2016-03-28 14:10:40 -04:00
Kyle Huey
d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Cykesiopka
e05e655f1b Bug 1258298 - Switch more Scoped.h templates in PSM to UniquePtr equivalents. r=keeler
MozReview-Commit-ID: 8VOhiuNOlBX

--HG--
extra : amend_source : 70d01c7a061c4b751d643d1277e3185ccf348e54
2016-03-24 18:30:37 -07:00
Cykesiopka
e031eef545 Bug 1259149 - Add additional tests for the nsIPK11* and nsIPKCS11* implementations. r=keeler
After these additions, the majority of the API surface should be covered.

MozReview-Commit-ID: CvpEX6Cm94d

--HG--
rename : security/manager/ssl/tests/unit/test_pkcs11_list.js => security/manager/ssl/tests/unit/test_pkcs11_module.js
extra : transplant_source : %B3%E0%09%B9%E4b%D0A%F0%00r%08%1F%9Dm%E7%CC9%E3l
2016-03-24 18:29:39 -07:00
Ted Mielczarek
815dd278b6 bug 1259753 - fix some C++ unittests to use ScopedXPCOM to init XPCOM. r=ms2ger
MozReview-Commit-ID: B6xdlB9Di0y

--HG--
extra : rebase_source : 182d29d677c77ae6780260f5fc9b0792bdd98f84
extra : amend_source : 1e4fa2453d6773bd1e63f52b7aa3bf61e61600ff
2016-03-25 10:04:37 -04:00
Nathan Froyd
8cd3125d35 Bug 1255438 - fix OS X warning bustage and reopen this CLOSED TREE; r=me 2016-03-25 10:09:01 -04:00
Nathan Froyd
0e58a8d0a5 Bug 1255438 - create nsI{Mutable,}Array directly; r=keeler 2016-03-25 09:36:25 -04:00
Nathan Froyd
e1d8b92ec6 Bug 1255425 - part 2 - pack kSTSPreloadList into a more efficient format; r=keeler
Entries in kSTSPreloadList currently look like:

class nsSTSPreload
{
  public:
    const char *mHost;
    const bool mIncludeSubdomains;
};

This is inefficient for a couple of reasons:

* The structure has a bunch of wasted space: it takes 8 bytes on 32-bit
  platforms and 16 bytes on 64-bit platforms, even though it only uses 5
  and 9 bytes, respectively.

* The |const char*| requires additional space in the form of relocations
  (at least on Linux/Android), which doubles the space cost of
  individual entries.  (The space cost of the relocations is mitigated
  somewhat on Linux and Android because of elfhack, but there's still
  extra cost in the on-disk format and during the load of libxul to
  process those relocations.)

* The relocations the structure requires means that the data in it can't
  be shared between processes, which is important for e10s with multiple
  content processes.

We can make it more efficient by structuring it like so:

static const char kSTSPreloadHosts[] = {
  // One giant character array containing the hosts, in order:
  //   "example.com\0example.org\0example.test\0..."
  // Use an array rather than a literal string due to compiler limitations.
};

struct nsSTSPreload
{
  // An index into kSTSPreloadHosts for the hostname.
  uint32_t mHostIndex: 31;
  // We use the same datatype for both members so that MSVC will pack
  // the bitfields into a single uint32_t.
  uint32_t mIncludeSubdomains: 1;
};

nsSTSPreload now has no wasted space and is significantly smaller,
especially on 64-bit platforms (saves ~29K on 32-bit platforms and ~85K
on 64-bit platforms).  This organization does add a couple extra
operations to searching for preload list entries, depending on your
platform, but the space savings make it worth it.
2016-03-24 15:09:28 -04:00
Nathan Froyd
b2490bf812 Bug 1255425 - part 1 - clearly delineate steps when outputting HSTS preload list; r=keeler
The main loop of |output| tweaks entries, filters out entries based on
some conditions, and writes out the actual entries we're going to use.
Let's separate those three steps so it's clearer what's happening where.
2016-03-11 15:35:47 -05:00
David Keeler
08f83f4f99 bug 1257969 - update test_pinning_dynamic.js test certificates to not use subject common name for name information r=jcj
MozReview-Commit-ID: 1NpjJO9r8ma

--HG--
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-a.pinning2.example.com-badca.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-a.pinning2.example.com-badca.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-a.pinning2.example.com-pinningroot.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-a.pinning2.example.com-pinningroot.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-b.pinning2.example.com-badca.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-b.pinning2.example.com-badca.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-b.pinning2.example.com-pinningroot.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-b.pinning2.example.com-pinningroot.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.a.pinning2.example.com-badca.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.a.pinning2.example.com-badca.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.a.pinning2.example.com-pinningroot.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.a.pinning2.example.com-pinningroot.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.b.pinning2.example.com-badca.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.b.pinning2.example.com-badca.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem.certspec
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.b.pinning2.example.com-pinningroot.pem => security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem
rename : security/manager/ssl/tests/unit/test_pinning_dynamic/cn-x.b.pinning2.example.com-pinningroot.pem.certspec => security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem.certspec
extra : rebase_source : 9fa95f73f616da87f19bf8c5f7749b02b52b9696
2016-03-18 14:14:00 -07:00
Cykesiopka
c343159d73 Bug 1253108 - Enable ESLint "strict" rule for PSM. r=keeler
MozReview-Commit-ID: 4wElZ8Guq9z

--HG--
extra : rebase_source : 60fb87c33d041994f35cbf9fd2fb3a55bd753bc6
2016-03-19 03:07:13 -07:00
Carsten "Tomcat" Book
0262976513 Backed out changeset 917819510b3f (bug 1235634) for memory leaks on a CLOSED TREE 2016-03-22 16:08:55 +01:00
Tim Taubert
5706816622 Bug 1235634 - Construct nsNSSShutdownList::singleton lazily on first use r=keeler 2016-03-22 15:13:05 +01:00
Cykesiopka
1a9cf03eb1 Bug 1251009 - Remove unused nsICertificateDialogs.notifyCACertExists() method. r=keeler, r=mfinkle
MozReview-Commit-ID: 5CFAsy5e1Cl

--HG--
extra : rebase_source : eed2fc5d3511c140dfe6046079347e9a881e2803
2016-03-16 12:48:59 -07:00
Cykesiopka
9e0106d044 Bug 1004149 - Add some missing OCSP URL tests. r=keeler
MozReview-Commit-ID: Iiyv6sMKEWV

--HG--
extra : transplant_source : S%CCT/%B2%7C%F1%3E%D4%A6%C4%C2%AA%F0%AA%40%DF%F2%29d
2016-03-18 21:11:09 -07:00
Cykesiopka
bdfc5290f6 Bug 1004149 - Return mozilla::pkix::Result values in nsNSSHttpInterface functions. r=keeler
MozReview-Commit-ID: Kx1E3HLP7zC

--HG--
extra : transplant_source : %F0%068%83%E21dM-%FE%7C%EC1%1E%05h%E6%1D%271
2016-03-18 21:11:03 -07:00
Cykesiopka
6698ff0184 Bug 1004149 - Remove some dead code. r=keeler
MozReview-Commit-ID: JF6IgVCEUVe

--HG--
extra : transplant_source : %B5%E0%F4%20%8C%BC%CF%23a%2B%DB%A5kG%D6%98%CC%D1%1D%23
2016-03-18 21:10:54 -07:00
ffxbld
ce9073e1b8 No bug, Automated HPKP preload list update from host bld-linux64-spot-543 - a=hpkp-update 2016-03-19 04:43:32 -07:00
ffxbld
a593c802bf No bug, Automated HSTS preload list update from host bld-linux64-spot-543 - a=hsts-update 2016-03-19 04:43:30 -07:00
David Keeler
3db46cef2e bug 1240118 - add functionality to treat a test certificate as a built-in root r=mgoodwin
MozReview-Commit-ID: GJMd2zEAcmX

--HG--
extra : rebase_source : d2d55c593368b4e5d8562484673a1018dc5ad02d
2016-03-15 17:19:00 -07:00
Cykesiopka
e6008c2304 Bug 1251011 - Enable ESLint "no-undef" rule for PSM. r=keeler r=mossop
MozReview-Commit-ID: 1lbwWWkJjqq

--HG--
extra : rebase_source : 10fa76138cb5c4ac53b2b49f99b26ce3748f9fff
2016-03-16 16:50:33 -07:00
David Keeler
fceae4c33d bug 1256495 - temporarily check build-time-generated PSM xpcshell test certificates in to the tree r=Cykesiopka
MozReview-Commit-ID: GIJgI4mFpGL

--HG--
extra : rebase_source : 143f72f3c8d6c0ac41151b9db38bec2fbaacd76b
2016-03-14 17:30:36 -07:00
Cykesiopka
301ab6716b Bug 1250258 - Partially clean up nsNSSCertificateDB.cpp import methods. r=keeler
MozReview-Commit-ID: Dbk5N1FwdWB

--HG--
extra : rebase_source : d97d4802af2f41218be2d210a8ecdb9bf1885122
2016-03-16 03:54:26 -07:00
Nathan Toone
4557e5f651 Bug 1092004 - Use getdtablesize for non-gonk builds as well. r=glandium
When building non-gonk builds, ANDROID_VERSION is not set.  Beginning with NDK 11, getdtablesize is no longer included.  This means that we should use the stub version of the function that is defined in android_stub.h for all android platforms.  This patch moves the function out of the "#if ANDROID_VERSION >=21" block so that all android code can use it.

Adding glandium as the reviewer, because he reviewed the original patch at bug 1103816.

MozReview-Commit-ID: 2NmUl5XuvDS

--HG--
extra : transplant_source : %03%8C/%E0%20t%D0%3Al4%D4Oh%CB_%07%8A%24r%CC
2016-03-14 16:19:12 -06:00
Nicholas Nethercote
a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11:00
Tooru Fujisawa
50608d5d55 Bug 1256088 - Merge mock app-info implementation into AppInfo.jsm. r=gps 2016-03-16 16:58:29 +09:00
Nicholas Nethercote
e098d1b141 Bug 1255655 - Const-ify kPinset_* arrays. r=cykesiopka.
--HG--
extra : rebase_source : b8c360a7c79bd3e79d30210cd8e624e3e4eae7c3
2016-03-11 13:54:41 +11:00
Mike Shal
0ea1e0d44b Bug 1256011 - Remove security/manager/ssl/tests/unit/pkcs11testmodule/Makefile.in; r=ted
MozReview-Commit-ID: qM1XuSSCoX
2016-03-14 19:21:45 -04:00
Mark Goodwin
985802557a Bug 1224531 - Provide a mechanism for the updater to drive kinto collection sync r=rnewman,mossop
There are two parts to this change. The first is a module to drive kinto
collection sync. This gives server-provided last-update times to each module
managing collection information so that data is only fetched when updates are
necessary. This also keeps track of when pings last took place (for future use)
and any apparent difference between client and server clock (we need this later
for the content signing work).

Currently only one module (the kinto version of the OneCRL client) consumes this
information, though more will follow.

The second is a minor change to nsBlocklistService.js to ensure that this ping
takes place whenever the existing blocklist ping happens.

MozReview-Commit-ID: 7SN03AOJ4Wc
2016-03-15 08:55:23 +00:00
David Keeler
61a9a234f8 bug 1255153 - (re)move redundant xpcshell name constraint tests to gtests r=Cykesiopka,jcj
MozReview-Commit-ID: 8eFSIhB1RId

--HG--
extra : rebase_source : 63b147b8bdc9f2961b2f56723ac5baa0e2564684
2016-03-09 14:33:31 -08:00
David Keeler
2f0004e1be bug 1228175 - fix IsCertBuiltInRoot r=Cykesiopka,mgoodwin
When a built-in root certificate has its trust changed from the default value,
the platform has to essentially create a copy of it in the read/write
certificate database with the new trust settings. At that point, the desired
behavior is that the platform still considers that certificate a built-in root.
Before this patch, this would indeed happen for the duration of that run of the
platform, but as soon as it restarted, the certificate in question would only
appear to be from the read/write database, and thus was not considered a
built-in root. This patch changes the test of built-in-ness to explicitly
search the built-in certificate slot for the certificate in question. If found,
it is considered a built-in root.

MozReview-Commit-ID: HCtZpPQVEGZ

--HG--
extra : rebase_source : 759e9c5a7bb14f14a77e62eae2ba40c085f04ccd
2016-03-04 17:06:33 -08:00
Franziskus Kiefer
bd54ab19d3 Bug 1226928 - signature verification for content-signing, r=keeler,mayhemer 2016-03-14 11:56:35 +01:00
Franziskus Kiefer
de6c5e883a Bug 1226928 - remove Wshadow warning in ScopedNSSTypes, r=keeler 2016-03-14 11:56:25 +01:00
Ryan VanderMeulen
da1885e860 Merge inbound to m-c. a=merge 2016-03-12 15:23:38 -05:00
ffxbld
7e46a33af1 No bug, Automated HPKP preload list update from host bld-linux64-spot-304 - a=hpkp-update 2016-03-12 04:40:14 -08:00
ffxbld
0391ff34f5 No bug, Automated HSTS preload list update from host bld-linux64-spot-304 - a=hsts-update 2016-03-12 04:40:12 -08:00
Wes Kocher
e7883e4059 Backed out changeset 490eb9194ae1 (bug 1228175) for TestIsCertBuiltInRoot failures on at least Android
MozReview-Commit-ID: 7kpuhoY0CJw
2016-03-09 14:22:36 -08:00
David Keeler
f228ba40a1 bug 1228175 - fix IsCertBuiltInRoot r=Cykesiopka,mgoodwin
When a built-in root certificate has its trust changed from the default value,
the platform has to essentially create a copy of it in the read/write
certificate database with the new trust settings. At that point, the desired
behavior is that the platform still considers that certificate a built-in root.
Before this patch, this would indeed happen for the duration of that run of the
platform, but as soon as it restarted, the certificate in question would only
appear to be from the read/write database, and thus was not considered a
built-in root. This patch changes the test of built-in-ness to explicitly
search the built-in certificate slot for the certificate in question. If found,
it is considered a built-in root.

MozReview-Commit-ID: HCtZpPQVEGZ

--HG--
extra : rebase_source : 898ef37459723f1d8479cfdc58658ccb00e782a9
2016-03-04 17:06:33 -08:00
Richard Barnes
0926cc2911 Bug 1254653 - Add telemetry to measure how often we encounter EV certificates r=keeler
MozReview-Commit-ID: FvDpMGEJGLQ

--HG--
extra : rebase_source : 8dab354175e1a7b57450011bc50ffa6fd13448b7
2016-03-08 17:30:40 -05:00