Commit Graph

5078 Commits

Author SHA1 Message Date
Cykesiopka
73916bae28 Bug 1362735 - Clean up nsIPKCS11 implementation. r=keeler
The changes here:
1. Make it easier to discover where nsIPKCS11 is implemented / make it easier to
   discover what the file implements.
2. Reduce global scope pollution.
3. Make nsCrypto.h no longer unnecessarily exported.
4. Remove NS_CRYPTO_CONTRACTID from nsDOMCID.h, since the define isn't used
   anywhere.
5. Move the definition of NS_PKCS11_CONTRACTID from nsDOMCID.h into PSM code,
   since this contract ID is firmly in PSM territory now.

MozReview-Commit-ID: 2PdFM0mlL4R

--HG--
rename : security/manager/ssl/nsCrypto.cpp => security/manager/ssl/PKCS11.cpp
rename : security/manager/ssl/nsCrypto.h => security/manager/ssl/PKCS11.h
extra : rebase_source : 46667edef5a1d8c910d96dec1125c05bc3477bee
2017-05-19 00:57:46 +08:00
ffxbld
f2272dd703 No bug, Automated HPKP preload list update from host bld-linux64-spot-361 - a=hpkp-update 2017-05-18 08:02:44 -07:00
ffxbld
6a62795f0e No bug, Automated HSTS preload list update from host bld-linux64-spot-361 - a=hsts-update 2017-05-18 08:02:41 -07:00
ffxbld
399a95bd59 No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-05-17 08:11:58 -07:00
ffxbld
4d10d237bc No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-05-17 08:11:55 -07:00
ffxbld
b2cb7e672d No bug, Automated HPKP preload list update from host bld-linux64-spot-380 - a=hpkp-update 2017-05-16 08:13:54 -07:00
ffxbld
19e0f277b1 No bug, Automated HSTS preload list update from host bld-linux64-spot-380 - a=hsts-update 2017-05-16 08:13:51 -07:00
ffxbld
ae24a3c83d No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-05-15 08:12:24 -07:00
ffxbld
72bbccaa89 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-05-15 08:12:21 -07:00
ffxbld
e565da0035 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-05-14 08:03:09 -07:00
ffxbld
f899cc0d30 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-05-14 08:03:06 -07:00
ffxbld
06b337ab22 No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-05-13 08:04:42 -07:00
ffxbld
418e3e6f07 No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-05-13 08:04:39 -07:00
ffxbld
278ecdca02 No bug, Automated HPKP preload list update from host bld-linux64-spot-035 - a=hpkp-update 2017-05-12 08:14:12 -07:00
ffxbld
cb3007aeba No bug, Automated HSTS preload list update from host bld-linux64-spot-035 - a=hsts-update 2017-05-12 08:14:09 -07:00
Cameron McCormack
203bdaed3b Bug 1361235 - Part 2: Re-enable some tests. r=emilio
MozReview-Commit-ID: 76FaOwHjIMB

--HG--
extra : rebase_source : e2e36bd8a6b86761fe616d7c30d8df7b661a4e09
2017-05-11 19:19:52 +08:00
Ryan VanderMeulen
ff1d6f6f88 Merge m-c to autoland. a=merge 2017-05-11 11:30:47 -04:00
ffxbld
41c4f9d9b5 No bug, Automated HPKP preload list update from host bld-linux64-spot-376 - a=hpkp-update 2017-05-11 08:11:46 -07:00
ffxbld
e3cb6315c8 No bug, Automated HSTS preload list update from host bld-linux64-spot-376 - a=hsts-update 2017-05-11 08:11:43 -07:00
Mark Banner
2bf9485071 Bug 1362947 - Upgrade eslint-plugin-html to 2.0.3 to pick up --fix support. r=jaws
MozReview-Commit-ID: 5fVG7akPnGM

--HG--
extra : rebase_source : e462e84bf8f2ffd893d1fd6b5ea14bbc093168dd
2017-05-08 10:29:47 +01:00
Sebastian Hengst
95a418ca5b Backed out changeset e0f9c56c15f0 (bug 1362947) for linting failures, e.g. at accessible/tests/mochitest/jsat/doc_content_text.html:15. r=backout 2017-05-11 10:15:55 +02:00
Mark Banner
256aeb441c Bug 1362947 - Upgrade eslint-plugin-html to 2.0.3 to pick up --fix support. r=jaws
MozReview-Commit-ID: 5fVG7akPnGM

--HG--
extra : rebase_source : f1b9eeb1b2048b551ee8c0a596e6395d0031cc4d
2017-05-08 10:29:47 +01:00
Wes Kocher
91617240e6 Merge m-c to autoland, a=merge 2017-05-09 14:59:18 -07:00
ffxbld
195bf8782f No bug, Automated HPKP preload list update from host bld-linux64-spot-381 - a=hpkp-update 2017-05-09 08:04:36 -07:00
ffxbld
b72e6cc191 No bug, Automated HSTS preload list update from host bld-linux64-spot-381 - a=hsts-update 2017-05-09 08:04:33 -07:00
Hemant Singh Patwal
fd32e8da4a Bug 1359614 - Move the security/manager/.eslintrc.js to security/.eslintrc.js and fix the ESLint issues raised. r=standard8
MozReview-Commit-ID: AlfInBsIPnF

--HG--
rename : security/manager/.eslintrc.js => security/.eslintrc.js
extra : rebase_source : 4dfdd45a4f1e4d3e45e2ef353dd0bb343a3d1adb
2017-05-09 19:48:02 +05:30
Wes Kocher
75c2b7a481 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 3BrkDVl7521
2017-05-08 16:24:51 -07:00
Wes Kocher
cbfdaf8fb2 Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 5kxOZZxjMEl
2017-05-08 16:07:25 -07:00
ffxbld
e784eb5820 No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-05-08 07:59:23 -07:00
ffxbld
ba31bb05d4 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-05-08 07:59:20 -07:00
Paolo Amadini
eddc9033bf Bug 1254558 - Remove about:config preferences only used by the legacy nsIDownloadManager code. r=mak
MozReview-Commit-ID: 7XSnNdirh8s

--HG--
extra : rebase_source : 9b475be16843af7c3dd2244ef43cd34b1c8e5ea3
2017-05-05 11:51:09 +01:00
ffxbld
8b70b0a503 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-05-07 08:02:02 -07:00
ffxbld
100845ade3 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-05-07 08:01:59 -07:00
Wes Kocher
70383223c7 Merge autoland to central, a=merge
MozReview-Commit-ID: 8Byspu8RLyg
2017-05-05 13:22:33 -07:00
ffxbld
274d2a7dd5 No bug, Automated HPKP preload list update from host bld-linux64-spot-386 - a=hpkp-update 2017-05-05 08:05:06 -07:00
ffxbld
744bf45b07 No bug, Automated HSTS preload list update from host bld-linux64-spot-386 - a=hsts-update 2017-05-05 08:05:04 -07:00
Carsten "Tomcat" Book
fdc689ba16 merge mozilla-inbound to mozilla-central a=merge 2017-05-05 15:17:26 +02:00
Carsten "Tomcat" Book
71adb3de58 merge autoland to mozilla-central a=merge 2017-05-05 15:13:36 +02:00
ffxbld
1a46d31be5 No bug, Automated HPKP preload list update from host bld-linux64-spot-303 - a=hpkp-update 2017-05-04 08:04:48 -07:00
ffxbld
c76af0c30b No bug, Automated HSTS preload list update from host bld-linux64-spot-303 - a=hsts-update 2017-05-04 08:04:45 -07:00
L. David Baron
c364774efb Bug 1353458 - Make test_cert_blocklist more flexible about order of lines in revocations.txt. r=keeler
This allows patches to land that will change the hashtable enumeration
order, which in turn changes the ordering of the lines in
revocations.txt.

