Skip to content

Commit

Permalink
simplified getSupportedPinUvAuthProtocol
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Oct 31, 2023
1 parent ec02b1f commit 2666e4e
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,15 @@ private boolean getCtapUv(String userVerification, boolean pinProvided) throws C
* supported protocols.
*/
private PinUvAuthProtocol getPreferredPinUvAuthProtocol(List<Integer> pinUvAuthProtocols) {
for (int protocol : pinUvAuthProtocols) {
if (pinSupported && protocol == PinUvAuthProtocolV1.VERSION) {
return new PinUvAuthProtocolV1();
}
if (pinSupported) {
for (int protocol : pinUvAuthProtocols) {
if (protocol == PinUvAuthProtocolV1.VERSION) {
return new PinUvAuthProtocolV1();
}

if (pinSupported && protocol == PinUvAuthProtocolV2.VERSION) {
return new PinUvAuthProtocolV2();
if (protocol == PinUvAuthProtocolV2.VERSION) {
return new PinUvAuthProtocolV2();
}
}
}

Expand Down

0 comments on commit 2666e4e

Please sign in to comment.