device/fido: have caBLE discovery own the discovery data.
Previously, caBLE discovery dealt with a const pointer to a |CableDiscoveryData| because the only possible |CableDiscoveryData| objects were those given via the WebAuthn extension. In the future, we'll need to be able to create |CableDiscoveryData| objects from candidate EIDs because they could also match a QR code. Thus, rejig the functions to return an optional |CableDiscoveryData| rather than a const pointer. The Bluetooth stack returns UUIDs as strings and the previous implementation hex-encoded the expected UUID and matched the resulting string. Since we now need to get the binary EID, the UUID needs to be parsed instead. That leaves the binary-to-string encoding function as something that's only used in a unittest, so the function moves into that unit test in this change. Change-Id: I3e675bcec66bf2416df4945ec1b2487962971729 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753697 Commit-Queue: Adam Langley <agl@chromium.org> Reviewed-by:Martin Kreichgauer <martinkr@google.com> Cr-Commit-Position: refs/heads/master@{#690810}
Showing
Please register or sign in to comment