MozReview-Commit-ID: Fyuahnpky6g

--HG--
extra : rebase_source : 1e918481db566213205e330f33d6b00bdc3b4f11
2017-05-04 15:17:50 -07:00
Patrick McManus
b6d4239e55 Bug 1363029 - mark nsICryptoHash builtinclass r=keeler
MozReview-Commit-ID: 5fEuGtASoZ1

--HG--
extra : rebase_source : 944354d8dee60504836cc754fe60541f09ff3937
2017-05-08 10:07:31 -04:00
Carsten "Tomcat" Book
6ae9b7bb71 Merge mozilla-central to autoland
--HG--
rename : browser/base/content/gcli_sec_bad.svg => devtools/client/themes/images/gcli_sec_bad.svg
rename : browser/base/content/gcli_sec_good.svg => devtools/client/themes/images/gcli_sec_good.svg
rename : browser/base/content/gcli_sec_moderate.svg => devtools/client/themes/images/gcli_sec_moderate.svg
2017-05-05 15:27:55 +02:00
Cykesiopka
d1803f67e9 Bug 1358183 - Remove some unused PSM IDL constants and functions. r=keeler
MozReview-Commit-ID: C8EGosXvTQL

--HG--
extra : rebase_source : 9c141f6750d7658409fc2820f17940abe067fb4a
2017-05-04 00:06:43 +08:00
Wes Kocher
323540c8ac Merge autoland to m-c a=merge
MozReview-Commit-ID: 30wEaH7LuuE
2017-05-03 13:17:05 -07:00
ffxbld
1e6ecc6322 No bug, Automated HPKP preload list update from host bld-linux64-spot-364 - a=hpkp-update 2017-05-03 08:06:32 -07:00
ffxbld
5f67a395c5 No bug, Automated HSTS preload list update from host bld-linux64-spot-364 - a=hsts-update 2017-05-03 08:06:29 -07:00
Wes Kocher
e141e24ffb Merge m-c to autoland, a=merge
MozReview-Commit-ID: 1peTFbNMVnU
2017-05-02 17:38:11 -07:00
ffxbld
abe68d5dad No bug, Automated HPKP preload list update from host bld-linux64-spot-304 - a=hpkp-update 2017-05-02 08:06:54 -07:00
ffxbld
e46e6eacbf No bug, Automated HSTS preload list update from host bld-linux64-spot-304 - a=hsts-update 2017-05-02 08:06:51 -07:00
Ting-Yu Lin
918033ba12 Bug 1321754 Part 2 - Update reftest and crashtest expectations for stylo. r=heycam
MozReview-Commit-ID: AunZ2DE209M

--HG--
extra : rebase_source : 4a091cd55581039c8d81f4db9bfbe2af8c0d0863
2017-04-28 14:53:16 +08:00
ffxbld
ae8c2e2354 No bug, Automated HPKP preload list update from host bld-linux64-spot-306 - a=hpkp-update 2017-05-01 07:56:05 -07:00
ffxbld
a2f0c5af03 No bug, Automated HSTS preload list update from host bld-linux64-spot-306 - a=hsts-update 2017-05-01 07:56:03 -07:00
ffxbld
3dc6ceb427 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-04-30 07:50:30 -07:00
ffxbld
0d823cefd8 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-04-30 07:50:27 -07:00
ffxbld
38fdbbcaa4 No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-04-29 07:55:26 -07:00
ffxbld
ca0521550a No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-04-29 07:55:24 -07:00
Wes Kocher
f831128354 Merge autoland to central, a=merge
MozReview-Commit-ID: B7tVdcR40eh
2017-04-28 15:43:18 -07:00
David Keeler
1ef3597000 bug 1360623 - add hash algorithm constants to pykey for easier consumer use r=jcj
For signing, pykey.py delegates to 3rd party libraries. One of these libraries
expects hash algorithms to be specified in the form "SHA-256" whereas the other
expects "sha256". Consumers of pykey shouldn't need to be aware of this detail.
This patch introduces constants HASH_SHA1, HASH_SHA256, etc. and changes pykey
to determine which string literals to use itself.

MozReview-Commit-ID: 27laM2uXMwJ

--HG--
extra : rebase_source : 9b74f486f7535671fd26c59e3e9cc3b4459f15e0
2017-04-28 11:06:28 -07:00
ffxbld
784ec1af14 No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-04-28 07:52:40 -07:00
ffxbld
ce8bde832b No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-04-28 07:52:37 -07:00
David Keeler
f900f10f03 bug 1361201 - decrease OCSP soft timeout to 1 second on prerelease builds r=jcj
MozReview-Commit-ID: ENYyG8ZeXYe

--HG--
extra : rebase_source : 5c30b914a39a2dce89190c7d5db703952408aae3
2017-05-01 17:05:31 -07:00
David Keeler
3caa6189aa bug 1349312 - part 2/2: add pyct.py and generate test certificate transparency information r=Cykesiopka,jcj
MozReview-Commit-ID: 9Htv04PfRzb

This introduces pyct.py with the capability of generating Signed Certificate
Timestamps for our test certificates. Also introduces a simple testcase that
should validate correctly under current CT requirements as well as one that does
not validate due to an insufficient number of SCTs.

(Note that "validate" in this case does not refer to the overall TLS handshake
result, because CT is not currently required. It more or less refers to the
value of certificateTransparencyStatus of the SSLStatus of the connection's
securityInfo - see nsISSLStatus.idl.)

--HG--
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.key => security/manager/ssl/tests/unit/test_ct/default-ee.key
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.key.keyspec => security/manager/ssl/tests/unit/test_ct/default-ee.key.keyspec
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.pem => security/manager/ssl/tests/unit/test_ct/default-ee.pem
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.pem.certspec => security/manager/ssl/tests/unit/test_ct/default-ee.pem.certspec
rename : security/manager/ssl/tests/unit/bad_certs/test-ca.pem => security/manager/ssl/tests/unit/test_ct/test-ca.pem
rename : security/manager/ssl/tests/unit/bad_certs/test-ca.pem.certspec => security/manager/ssl/tests/unit/test_ct/test-ca.pem.certspec
extra : rebase_source : 66c5a5e16eeb47c97972248d61a4f1cbadf59a49
2017-04-17 14:55:35 -07:00
David Keeler
c138b8d0b6 bug 1349312 - part 1/2: patch CT implementation to include debug-only test logs r=Cykesiopka,jcj
MozReview-Commit-ID: Gay4bliuiDc

This modifies getCTKnownLogs.py to inject 3 debug-only Certificate Transparency
log keys and 2 organizations ("Mozilla Test Org 1" and "2") for use with
integration tests. Also updates CTKnownLogs.h as generated by the python script.

The debug logs use the "default", "secp256r1", and "alternate" keys that are
already present in our testing infrastructure (see pykey.py).

--HG--
extra : rebase_source : 3d4fc736f840cd080fab6b8c6c5b53cc9361abf2
2017-04-19 14:02:26 -07:00
David Keeler
455ab646d3 bug 1337950 - work around failing to load a FIPS PKCS#11 module DB in NSS initialization r=Cykesiopka,jcj
Firefox essentially does not support running NSS in FIPS mode any longer. This
has always been the case on Android from what I can tell and it has been the
case on OS X since at least version 34 (see bug 1047584). It became the case on
Windows as of version 53 (see bug 1295937). Unfortunately, before this patch,
if a user attempted to run an affected version of Firefox using a profile
directory containing an NSS database collection that had FIPS enabled, NSS
initialization would fail and fall back to running in no DB mode, which had the
side-effect of making any saved passwords and certificates unavailable. This
patch attempts to detect and work around this failure mode by moving the
PKCS#11 module DB (which is where the FIPS bit is set) to a backup location and
basically running with a fresh, non-FIPS module DB. This allows Firefox to
initialize NSS with the preexisting key and certificate databases available.

