This patch implements the W3C Web Authentication API from
https://www.w3.org/TR/webauthn/, currently the 28 September 2016
working draft.
It utilizes a tentative binding of the U2F NSS Soft Token to provide
authentication services while waiting on Bug 1245527 to support USB HID-based
U2F tokens. This binding is not in the specification yet, so it should be
considered an experiment to help the specification move fowrard.
There are also a handful of deviations from the specification's WebIDL, which
are annotated with comments in WebAuthentication.webidl.
There are no tests in this commit; they are in Part 4 of this commit series.
There is a small script online at https://webauthn.bin.coffee/ to exercise this
code, but it doesn't do any automated checks.
There are also a handful of TODOS:
1) The algorithm to relax the same-origin restriction is in Part 3.
2) The use of AlgorithmIdentifier and having a way to coerce an object to a
string is still missing.
3) Timeouts and deadlines aren't there, and are pending reworking how
the nsIU2FToken interface works.
UPDATED:
- Address qdot, keeler review comments (thanks!)
- Address more qdot, keeler review comments (thanks!)
MozReview-Commit-ID: JITapI38iOh
--HG--
extra : rebase_source : 9a09e852dd0c8dc47f42dabbcf8b845a6828b225
Convert events used in MulticastDNSManager to
GeckoBundle/BundleEventListener events. MulticastDNSManager also sends
observer notifications from Java to Gecko, and that converts nicely to
using the new unified EventDispatcher on both sides. The patch also
hides some logging behind a flag to reduce logcat clutter.
The new version has the following improvements.
- If the non-data part is empty, the spec isn't duplicated at all for parsing;
otherwise, only the non-data part gets copied. This avoids a potential OOM
case when the data part is large.
- The base64 parsing is moved later. It now only occurs once we've determined
that the non-data part is non-empty.
- It now uses |sizeof| consistently to get the length of string literals.
Previously it was a mix of |sizeof|, strlen() and hard-coded lengths.
- There's now no need to undo null-insertion once parsing is finished, because
the parsing is done on a local copy of the non-data part.
--HG--
extra : rebase_source : 893f0e9c453561622f71fe8e61e03e7d533c4080
Now that bug 1290209 has landed, we can make StyleSheet.disabled work in Servo
styled documents. This fixes a bunch of test crashes due to the assertion no
longer firing.
MozReview-Commit-ID: 6sLrdrxWlvK
--HG--
extra : rebase_source : cf8ab29f98fbba6be837a38ffe2a03ed9b33b701
Unfortunately, this doesn't cover delegated OCSP responder certificates. While
gathering telemetry on the use of SHA-1, we encountered bug 1183822 (basically,
that the method of gathering telemetry was causing OCSP verification failures
due to delegated responders signed with SHA-1). As a temporary solution, we
changed the verifier to always allow SHA-1 for OCSP certificates when verifying
an OCSP response. Consequently, we now have no idea what the compatibility
impact of disabling SHA-1 in OCSP responder certificates will be, so it's
probably not a good idea to do that right now.
Even if someone does manage to forge an OCSP responder certificate using a SHA-1
collision, they will have about as much power as an active network attacker
blocking OCSP requests or injecting bad stapled OCSP responses, so this isn't a
disaster.
MozReview-Commit-ID: 10r23W1APiR
--HG--
extra : rebase_source : dc003c4812677c40882506b1b6b1e1f68d7e6e92
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.
This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.
MozReview-Commit-ID: 3vwhS55Yzt
--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
Also removed unused format selectors and removed option to pass in a locale. Changed all callers to use new version.
MozReview-Commit-ID: Gq0b1c3C1eO
--HG--
rename : intl/locale/unix/nsDateTimeFormatUnix.cpp => intl/locale/DateTimeFormatUnix.cpp
extra : source : 7e747433d1c9fae8a0acb4090f61335fcc165e4c
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS.
This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.
MozReview-Commit-ID: 3vwhS55Yzt
--HG--
extra : rebase_source : dffab11abf7d4b57fa54475fd22e71b84375cd7b
This patch tries to figure out which DocGroup or TabGroup a network request
belongs to and then assign the IPC actor to that group. A DocGroup roughly
corresponds to a document and a TabGroup to a tab. Once the assignment is
made, all incoming IPC messages will be labeled with that DocGroup/TabGroup.
MozReview-Commit-ID: EzGCeGdREHl
This obviates some uses of nsIX509CertDB.findCertByNickname. Other uses are
replaced by equivalent functionality.
MozReview-Commit-ID: 5NCy9mww560
--HG--
extra : rebase_source : cc8506da86e86ae2edef1309e3eb2fddbf8f757e
* TestUDPSocket wasn't initializing it's members properly, fixup by mcmanus
* Scope the netwerk TestCommon waiting to be non-global, and add assertions so that waiting is deterministic. r=mcmanus
MozReview-Commit-ID: 7jLgNIujrbu
--HG--
extra : rebase_source : fabee29260f06686e874d0130cb00067c769ad6f