Skip to content

Commit

Permalink
[WebAuthn] Support all valid FIDO NFC tag types
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=234616
rdar://85871173

Reviewed by Darin Adler.

This patch modifies a check when looking for FIDO nfc tags
to support all valid FIDO tag types.

Tested using physical NFC tags provided for this bug.

* Platform/spi/Cocoa/NearFieldSPI.h:
* UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
(WebKit::NfcConnection::didDetectTags):



Canonical link: https://commits.webkit.org/246241@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
pascoej committed Jan 21, 2022
1 parent 6086fb2 commit 7950d3d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
17 changes: 17 additions & 0 deletions Source/WebKit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2022-01-20 J Pascoe <j_pascoe@apple.com>

[WebAuthn] Support all valid FIDO NFC tag types
https://bugs.webkit.org/show_bug.cgi?id=234616
rdar://85871173

Reviewed by Darin Adler.

This patch modifies a check when looking for FIDO nfc tags
to support all valid FIDO tag types.

Tested using physical NFC tags provided for this bug.

* Platform/spi/Cocoa/NearFieldSPI.h:
* UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
(WebKit::NfcConnection::didDetectTags):

2022-01-20 Kimmo Kinnunen <kkinnunen@apple.com>

Implement WebGL GPU buffer texture upload path for Cocoa getUserMedia camera streams
Expand Down
6 changes: 4 additions & 2 deletions Source/WebKit/Platform/spi/Cocoa/NearFieldSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ typedef NS_OPTIONS(NSUInteger, NFFeature) {
};

typedef NS_ENUM(uint32_t, NFTagType) {
NFTagTypeUnknown = 0,
NFTagTypeGeneric4A = 3,
NFTagTypeUnknown = 0,
NFTagTypeGeneric4A = 3,
NFTagTypeGeneric4B = 6,
NFTagTypeMiFareDESFire = 16,
};

typedef NS_OPTIONS(uint32_t, NFTechnology) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ static bool trySelectFidoApplet(NFReaderSession *session)
return;
}

// FIXME(203234): Tell users to switch to a different tag if the tag is not of type NFTagTypeGeneric4A
// or can't speak U2F/FIDO2.
// FIXME(203234): Tell users to switch to a different tag if the tag is not supported or can't speak U2F/FIDO2.
for (NFTag *tag : tags) {
if (tag.type != NFTagTypeGeneric4A || ![m_session connectTag:tag])
// FIDO tag is ISO-DEP which can be Tag4A, Tag4B, and DESFIRE (Tag4A).
if ((tag.type != NFTagTypeGeneric4A && tag.type != NFTagTypeGeneric4B && tag.type != NFTagTypeMiFareDESFire) || ![m_session connectTag:tag])
continue;

if (!trySelectFidoApplet(m_session.get())) {
Expand Down

0 comments on commit 7950d3d

Please sign in to comment.