MozReview-Commit-ID: 1E4u1ngZyRv

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting.js => security/manager/ssl/tests/unit/test_broken_fips.js
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key3.db => security/manager/ssl/tests/unit/test_broken_fips/key3.db
extra : rebase_source : 887f457e998d6e57c6536573fbe3cb10547fe154
2017-04-20 10:31:22 -07:00
Wes Kocher
be34ade6b6 Merge autoland to central, a=merge
MozReview-Commit-ID: 2pgVZdnDKno
2017-04-27 12:44:03 -07:00
ffxbld
068e6f2925 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-04-27 07:52:27 -07:00
ffxbld
7d28817077 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-04-27 07:52:24 -07:00
Wes Kocher
226702fd85 Merge m-c to autoland a=merge
MozReview-Commit-ID: LOGgOErcV9L
2017-04-26 17:43:38 -07:00
ffxbld
ce5ccb6a8c No bug, Automated HPKP preload list update from host bld-linux64-spot-304 - a=hpkp-update 2017-04-26 08:02:08 -07:00
ffxbld
728d6a0b30 No bug, Automated HSTS preload list update from host bld-linux64-spot-304 - a=hsts-update 2017-04-26 08:02:05 -07:00
ffxbld
876c7dd305 No bug, Automated HPKP preload list update from host bld-linux64-spot-301 - a=hpkp-update 2017-04-25 07:57:31 -07:00
ffxbld
1d0cdb27cb No bug, Automated HSTS preload list update from host bld-linux64-spot-301 - a=hsts-update 2017-04-25 07:57:28 -07:00
David Keeler
fe73f5843c bug 1356499 - put NCSCCS pins into production mode r=mgoodwin
As requested by James Burton<jb@0.me.uk> and vouched for (via email) by
Lucas Garron <lgarron@google.com>.

MozReview-Commit-ID: HD9laXzJpRg

--HG--
extra : rebase_source : 7c632c6772509a3c4c03cf971ee0f62ad5225275
2017-04-25 14:33:07 -07:00
David Keeler
f821131b3b bug 1361893 - remove two unnecessary mutexes and a cast from SSLServerCertVerification.cpp r=kmckinley
gSSLVerificationPK11Mutex isn't used at all - it can be removed
gSSLVerificationTelemetryMutex is unnecessary because telemetry has its own lock:

https://dxr.mozilla.org/mozilla-central/rev/a748acbebbde373a88868dc02910fb2bc5e6a023/toolkit/components/telemetry/TelemetryHistogram.cpp#1135
https://dxr.mozilla.org/mozilla-central/rev/a748acbebbde373a88868dc02910fb2bc5e6a023/toolkit/components/telemetry/TelemetryHistogram.cpp#1984

The nsNSSSocketInfo* cast in SSLServerCertVerificationResult::Run() is
unnecessary because mInfoObject is a RefPtr<nsNSSSocketInfo>.

MozReview-Commit-ID: DG7qWGg2amQ

--HG--
extra : rebase_source : 0a475d7aba75ba4debecc7cec2ed14319082d9ab
2017-05-03 16:44:17 -07:00
Wes Kocher
94ff05c50d Merge autoland to central, a=merge
MozReview-Commit-ID: EaYU8ma2C4H
2017-04-24 15:45:27 -07:00
ffxbld
baf47b352e No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-04-24 07:53:50 -07:00
ffxbld
e2320972af No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-04-24 07:53:47 -07:00
ffxbld
313e5199bf No bug, Automated HPKP preload list update from host bld-linux64-spot-304 - a=hpkp-update 2017-04-23 07:58:17 -07:00
ffxbld
16b68f30f8 No bug, Automated HSTS preload list update from host bld-linux64-spot-304 - a=hsts-update 2017-04-23 07:58:14 -07:00
ffxbld
cfbd9ba5ea No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-04-21 07:57:04 -07:00
ffxbld
7e0a6b7086 No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-04-21 07:57:01 -07:00
Carsten "Tomcat" Book
975e251aff merge mozilla-inbound to mozilla-central a=merge 2017-04-21 10:57:02 +02:00
Wes Kocher
4f3c2d9829 Merge m-c to autoland, a=merge
MozReview-Commit-ID: DPzfAm14Tdx
2017-04-20 15:52:28 -07:00
Nathan Froyd
35bd9439ac Bug 1357741 - make nsCertOverrideService's locking more efficient; r=keeler
nsCertOverrideService uses a ReentrantMonitor to protect its inner
state.  However, there's no way for nsCertOverrideService's methods to
be re-entered when calling outside code.  The use of ReentrantMonitor
appears to be compensating for an unclear division of locking
responsibilities, by enabling every method to simply lock the
ReentrantMonitor upon entrance without care for who might have locked it
beforehand.

Using Mutex is cheaper than ReentrantMonitor, and also forces us to
make explicit who's required to do locking, and who needs to do work
with the lock held.
2017-04-20 10:02:19 -04:00
David Keeler
af0ce9fbd6 bug 1357226 - work around a library inefficiency with EC keys when verifying ECDSA signatures r=fkiefer,jcj
Calling VFY_VerifyDigestDirect causes the provided SECKEYPublicKey to be
reimported to the softoken regardless of if it already exists on it. EC keys
must be verified upon import (to see if the point is on the curve to avoid some
small subgroup attacks), and so repeatedly doing this with a static key (say,
for example, a key corresponding to a built-in certificate transparency log) is
inefficient. This patch alters the certificate transparency implementation to
import these keys each once and then use PK11_Verify for ECDSA signature
verification, which doesn't have the same drawback.

Since this change causes CertVerifier to hold an NSS resource (via its
MultiLogCTVerifier having a list of CTLogVerifier, each of which now has a
SECKEYPublicKey), nsNSSComponent has to make sure it goes away before shutting
down NSS. This patch ensures this happens in nsNSSComponent::ShutdownNSS().

MozReview-Commit-ID: 6VSmz7S53y2

--HG--
extra : rebase_source : 4994db9de80a6c1aec3d7e322ff30d040140ce92
2017-04-11 14:11:28 -07:00
Cervantes Yu
cc5836fbae Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto
NS_SetCurrentThreadName() is added as an alternative to PR_SetCurrentThreadName()
inside libxul. The thread names are collected in the form of crash annotation to
be processed on socorro.

MozReview-Commit-ID: 4RpAWzTuvPs
2017-02-07 18:57:23 +08:00
ffxbld
305510c8ee No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-04-19 08:02:50 -07:00
ffxbld
9847509d90 No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-04-19 08:02:47 -07:00
Cykesiopka
150742ba74 Bug 641120 - Enhance PKCS #11 module load dialog. r=keeler
This changes does several things:
1. Changes some titles to include the word "driver" for better clarity.
2. Moves and cleans up the JS implementation of load_device.xul. Having a
   cleaner implementation in a separate file makes the code easier to discover
   and maintain.
3. Removes code that tries to show a special case message if a module was
   already loaded.
3A. The backend code doesn't provide distinction from this case and failure to
    add in general.
3B. The backend code would only return the error code being checked for if a
    blank module name was provided.
