Commit Graph

4706 Commits

Author SHA1 Message Date
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
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