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

34 Коммитов

Автор SHA1 Сообщение Дата
Nayeem Hasan 7d2a7165b4 Bug 1713523 - Remove 'else' after 'return' in CryptoBuffer. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D116934
2021-07-09 12:20:40 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Edgar Chen 9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Nathan Froyd f37a5156c3 Bug 1596547 - be more specific in CryptoBuffer::Assign parameter types; r=jcj
We don't need the full generality of templated typed arrays here, just
the ability to assign from `Uint8Array`.  Some versions of clang in
C++17 mode have problems with overload resolution when faced with
templated method parameters that resolve to base classes of the passed
arguments.  Using the more-specific type here avoids those bugs.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 13:12:58 +00:00
Barret Rennie 1e6227239a Bug 1289211 - Rename InfallibleTArray to nsTArray in dom/crypto/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D36943

--HG--
extra : moz-landing-system : lando
2019-07-10 03:25:56 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Nicholas Nethercote ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
J.C. Jones cdb5d484f9 Bug 1401803 - WebAuthn types need to return ArrayBuffers r=keeler
The Web Authentication types, by spec, return ArrayBuffer objects, while we
were returning a concrete Uint8Array. This is a fairly straightforward change
to add functionality to CryptoBuffer and the WebIDL types, however it's a
substantial change to the tests.

Frankly, the tests just could use another pass of clean-up now, since this is
a lot of relative ugliness added in. I refactored tab_webauthn_success.html
pretty heavily -- since it was also fairly ugly to start -- but I decided to go
with a lighter touch on the other tests.

MozReview-Commit-ID: 9vb1wdLo3SI

--HG--
rename : dom/webauthn/tests/browser/frame_webauthn_success.html => dom/webauthn/tests/browser/tab_webauthn_success.html
extra : rebase_source : bd2bc326c6bb5e00929b14c7aae66eba335c0605
2017-09-20 07:32:07 -07:00
J.C. Jones e6dd50ba10 Bug 1309284 - Implement W3C Web Authentication JS API [part 1] r=keeler,qdot
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
2017-01-09 13:22:49 -07:00
Kit Cambridge b3e4980239 Bug 1266569 - Avoid including the `ChromeUtils` binding in `Base64.h`. r=froydnj
MozReview-Commit-ID: 8ZLdMhJMaUe

--HG--
extra : rebase_source : d5cb2b5bcc587bad95e6223d18ef38c6937f9270
extra : histedit_source : 208b28d87e223333c2995fd615e0602b11d5bb68
2016-04-22 07:41:58 -07:00
Kit Cambridge 33ba9ca5c8 Bug 1256488 - Use Base64 URL-encoding in `CryptoBuffer`. r=ttaubert
MozReview-Commit-ID: AGtDUBuDuu0

--HG--
extra : rebase_source : d4d6edbc9e6b66ea6b2f93bf1875f52621569dfc
2016-03-17 14:13:09 -07:00
J.C. Jones 358a9ece05 Bug 1244960 - FIDO u2f NSSToken (Part 3): Review updates. r=keeler
MozReview-Commit-ID: FkPHy9GGarU

--HG--
extra : transplant_source : %8Dd0%BA%FD%E93%8E%A7%C5%01Cn%02%0F%0C%3E%5D%9C%96
2016-04-13 10:20:37 -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
J.C. Jones 70bc936cba Bug 1231681 - "Implement window.u2f interface". r=baku, r=dkeeler 2016-02-09 16:43:00 +01:00
Birunthan Mohanathas ea4a3be55c Bug 968520 - Use FallibleTArray::Clear instead of SetLength(0). r=froydnj
This preemptively fixes the upcoming -Wunused-result warnings due to unchecked
SetLength calls.
2015-05-28 11:07:43 -07:00
Birunthan Mohanathas 5ef5f55364 Bug 968520 - Add mozilla::fallible to Fallible{Auto,}TArray::ReplaceElementsAt calls. r=froydnj 2015-05-18 13:50:35 -07:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Tim Taubert 5fa60d8646 Bug 1034856 - Remove CryptoBuffer::ToSECItem() using moz_malloc() r=rbarnes 2014-09-03 09:40:21 -04:00
Tim Taubert 5fc05b064c Bug 1034856 - Implement generateKey() for DH r=rbarnes 2014-07-20 06:38:44 +02:00
Richard Barnes 63afe24da8 Bug 1037892 - Implement changes to WebCrypto API from latest Editor's Draft r=bz,ttaubert 2014-09-27 14:22:57 -04:00
Wes Kocher 6341575225 Backed out changeset 398bdeea30b0 (bug 1037892) for build bustage 2014-09-26 15:35:38 -07:00
Richard Barnes 8a9d1659d6 Bug 1037892 - Implement changes to WebCrypto API from latest Editor's Draft r=bz,ttaubert
* * *
Add check for old structured clone format.
2014-09-26 17:36:39 -04:00
Tim Taubert 400f767c33 Bug 1049434 - Don't allocate SECItems with new operator r=rbarnes 2014-08-06 12:15:35 +02:00
Tim Taubert cf9076f009 Backed out changeset 5184f19384c8 (bug 1049434) 2014-08-07 09:21:13 +02:00
Tim Taubert 17d1371eb6 Bug 1049434 - Don't allocate SECItems with new operator r=rbarnes 2014-08-06 12:15:35 +02:00
Richard Barnes e10fdbd715 Bug 1025230 - Allow import/export of JWK-formatted keys in WebCrypto r=bz,keeler 2014-07-19 08:25:00 -05:00
Richard Barnes 58860abf23 Bug 1034851 - Add wrapKey and unwrapKey methods to WebCrypto API r=bz 2014-07-19 08:24:00 -05:00
Jeff Walden 96e2ce765d Bug 999651, bug 995679, bug 1009952, bug 1011007, bug 991981. r=sfink, r=shu, r=jandem, r=jdm, r=luke, r=bbouvier, r=nmatsakis, r=bz, r=ehsan, r=jgilbert, r=smaug, r=sicking, r=terrence, r=bholley, r=bent, r=efaust, r=jorendorff 2014-05-27 14:32:41 -07:00
Ryan VanderMeulen 095b86b386 Backed out changeset 2c631967ab9e (bug 999651) for B2G crashes.
CLOSED TREE
2014-05-27 14:08:30 -04:00
Jeff Walden 06f73fbe81 Bug 999651, bug 995679, bug 1009952, bug 1011007, bug 991981. r=sfink, r=shu, r=jandem, r=jdm, r=luke, r=bbouvier, r=nmatsakis, r=bz, r=ehsan, r=jgilbert, r=smaug, r=sicking, r=terrence, r=bholley, r=bent 2014-05-27 09:56:43 -07:00
Richard Barnes 01fedee2de Bug 998471 - Add support for key generation to WebCrypto API. r=bz,dkeeler
* * *
Change from SetCapacity to SetLength so that strings clone properly
2014-05-26 12:05:00 +02:00
Richard Barnes 513ac90185 Bug 995385 - Add WebCrypto WebIDL interfaces. r=bz, r=cviecco, r=dkeeler 2014-05-15 06:20:00 -04:00