4. Adds tests.

MozReview-Commit-ID: 8BxKWKw5rvp

--HG--
extra : rebase_source : 15a29bf7d46f523a11eac37c9f0c6efb2b5d0114
2017-04-18 22:18:53 +08:00
ffxbld
672628fae3 No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-04-18 07:50:59 -07:00
ffxbld
52a0317e95 No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-04-18 07:50:56 -07:00
David Keeler
07f34ebd2f bug 1352262 - make OCSP timeout values configurable r=Cykesiopka,jcj
The default OCSP timeout for soft-fail DV is still 2 seconds. This patch makes
it configurable on the interval (0, 5] seconds.

The default OCSP timeout for EV and hard-fail DV is still 10 seconds. This patch
makes it configurable on the interval (0, 20] seconds.

MozReview-Commit-ID: CPd8pwYrJhj

--HG--
extra : rebase_source : 45bd7d06ea013f0a776ea18be9408dedb18271d8
2017-03-31 15:21:40 -07:00
Florian Queze
f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
37f2343b9a Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst
9e0ecf32c5 Backed out changeset e1f191aad863 (bug 1356569) 2017-04-14 23:39:17 +02:00
Sebastian Hengst
738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
93a734a3ce Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Wes Kocher
514e230373 Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
ffxbld
32e6a63b97 No bug, Automated HPKP preload list update from host bld-linux64-spot-362 - a=hpkp-update 2017-04-13 07:54:30 -07:00
ffxbld
cba3850a02 No bug, Automated HSTS preload list update from host bld-linux64-spot-362 - a=hsts-update 2017-04-13 07:54:28 -07:00
Wes Kocher
2986c817dc Merge autoland to central, a=merge CLOSED TREE 2017-04-12 15:13:30 -07:00
David Keeler
d35dad15a5 bug 1353216 - disable certificate transparency processing for performance concerns r=jcj
MozReview-Commit-ID: 2k7FwC5RCWC

--HG--
extra : rebase_source : 00abdf845929f247bdbb1007a94928f18f8194f4
2017-04-12 10:13:29 -07:00
David Keeler
47263aefb3 bug 1349762 - handle two GlobalSign EV root transfers r=Cykesiopka,jcj
(adapted from bug 1349762 comment 0)
Google Trust Services (GTS) recently purchased two roots from GlobalSign that
are both enabled for EV treatment: "GlobalSign Root CA - R2" and "GlobalSign ECC
Root CA - R4".

However, GTS does not have an EV audit, so we are going to turn off EV treatment
for both of those root certificates.

But "GlobalSign Root CA - R2" has intermediate cert "GlobalSign Extended
Validation CA - SHA256 - G2" that continues to be controlled by GlobalSign, to
be used to migrate their customers off dependence on that root.

This patch removes EV treatment for "GlobalSign ECC Root CA - R4". It also
removes EV treatment for all chains rooted in "GlobalSign Root CA - R2" unless
the "GlobalSign Extended Validation CA - SHA256 - G2" intermediate is in the
chain.

MozReview-Commit-ID: Ej9L9zTwoPN

--HG--
extra : rebase_source : 575f1a48646cf728d879d0cf53c888654e4a32ad
2017-04-03 17:17:38 -07:00
ffxbld
2fc8c8d483 No bug, Automated HPKP preload list update from host bld-linux64-spot-303 - a=hpkp-update 2017-04-11 08:57:53 -07:00
ffxbld
7f47ddac39 No bug, Automated HSTS preload list update from host bld-linux64-spot-303 - a=hsts-update 2017-04-11 08:57:50 -07:00
Ehsan Akhgari
1d72f5911e Bug 1347461 - Part 2: Always initialize all DataStorage classes in the content process at initialization time; r=keeler 2017-04-10 22:44:36 -04:00
Ehsan Akhgari
c0b6db9d07 Bug 1347461 - Part 1: Add a C++ API for the list of DataStorage classes; r=keeler 2017-04-10 22:44:32 -04:00
ffxbld
624d25b298 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-04-10 07:41:09 -07:00
ffxbld
b365172b0d No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-04-10 07:41:06 -07:00
Franziskus Kiefer
8cab0b55cc Bug 1345368 - land NSS 7228445b43ac, r=me 2017-04-10 06:00:57 +02:00
Franziskus Kiefer
de3194dead Bug 1345368 - root hashes follow-up
--HG--
extra : rebase_source : 3a66b23bb951e77d67db10dfcf1703e4e3899826
2017-04-13 10:42:05 +02:00
ffxbld
eace920a03 No bug, Automated HPKP preload list update from host bld-linux64-spot-325 - a=hpkp-update 2017-04-09 08:46:38 -07:00
ffxbld
f409b0e1aa No bug, Automated HSTS preload list update from host bld-linux64-spot-325 - a=hsts-update 2017-04-09 08:46:35 -07:00
ffxbld
c4fdb67bca No bug, Automated HPKP preload list update from host bld-linux64-spot-382 - a=hpkp-update 2017-04-08 07:53:50 -07:00
ffxbld
f0ff3df6e9 No bug, Automated HSTS preload list update from host bld-linux64-spot-382 - a=hsts-update 2017-04-08 07:53:47 -07:00
ffxbld
1d4ad52861 No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-04-07 08:52:29 -07:00
ffxbld
f0a8966894 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-04-07 08:52:27 -07:00
Mark Banner
585bf398ea Bug 1342459 - Enable no-undef on browser/base, and clean up unnecessary no-undef references. r=mossop
MozReview-Commit-ID: KVrAnAjMD1E

--HG--
extra : rebase_source : 7a9651c055e2c6e959d42d08e5be9de2e2265346
2017-04-03 11:46:56 +01:00
ffxbld
fcd9f1480d No bug, Automated HPKP preload list update from host bld-linux64-spot-382 - a=hpkp-update 2017-04-06 07:59:12 -07:00
ffxbld
09db00ce74 No bug, Automated HSTS preload list update from host bld-linux64-spot-382 - a=hsts-update 2017-04-06 07:59:09 -07:00
Kate McKinley
d082c41757 Bug 1322044 - Only mark a subdomain cached when includeSubDomains is true r=ckerschb,keeler
MozReview-Commit-ID: 3lFkuLauyGg

--HG--
extra : rebase_source : c356f1d4bef73b634eed6ca4d8078281ebc3ce3c
2017-02-13 13:36:01 +09:00
Wes Kocher
264adb55c2 Merge m-c to autoland, a=merge 2017-04-05 14:20:01 -07:00
ffxbld
b8cce08120 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-04-05 08:18:11 -07:00
ffxbld
82ea6b684f No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-04-05 08:18:09 -07:00
Cykesiopka
a4b87029fc Bug 1346315 - Enable gcc/clang -Wextra for security/apps/, security/manager/pki/ and security/manager/ssl/. r=keeler
-Wextra implies -Wmissing-field-initializers, but since the latter warning seems
to warn about mostly uninteresting instances (XPCOM module definitions etc), we
disable it for now.

(Note that -Wall is already enabled by default for all directories for gcc and
clang.)

MozReview-Commit-ID: 8RdF51sLPC8

