Closed Bug 1401803 Opened 7 years ago Closed 7 years ago

[WebAuth] Return ArrayBuffer instead of UInt8Array

Categories

(Core :: DOM: Device Interfaces, enhancement)

57 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: mwobensmith, Assigned: jcj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

As surfaced in interop testing, we should return objects of type ArrayBuffer instead of UInt8Array objects.

This will require modification of existing tests as well.
Comment on attachment 8913433 [details]
Bug 1401803 - WebAuthn types need to return ArrayBuffers

https://reviewboard.mozilla.org/r/184768/#review190162

LGTM - just the one comment.

::: dom/webauthn/tests/u2futil.js:288
(Diff revision 1)
>  }
>  
>  function verifySignature(key, data, derSig) {
> -  let sigAsn1 = org.pkijs.fromBER(derSig.buffer);
> +  if (derSig.byteLength < 70) {
> +    console.log("bad sig: " + hexEncode(new Uint8Array(derSig)))
> +    throw "Invalid signature length: " + derSig.byteLength;

Should this be `return Promise.reject("...");`?
Attachment #8913433 - Flags: review?(dkeeler) → review+
Comment on attachment 8913433 [details]
Bug 1401803 - WebAuthn types need to return ArrayBuffers

https://reviewboard.mozilla.org/r/184768/#review190162

Thanks for the review!

> Should this be `return Promise.reject("...");`?

Wouldn't hurt!
Try run is OK. Marking checkin-needed.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b4e07901ada4
WebAuthn types need to return ArrayBuffers r=keeler
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b4e07901ada4
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1405431
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: