fido/bio: make virtual biometric authenticator stateful

The current bio enrollment implementation in the virtual CTAP2 device
is stateless and does not have any storage. This CL makes it stateful
by tracking enrollments, remaining samples, and current enrollment

Note that I am also considering switching the list of enrollments from
vector<pair<vector<uint8_t>, string>> to map<vector<uint8_t>, string>
for readability and simplified code in the virtual device. Feedback on
that idea would be much appreciated!

Bug: 974046
Change-Id: I8d2b1b5963b37989aea02d32596a34bbbbd6e774
Commit-Queue: Matthew Webb <>
Reviewed-by: Kim Paulhamus <>
Reviewed-by: Martin Kreichgauer <>
Cr-Commit-Position: refs/heads/master@{#672250}
7 files changed