--HG--
extra : rebase_source : 003c1c04e090ec215d058f5adf4c9e72558bbae3
2017-04-04 16:56:26 +08:00
Patrick McManus
58fc1b834e Bug 1337791 - Part 1: JoinConnection() from psm. r=keeler 2017-04-03 17:23:09 -04:00
ffxbld
e1482d742a No bug, Automated HPKP preload list update from host bld-linux64-spot-314 - a=hpkp-update 2017-04-04 07:51:21 -07:00
ffxbld
1d823b887b No bug, Automated HSTS preload list update from host bld-linux64-spot-314 - a=hsts-update 2017-04-04 07:51:19 -07:00
ffxbld
381a7b8f8a No bug, Automated HPKP preload list update from host bld-linux64-spot-382 - a=hpkp-update 2017-04-03 08:07:24 -07:00
ffxbld
89740567f2 No bug, Automated HSTS preload list update from host bld-linux64-spot-382 - a=hsts-update 2017-04-03 08:07:21 -07:00
ffxbld
de880295b7 No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-04-02 07:47:41 -07:00
ffxbld
c5fb8d9bde No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-04-02 07:47:38 -07:00
ffxbld
fd99701caf No bug, Automated HPKP preload list update from host bld-linux64-spot-308 - a=hpkp-update 2017-04-01 08:01:15 -07:00
ffxbld
91174d78b7 No bug, Automated HSTS preload list update from host bld-linux64-spot-308 - a=hsts-update 2017-04-01 08:01:12 -07:00
Wes Kocher
23ba88918a Merge m-c to autoland, a=merge 2017-03-31 17:52:17 -07:00
ffxbld
4e20a5b623 No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-03-31 08:52:14 -07:00
ffxbld
7df2a596c5 No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-03-31 08:52:11 -07:00
David Keeler
11c347b6b7 bug 1351604 - don't ship DER.jsm and X509.jsm until they're actually used in production r=Cykesiopka
MozReview-Commit-ID: 2DlMrB5TfKU

--HG--
extra : rebase_source : 9944352ccc66a5fdbd843bda8e4d2b26328d1bdd
2017-03-30 11:00:54 -07:00
Wes Kocher
f48488db89 Backed out changeset e46f832ac262 (bug 1351604) for browser_all_files_referenced.js failures a=backout
--HG--
extra : rebase_source : a091c76e54559dafa6435c22962231249c9dbac1
2017-03-31 13:20:37 -07:00
David Keeler
093a9fef3a bug 1351604 - don't ship DER.jsm and X509.jsm until they're actually used in production r=Cykesiopka
MozReview-Commit-ID: 2DlMrB5TfKU

--HG--
extra : rebase_source : eef6c21564d831feda43c85e14630b495b5b5761
2017-03-30 11:00:54 -07:00
David Keeler
cb2ce54903 bug 1347859 - prevent dialog overflow in certificate exception dialog by resizing to content r=Cykesiopka
MozReview-Commit-ID: HDjE9QldcxF

--HG--
extra : rebase_source : c0240e37ee10ece4e908b0f542627ab41457242a
2017-03-30 14:00:29 -07:00
ffxbld
8aa12a88dc No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-03-30 07:59:23 -07:00
ffxbld
27b59fd695 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-03-30 07:59:20 -07:00
Cykesiopka
f4a14ffb4c Bug 1342737 - Avoid using nsCRT.h and nsCRTGlue.h in PSM. r=keeler
There are a few places where we can use the safer functionality provided by the
Mozilla string classes instead.

Also fixes Bug 1268657 (remove vestigial
TransportSecurityInfo::SetShortSecurityDescription declaration).

MozReview-Commit-ID: Cxv5B4bsDua

--HG--
extra : rebase_source : 074a154c9000807d6dd466f23e92289e0d4c76d8
2017-03-28 22:57:15 +08:00
Cykesiopka
593e14fdee Bug 1350599 - Use guaranteed preloaded test domains instead of real domains in HSTS tests. r=keeler
Some of our tests currently assume that certain real domains are HSTS preloaded.
While most of the time these domains are in fact preloaded, this may change
during periods of maintenance or other events.

To avoid this, the changes here perform the following renames:
bugzilla.mozilla.org -> includesubdomains.preloaded.test
login.persona.org -> includesubdomains2.preloaded.test
www.torproject.org -> noincludesubdomains.preloaded.test

In addition, some tests that refer to mozilla.com (but don't depend on it being
preloaded) are made to refer to example.com instead to avoid referring to real
domains in tests.

MozReview-Commit-ID: 3987moJnKGk

--HG--
extra : rebase_source : 0ec49c9a410ba891f11668e7e11c48b7547e1825
2017-03-27 22:56:38 +08:00
Cykesiopka
0e63ffc494 Bug 1350868 - Semi-manually update nsSTSPreloadList.inc to include test domains. r=keeler
Periodic updates on m-c are currently broken due to Bug 1350619, so this change
inserts the test domains into the preload list semi-manually.

MozReview-Commit-ID: EBOiQcKDSHr

--HG--
extra : rebase_source : bc5880af95dc9934132d0e9251d9060ad9c6871a
2017-03-29 07:21:34 +08:00
Cykesiopka
bbd1adad48 Bug 1350868 - Make HSTS preload script preload test domains for use in tests. r=keeler
This lets us migrate off depending on real preloaded domains and onto
domains that are guaranteed to have the correct characteristics.

MozReview-Commit-ID: 4TyOfdIA9I7

--HG--
extra : rebase_source : f49109de9292dec31b72d87819dd52b5a6b659ed
2017-03-29 07:21:01 +08:00
Rajesh Kathiriya
2fed5cd52a Bug 1354515 - Removed duplicate ESLint rules in security/manager r=standard8
MozReview-Commit-ID: 8H7iE1wu2hW

--HG--
extra : rebase_source : 18c334e356a56ee9d5a8bb0f74586f329ba3114c
2017-04-22 15:41:34 +05:30
Cykesiopka
dbb0d99a70 Bug 1319252 - Remove nsIX509Cert.getAllTokenNames(). r=keeler,mossop
nsIX509Cert.getAllTokenNames() is only used (improperly) to determine if a
certificate is a built-in. nsIX509Cert.isBuiltInRoot should be used instead.

MozReview-Commit-ID: LBwI8nTc05C

--HG--
extra : rebase_source : 9494cd1243395b0d293022e981f64be560a54dec
2017-03-19 16:02:26 +08:00
Phil Ringnalda
81c566a8a2 Merge autoland to m-c, a=merge 2017-03-25 18:38:42 -07:00
Phil Ringnalda
2e782ce511 Bug 1350599 - disable hsts tests which depend on bugzilla.mozilla.org always being in the preload list, a=bustage
--HG--
extra : source : 997b98cce1aebf76641e14c79ac250cdb147041c
2017-03-25 14:04:24 -07:00
David Keeler
d4f3dd148e bug 1345612 - avoid calling NS_NewURI on IP addresses when checking certificate overrides r=Cykesiopka
When determining if a certificate error override is allowed for a host, we
consult nsISiteSecurityService::IsSecureURI to see if the host is HSTS/HPKP.
This API takes an nsIURI, but the calling code only has a hostname as an
nsCString. Calling NS_NewURI works in all situations we will encounter except
when the hostname is an IPv6 address. Since IP addresses are never HSTS/HPKP
anyway, we can skip the NS_NewURI / IsSecureURI calls in those cases as a
workaround.

MozReview-Commit-ID: JXa8cGvqqTA

--HG--
extra : rebase_source : b8dcd2cb4211af230f867ce3954d5333b7a49684
2017-03-20 13:42:27 -07:00
ffxbld
e21d1dde53 No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-03-23 07:49:00 -07:00
ffxbld
4458112d90 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-03-23 07:48:58 -07:00
ffxbld
71d521184f No bug, Automated HPKP preload list update from host bld-linux64-spot-388 - a=hpkp-update 2017-03-22 07:50:19 -07:00
ffxbld
cebf9f4e25 No bug, Automated HSTS preload list update from host bld-linux64-spot-388 - a=hsts-update 2017-03-22 07:50:16 -07:00
Mark Banner
d7d8be9285 Bug 1347712 - Move toolkit/.eslintrc.js rules into a 'recommended' set within eslint-plugin-mozilla. r=jaws
MozReview-Commit-ID: Jy4apKnmWcV

