[webkit-reviews] review granted: [Bug 237984] [WebAuthn] Support makeCredential for virtual HID authenticators : [Attachment 454898] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 16:15:53 PDT 2022


Brent Fulgham <bfulgham at webkit.org> has granted j_pascoe at apple.com
<j_pascoe at apple.com>'s request for review:
Bug 237984: [WebAuthn] Support makeCredential for virtual HID authenticators
https://bugs.webkit.org/show_bug.cgi?id=237984

Attachment 454898: Patch

https://bugs.webkit.org/attachment.cgi?id=454898&action=review




--- Comment #3 from Brent Fulgham <bfulgham at webkit.org> ---
Comment on attachment 454898
  --> https://bugs.webkit.org/attachment.cgi?id=454898
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=454898&action=review

r=me

>
Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.mm:
41
> +    int8_t flags = 0b01000000; // AT set

Nit: It might be nice to define constants for these values:

constexpr int8_t ATset = 0b01000000;
... etc...

>
Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.mm:
45
> +	   flags = flags | 0b00000100;

Then you could explain what this one means :-)

> Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualCredential.h:39
> +    bool isVerificationRequired;

Nit: Putting the bools together at the end of the struct can allow better
packing of the structure and reduce memory use.

>
Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualHidConnection.cpp:230
> +	       Vector<uint8_t> buffer;

Is buffer ever large enough that it's worth hinting the size of the buffer
before appending using the 'reserveCapacity' method?

buffer.reserveCapacity(payload.size() + 1)

Scanning through the code, there might be a number of places in the WebAuthn
code where this could be helpful.


More information about the webkit-reviews mailing list