DescriptionIssue 356320: Pinless entry not working on Windows.
The problem is that we initialize pairing_registry_delegate_ in both OnInitializePairingRegistry and CreateAuthenticatorFactory (from StartHost and OnPolicyUpdate). The former runs on the UI thread and the latter runs on the network thread. The feature works only if OnInitializePairingRegistry is invoked first.
I fixed the race condition on pairing_registry_delegate_ initialization in HostProcess by:
1. store the PairingRegistry object instead of the delegate object, and
2. recreate the authenticator factory object when the network process receives the reg keys for pinless auth from the daemon process, and
3. always create the PairingRegistry object and the authenticator factory on the network thread.
Now everything runs on the network thread. If the network process receives the pinless auth reg key handles from the daemon process after StartHost has completed, we will simply recreate the authenticator factory.
BUG=356320
Committed: https://crrev.com/fec693f0b30ce3c21a0df420ee8e68cc190ad318
Cr-Commit-Position: refs/heads/master@{#310559}
Patch Set 1 #Patch Set 2 : #
Total comments: 8
Patch Set 3 : Addressing CR feedback #Patch Set 4 : #
Total comments: 4
Patch Set 5 : #Messages
Total messages: 11 (2 generated)
|