--HG--
rename : toolkit/.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
extra : rebase_source : ae0c740c1c2a9cf620c1ac34024622ade12e6fd4
2017-03-22 10:43:00 +01:00
Mark Banner
bd625e4e9f Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6

--HG--
extra : rebase_source : 83eaf40c5cbb5e25cfb3f3b5afadf4fbf0422c92
2017-03-20 12:36:37 +01:00
Wes Kocher
9a54a919a0 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2LT2oEKZno8
2017-03-21 16:20:49 -07:00
ffxbld
06c4675584 No bug, Automated HPKP preload list update from host bld-linux64-spot-094 - a=hpkp-update 2017-03-21 08:22:11 -07:00
ffxbld
eb520767a4 No bug, Automated HSTS preload list update from host bld-linux64-spot-094 - a=hsts-update 2017-03-21 08:22:08 -07:00
ffxbld
ee7cfd05d7 No bug, Automated HPKP preload list update from host bld-linux64-spot-036 - a=hpkp-update 2017-03-20 08:25:08 -07:00
ffxbld
e5d6472d23 No bug, Automated HSTS preload list update from host bld-linux64-spot-036 - a=hsts-update 2017-03-20 08:25:05 -07:00
David Keeler
39eddacacc bug 1344478 - isAlreadyShutDown should return true for nsNSSShutDownObjects created after NSS shut down r=Cykesiopka,ttaubert
MozReview-Commit-ID: 5bUTLz6mGKC

In general, it is possible to create a new nsNSSShutDownObject after
nsNSSShutDownList::shutdown() had been called. Before this patch, at that point,
isAlreadyShutDown() would incorrectly return false, which could lead to code
calling NSS functions, which would probably lead to a crash (because NSS could
be uninitialized at that point). This change merges
nsNSSShutDownList::shutdown() with evaporateAllNSSResources() into
evaporateAllNSSResourcesAndShutDown() for simplicity and makes it so
isAlreadyShutDown() returns true if called after that point.

--HG--
extra : rebase_source : badab89a9e197f18fcd943f16cc77c6aa6664f0d
2017-03-13 15:26:40 -07:00
ffxbld
cd43949ff3 No bug, Automated HPKP preload list update from host bld-linux64-spot-022 - a=hpkp-update 2017-03-19 08:13:10 -07:00
ffxbld
076dd6fc40 No bug, Automated HSTS preload list update from host bld-linux64-spot-022 - a=hsts-update 2017-03-19 08:13:07 -07:00
Sebastian Hengst
b65c89dc29 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: LKBh8rimLx2
2017-03-18 16:16:20 +01:00
ffxbld
ce7c4bf1e0 No bug, Automated HPKP preload list update from host bld-linux64-spot-022 - a=hpkp-update 2017-03-18 08:07:40 -07:00
ffxbld
3b9e9a6e0f No bug, Automated HSTS preload list update from host bld-linux64-spot-022 - a=hsts-update 2017-03-18 08:07:37 -07:00
ffxbld
c2a60adfc7 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-03-17 08:38:33 -07:00
ffxbld
21a93c9f95 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-03-17 08:38:31 -07:00
David Keeler
82a2ae61a8 bug 1348713 - ensure CT information is set in the case of session resumption r=jcj
MozReview-Commit-ID: 7fLnMu9f1kC

--HG--
extra : rebase_source : ca5ccbf40b715bb0c9d6869da3820e55c7564df5
2017-03-20 17:10:33 -07:00
Cykesiopka
7995951109 Bug 1338897 - Avoid using NSS Base64 functions in PSM. r=keeler
The NSS Base64 functions are less safe and convenient to use than the XPCOM ones.
They're also an unnecessary dependency on NSS.

The NSS Base64 functions behave slightly differently than the XPCOM ones:
1. ATOB_ConvertAsciiToItem() / NSSBase64_DecodeBuffer() silently ignore invalid
   characters like CRLF, space and so on. Base64Decode() will return an error
   if these characters are encountered.
2. BTOA_DataToAscii() will produce output that has CRLF inserted every 64
   characters. Base64Encode() doesn't do this.

For the reasons listed below, no unexpected compatibility issues should arise:
1. AppSignatureVerification.cpp already filters out CRLF and spaces for Manifest
   and Signature values before decoding.
2. ExtendedValidation.cpp is only given what should be valid hard-coded input to
   decode.
3. ContentSignatureVerifier.cpp already splits on CRLF for when it needs to
   decode PEM certs. Spaces shouldn't be likely.
   For Content-Signature header verification, examination of real input to a
   running instance of Firefox suggests CRLF and spaces will not be present in
   the header to decode.
4. nsCryptoHash.cpp encode is affected, but we actually don't want the CRLF
   behaviour.
5. nsDataSignatureVerifier.cpp decode is affected, but we add whitespace
   stripping to maintain backwards compatibility.
6. nsKeygenHandler.cpp encode is affected, but the previous CRLF behaviour was
   arguably a bug, since neither WHATWG or W3C specs specified this.

MozReview-Commit-ID: IWMFxqVZMeX

--HG--
extra : rebase_source : 4863b2e5eabef0555e8e1ebe39216d0d9393f3e9
2017-03-17 23:31:40 +08:00
Wes Kocher
1b3ffba4d5 Merge m-c to autoland, a=merge
MozReview-Commit-ID: CtdOO1SeODv
2017-03-16 14:07:44 -07:00
Wes Kocher
653e4de273 Merge autoland to central, a=merge
MozReview-Commit-ID: EeBZDKaZKly
2017-03-16 13:38:47 -07:00
ffxbld
006005beff No bug, Automated HPKP preload list update from host bld-linux64-spot-308 - a=hpkp-update 2017-03-16 07:57:12 -07:00
ffxbld
d003925309 No bug, Automated HSTS preload list update from host bld-linux64-spot-308 - a=hsts-update 2017-03-16 07:57:09 -07:00
ffxbld
0aeaee1eb9 No bug, Automated HPKP preload list update from host bld-linux64-spot-038 - a=hpkp-update 2017-03-15 08:12:33 -07:00
ffxbld
00c6b3b68c No bug, Automated HSTS preload list update from host bld-linux64-spot-038 - a=hsts-update 2017-03-15 08:12:30 -07:00
flyingrub
a8f1cea361 Bug 1346299 - Remove Telemetry Probe: KEYGEN_GENERATED_KEY_TYPE r=jcj,keeler
Removed the probe in Histogram.json and the code related to it in nsKeygenHandler.cpp

MozReview-Commit-ID: E8lGbx19e2C

--HG--
extra : rebase_source : ef958749e6ad2e2b617fd1efdd09cdd3185bef18
2017-03-14 11:54:57 +01:00
Wes Kocher
0902d5e08e Merge m-c to inbound, a=merge
MozReview-Commit-ID: AzYu7EXTIlg
2017-03-14 17:23:26 -07:00
ffxbld
ca7015fa45 No bug, Automated HPKP preload list update from host bld-linux64-spot-032 - a=hpkp-update 2017-03-14 08:14:06 -07:00
ffxbld
9f405f7b6e No bug, Automated HSTS preload list update from host bld-linux64-spot-032 - a=hsts-update 2017-03-14 08:14:03 -07:00
Ehsan Akhgari
99f016e209 Bug 1346486 - Add a memory reporter for PSM DataStorage caches; r=keeler 2017-03-14 14:34:30 -04:00
Jim Porter
5e6b22bdde Bug 1346671 - Enable the no-useless-concat eslint rule in toolkit/ r=jaws
MozReview-Commit-ID: 1a422BiLEhK

--HG--
extra : rebase_source : a83b8d753e2a48593904ef0755d5517908588b93
2017-03-13 17:34:24 -05:00
David Major
dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao
5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major
40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
David Keeler
f69c130b16 bug 1239344 - remove error alert for successful PKCS12 operations r=Cykesiopka
MozReview-Commit-ID: Hr6s2v2GmZQ

--HG--
extra : rebase_source : 232c80db1816ab7045cc5dec42c1aeeae3fc6042
2017-03-03 11:12:54 -08:00
ffxbld
a5c2b27889 No bug, Automated HPKP preload list update from host bld-linux64-spot-389 - a=hpkp-update 2017-03-13 07:39:08 -07:00
ffxbld
556a1935e6 No bug, Automated HSTS preload list update from host bld-linux64-spot-389 - a=hsts-update 2017-03-13 07:39:06 -07:00
Carsten "Tomcat" Book
c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Carsten "Tomcat" Book
70def79ce3 merge autoland to mozilla-central a=merge 2017-03-13 15:19:25 +01:00
ffxbld
ef0b6a528e No bug, Automated HPKP preload list update from host bld-linux64-spot-084 - a=hpkp-update 2017-03-12 07:51:58 -07:00
ffxbld
49c84ad753 No bug, Automated HSTS preload list update from host bld-linux64-spot-084 - a=hsts-update 2017-03-12 07:51:55 -07:00
ffxbld
36c8dd04de No bug, Automated HPKP preload list update from host bld-linux64-spot-032 - a=hpkp-update 2017-03-11 08:02:19 -08:00
ffxbld
ffc08830b6 No bug, Automated HSTS preload list update from host bld-linux64-spot-032 - a=hsts-update 2017-03-11 08:02:16 -08:00
Ryan VanderMeulen
dc19643b13 Merge m-c to autoland. a=merge 2017-03-10 12:17:27 -05:00
ffxbld
4ae625dbd1 No bug, Automated HPKP preload list update from host bld-linux64-spot-034 - a=hpkp-update 2017-03-10 07:45:24 -08:00
ffxbld
0f55e2e2c7 No bug, Automated HSTS preload list update from host bld-linux64-spot-034 - a=hsts-update 2017-03-10 07:45:21 -08:00
David Keeler
70631ff92d bug 1339267 - re-work NSS initialization wrt thread/process etc. r=Cykesiopka,jcj
MozReview-Commit-ID: 2U4c8Xgf0bv

--HG--
extra : rebase_source : 14113cd3c823180c26398d4efb4d61d6f4f88dbc
2017-02-09 16:25:55 -08:00
Wes Kocher
395f8ef03d Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: 9rWj5LVFZMq
2017-03-09 14:11:57 -08:00
ffxbld
562f1b6a0e No bug, Automated HPKP preload list update from host bld-linux64-spot-380 - a=hpkp-update 2017-03-09 07:20:05 -08:00
ffxbld
fbff6ea92e No bug, Automated HSTS preload list update from host bld-linux64-spot-380 - a=hsts-update 2017-03-09 07:20:02 -08:00
Cykesiopka
c44c40b272 Bug 1344442 - Part 4: Misc cleanups. r=keeler
MozReview-Commit-ID: KRQGF3mUxEb

--HG--
extra : rebase_source : 8dcca6b5cee0d22d5af79a864bb3b881665da3b0
2017-03-08 20:54:02 +08:00
Cykesiopka
eac955eb32 Bug 1344442 - Part 3: Use smart pointers. r=keeler
MozReview-Commit-ID: 58BwdPYdjM5

--HG--
extra : rebase_source : 38d0b1af05cbc8991b5ed777bdafa9a8540a9cb1
2017-03-08 20:53:50 +08:00
Cykesiopka
2681aed2c3 Bug 1344442 - Part 2: Improve test coverage of nsICryptoHash and nsICryptoHMAC implementations. r=keeler
The equivalent base 64 digests for the existing test cases were obtained using:
> python2
> import binascii
> binascii.b2a_base64(binascii.unhexlify(<input hex>))

The large input hash digest was obtained like so:
> python2
> import hashlib
> hashlib.md5(" " * 4100).hexdigest()

The large input HMAC digest was obtained like so:
> python2
> import hashlib
> import hmac
> hmac.new("test", " " * 4100, hashlib.md5).hexdigest()

MozReview-Commit-ID: K0BxZdNemu6

--HG--
extra : rebase_source : e8fc9cb9c6b1d70c9162c6ed9fd49e6945dc57f4
2017-03-08 20:47:22 +08:00
Cykesiopka
8b9461cac0 Bug 1344442 - Part 1: Remove MD2 support from nsICryptoHMAC. r=keeler
There are several reasons for doing this:
1. Nothing appears to be using MD2 with nsICryptoHMAC.
2. There don't seem to be any test vectors available.
3. Bug 160161 suggests the MD2 case doesn't work anyways.

MozReview-Commit-ID: CW1PX7z09kB

--HG--
extra : rebase_source : de8b7e6f3fe03f5cd9d687fa7d410a2ca041b68e
2017-03-08 20:44:52 +08:00
Cykesiopka
6b0596a14c Bug 1344441 - Move various Necko IDLs that really ought to be PSM IDLs. r=keeler,mcmanus
These IDLs conceptually are PSM APIs, and are implemented in PSM as well.

nsICryptoFIPSInfo.idl is similar but is removed instead because:
1. It's unused even by addons.
2. The only thing it provides is also available through nsIPKCS11ModuleDB.idl.

MozReview-Commit-ID: K8R0wDAhjLq

--HG--
rename : netwerk/base/nsICryptoHMAC.idl => security/manager/ssl/nsICryptoHMAC.idl
rename : netwerk/base/nsICryptoHash.idl => security/manager/ssl/nsICryptoHash.idl
rename : netwerk/base/nsINSSErrorsService.idl => security/manager/ssl/nsINSSErrorsService.idl
extra : rebase_source : 3eca83901e14cea714d402046303790d283cff74
2017-03-05 18:30:31 +08:00
Carsten "Tomcat" Book
78ac0ceba9 merge mozilla-inbound to mozilla-central a=merge 2017-03-08 16:59:42 +01:00
ffxbld
db9f30ffce No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2017-03-08 07:37:49 -08:00
ffxbld
87294b1e74 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2017-03-08 07:37:46 -08:00
Sam Foster
589c1b5503 Bug 1344308 - Extend toolkit's eslint rules and fix lint errors in PSM r=jaws
* Remove eslint rules for PSM which are redundant with toolkit/.eslintrc.js
* Fix missing plugins block in mochitest.eslintrc.js
* Disable brace-style checking in mixed-content mochitests which use boilerplate where calls to runTest and afterNavigationTest all use opening brace on newline. I've left this for a follow-up.
* Fix lint errors resulting from new rules defined by toolkit's eslintrc.js

MozReview-Commit-ID: EepCLrzAsdM

--HG--
extra : rebase_source : e74e008403d9cd70703d60cf829af01dbede0353
2017-03-07 10:15:49 -08:00
Florian Quèze
9d62681259 Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
ffxbld
b208913028 No bug, Automated HPKP preload list update from host bld-linux64-spot-305 - a=hpkp-update 2017-03-07 07:29:46 -08:00
ffxbld
4fa257851d No bug, Automated HSTS preload list update from host bld-linux64-spot-305 - a=hsts-update 2017-03-07 07:29:43 -08:00
J.C. Jones
a51561a1c4 Bug 1260318 - Scope U2F Soft Tokens to a single AppID r=qdot,rbarnes
This change includes the FIDO "App ID" as part of the function used to generate
the wrapping key used in the NSS-based U2F soft token, cryptographically binding
the "Key Handle" to the site that Key Handle is intended for.

This is a breaking change with existing registered U2F keys, but since our soft
token is hidden behind a pref, it does not attempt to be backward-compatible.

- Updated for rbarnes' and qdot's reviews comments. Thanks!
- Made more strict in size restrictions, and added a version field
  to help us be this strict.
- Bugfix for an early unprotected buffer use (Thanks again rbarnes!)
- Fix a sneaky memory leak re: CryptoBuffer.ToSECItem

MozReview-Commit-ID: Jf6gNPauT4Y

--HG--
extra : rebase_source : 4ff5898e93e4a0a75576e5e54035a1cb6dd952d7
2017-02-01 15:21:04 -07:00
Ehsan Akhgari
e559e3333d Bug 1343731 - Remove the sync IPC during DataStorage initialization; r=keeler,billm
Instead of initializing DataStorage objects on demand in the content
process, we initialize them at content process startup by getting the
parent to send down the information about the existing DataStorages at
child process startup.  After that point, the dynamic change
notifications added in bug 1215723 will take care of keeping the
information in sync.
2017-03-10 22:35:07 -05:00
Joel Maher
41e6060a92 Bug 1344829 - add BUG_COMPONENT to security/* files. r=keeler
MozReview-Commit-ID: AS6e14FOqsb
2017-03-09 05:33:30 -05:00
Cykesiopka
0aa3a82f68 Bug 1310127 - Part 10: Handle netwerk/protocol/http MOZ_MUST_USE functions in PSM. r=wcpan
The only unhandled call updates nsHTTPListener::mHttpResponseContentType, but
nothing actually uses the value of mHttpResponseContentType.

MozReview-Commit-ID: FQXESvoO2ZN

--HG--
extra : rebase_source : 547158311de136054acff2539ea6a8bdbfb8227b
2016-12-28 16:25:22 +08:00
David Major
ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
ffxbld
86d9d13c29 No bug, Automated HPKP preload list update from host bld-linux64-spot-393 - a=hpkp-update 2017-03-06 07:21:45 -08:00
ffxbld
31efc98388 No bug, Automated HSTS preload list update from host bld-linux64-spot-393 - a=hsts-update 2017-03-06 07:21:43 -08:00
ffxbld
e844f7b79d No bug, Automated HPKP preload list update from host bld-linux64-spot-032 - a=hpkp-update 2017-03-05 08:00:14 -08:00
ffxbld
330b3dec22 No bug, Automated HSTS preload list update from host bld-linux64-spot-032 - a=hsts-update 2017-03-05 08:00:12 -08:00
ffxbld
8dcf6f318c No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update 2017-03-04 07:58:31 -08:00
ffxbld
e9085b277f No bug, Automated HSTS preload list update from host bld-linux64-spot-309 - a=hsts-update 2017-03-04 07:58:28 -08:00
Carsten "Tomcat" Book
06813a3df9 Merge mozilla-central to mozilla-inbound 2017-03-03 13:06:37 +01:00
Wes Kocher
901a8c09c1 Merge m-c to autoland, a=merge
MozReview-Commit-ID: AZeTEvGhLd1
2017-03-02 15:03:44 -08:00
ffxbld
546a05fec0 No bug, Automated HPKP preload list update from host bld-linux64-spot-031 - a=hpkp-update 2017-03-02 07:42:44 -08:00
ffxbld
52a438e1a4 No bug, Automated HSTS preload list update from host bld-linux64-spot-031 - a=hsts-update 2017-03-02 07:42:42 -08:00
Masatoshi Kimura
5716d510ff Bug 1279479 - Remove DHE cipher suites from TLS 1.3 ClientHello. r=keeler,mt
Hiding cipher suites behind fallback to measure the impact of DHE removal. This patch itself will not improve security because MITM can trigger the fallback.

Unlike the previous attempt, this patch will not affect WebRTC because it does not touch default cipher prefs.

MozReview-Commit-ID: 82paUEuPu99

--HG--
extra : rebase_source : dd08b00ca0d618d0e2ac9c79ae8f32610e724dbd
2017-03-01 20:57:08 +09:00
Andrea Marchesini
24004054a8 Bug 1334975 - Get rid of nsIFilePicker.show() use in gecko, r=ochameau 2017-03-03 09:42:27 +01:00
Wes Kocher
3f87d6f0d5 Merge m-c to autoland, a=merge b557bdc314e7
MozReview-Commit-ID: HDM5eTkVNDa
2017-03-01 16:27:28 -08:00
ffxbld
5fd3e1e3aa No bug, Automated HPKP preload list update from host bld-linux64-spot-039 - a=hpkp-update 2017-03-01 07:47:15 -08:00
ffxbld
c5c4be92d2 No bug, Automated HSTS preload list update from host bld-linux64-spot-039 - a=hsts-update 2017-03-01 07:47:12 -08:00
Cykesiopka
895edf7133 Bug 1338895 - Avoid non-smart string IDL types in remaining PSM IDL files. r=aklotz,keeler
Smart string classes like nsCString are safer to use than raw |char*| strings,
and are typically easier to deal with as well.

MozReview-Commit-ID: 18C293zWrJw

--HG--
extra : rebase_source : 350191d4c3047fb38d18e8c6d9370cd059007861
2017-02-26 20:36:40 +08:00
Mathieu Leplatre
0d98f89e16 Bug 1343216 - Add blocklist tags in xpcshell tests r=kmag
MozReview-Commit-ID: 8HDgdSSFxyU

--HG--
extra : rebase_source : 49a73ffcd60ea9f770ad7bc600512be19551fe5e
2017-03-02 11:23:24 +01:00
David Keeler
8fa9a9c682 bug 1294580 - prevent end-entity certificates from being their own trust anchors r=Cykesiopka
MozReview-Commit-ID: KaZaFG8AWwl

--HG--
extra : rebase_source : 8cba6d29febc73e65ff54bc754ab9d016e140d6f
2017-02-24 12:32:41 -08:00
ffxbld
4039fb4c58 No bug, Automated HPKP preload list update from host bld-linux64-spot-031 - a=hpkp-update 2017-02-27 07:28:02 -08:00
ffxbld
c8f79e9d17 No bug, Automated HSTS preload list update from host bld-linux64-spot-031 - a=hsts-update 2017-02-27 07:28:00 -08:00
Cykesiopka
58de7b2c68 Bug 1342075 - Make nsCertOverride::OverrideBits an enum class. r=keeler
MozReview-Commit-ID: 3aLyL9VDvpf

--HG--
extra : rebase_source : 3b4a1837ed8233ab5a1af71707ca92d7f3699041
2017-02-23 23:16:53 +08:00
ffxbld
90d1cbb4fd No bug, Automated HPKP preload list update from host bld-linux64-spot-307 - a=hpkp-update 2017-02-26 07:19:31 -08:00
ffxbld
5c63ba8319 No bug, Automated HSTS preload list update from host bld-linux64-spot-307 - a=hsts-update 2017-02-26 07:19:28 -08:00
ffxbld
93f1641e39 No bug, Automated HPKP preload list update from host bld-linux64-spot-361 - a=hpkp-update 2017-02-25 07:22:43 -08:00