Changeset 249108 in webkit
- Timestamp:
- Aug 26, 2019, 11:43:09 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/TestExpectations (modified) (1 diff)
-
Source/WebCore/PAL/ChangeLog (modified) (1 diff)
-
Source/WebCore/PAL/pal/spi/cocoa/IOKitSPI.h (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp (modified) (6 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidConnection.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidConnection.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/NfcConnection.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249107 r249108 1 2019-08-26 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Support HID authenticators on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=201084 5 <rdar://problem/51908390> 6 7 Reviewed by Youenn Fablet. 8 9 * platform/ios-wk2/TestExpectations: 10 Unskips HID tests for iOS. 11 1 12 2019-08-26 Jiewen Tan <jiewen_tan@apple.com> 2 13 -
trunk/LayoutTests/platform/ios-wk2/TestExpectations
r248037 r249108 1288 1288 webkit.org/b/189641 [ Debug ] webgl/2.0.0/conformance/attribs/gl-vertexattribpointer.html [ Slow ] 1289 1289 1290 # Skip WebAuthN tests for hid authenticators1291 http/wpt/webauthn/ctap-hid-failure.https.html [ Skip ]1292 http/wpt/webauthn/ctap-hid-success.https.html [ Skip ]1293 http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html [ Skip ]1294 http/wpt/webauthn/public-key-credential-create-failure-hid.https.html [ Skip ]1295 http/wpt/webauthn/public-key-credential-create-success-hid.https.html [ Skip ]1296 http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html [ Skip ]1297 http/wpt/webauthn/public-key-credential-get-failure-hid.https.html [ Skip ]1298 http/wpt/webauthn/public-key-credential-get-success-hid.https.html [ Skip ]1299 http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html [ Skip ]1300 http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html [ Skip ]1301 http/wpt/webauthn/public-key-credential-create-success-u2f.https.html [ Skip ]1302 http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html [ Skip ]1303 http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html [ Skip ]1304 http/wpt/webauthn/public-key-credential-get-success-u2f.https.html [ Skip ]1305 1306 1290 # FIXME: Unskip these tests once we have the fix for <rdar://problem/44930119>. 1307 1291 fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html [ Skip ] -
trunk/Source/WebCore/PAL/ChangeLog
r249036 r249108 1 2019-08-26 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Support HID authenticators on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=201084 5 <rdar://problem/51908390> 6 7 Reviewed by Youenn Fablet. 8 9 * pal/spi/cocoa/IOKitSPI.h: 10 Move IOHIDDevice.h and IOHIDManager.h to IOKitSPI.h given they are in iOS. 11 1 12 2019-08-22 Andy Estes <aestes@apple.com> 2 13 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/IOKitSPI.h
r245161 r249108 28 28 #if USE(APPLE_INTERNAL_SDK) 29 29 30 #import <IOKit/hid/IOHIDDevice.h> 30 31 #import <IOKit/hid/IOHIDEvent.h> 31 32 #import <IOKit/hid/IOHIDEventData.h> 32 33 #import <IOKit/hid/IOHIDEventSystemClient.h> 34 #import <IOKit/hid/IOHIDManager.h> 33 35 #import <IOKit/hid/IOHIDUsageTables.h> 34 36 … … 209 211 }; 210 212 213 typedef struct CF_BRIDGED_TYPE(id) __IOHIDDevice * IOHIDDeviceRef; 214 215 typedef kern_return_t IOReturn; 216 217 enum IOHIDReportType { 218 kIOHIDReportTypeInput = 0, 219 kIOHIDReportTypeOutput, 220 }; 221 222 enum { 223 kIOHIDOptionsTypeNone = 0x00, 224 }; 225 typedef uint32_t IOHIDOptionsType; 226 227 typedef UInt32 IOOptionBits; 228 229 typedef void (*IOHIDReportCallback) (void*, IOReturn, void*, IOHIDReportType, uint32_t, uint8_t*, CFIndex); 230 231 IOReturn IOHIDDeviceOpen(IOHIDDeviceRef, IOOptionBits); 232 void IOHIDDeviceScheduleWithRunLoop(IOHIDDeviceRef, CFRunLoopRef, CFStringRef); 233 void IOHIDDeviceRegisterInputReportCallback(IOHIDDeviceRef, uint8_t*, CFIndex, IOHIDReportCallback, void*); 234 void IOHIDDeviceUnscheduleFromRunLoop(IOHIDDeviceRef, CFRunLoopRef, CFStringRef); 235 IOReturn IOHIDDeviceClose(IOHIDDeviceRef, IOOptionBits); 236 IOReturn IOHIDDeviceSetReport(IOHIDDeviceRef, IOHIDReportType, CFIndex, const uint8_t*, CFIndex); 237 238 typedef struct CF_BRIDGED_TYPE(id) __IOHIDManager * IOHIDManagerRef; 239 240 #define kIOHIDPrimaryUsagePageKey "PrimaryUsagePage" 241 #define kIOHIDPrimaryUsageKey "PrimaryUsage" 242 243 typedef void (*IOHIDDeviceCallback) (void*, IOReturn, void*, IOHIDDeviceRef); 244 245 IOHIDManagerRef IOHIDManagerCreate(CFAllocatorRef, IOOptionBits); 246 void IOHIDManagerSetDeviceMatching(IOHIDManagerRef, CFDictionaryRef); 247 void IOHIDManagerRegisterDeviceMatchingCallback(IOHIDManagerRef, IOHIDDeviceCallback, void*); 248 void IOHIDManagerRegisterDeviceRemovalCallback(IOHIDManagerRef, IOHIDDeviceCallback, void*); 249 void IOHIDManagerUnscheduleFromRunLoop(IOHIDManagerRef, CFRunLoopRef, CFStringRef); 250 IOReturn IOHIDManagerClose(IOHIDManagerRef, IOOptionBits); 251 void IOHIDManagerScheduleWithRunLoop(IOHIDManagerRef, CFRunLoopRef, CFStringRef); 252 IOReturn IOHIDManagerOpen(IOHIDManagerRef, IOOptionBits); 253 211 254 WTF_EXTERN_C_END 212 255 -
trunk/Source/WebKit/ChangeLog
r249101 r249108 1 2019-08-26 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthn] Support HID authenticators on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=201084 5 <rdar://problem/51908390> 6 7 Reviewed by Youenn Fablet. 8 9 This patch makes the macOS HID implementation available in iOS as well. 10 Mostly, it removes the PLATFORM(MAC) compile time flag. 11 12 * UIProcess/WebAuthentication/AuthenticatorManager.cpp: 13 (WebKit::AuthenticatorManagerInternal::collectTransports): 14 * UIProcess/WebAuthentication/AuthenticatorTransportService.cpp: 15 (WebKit::AuthenticatorTransportService::create): 16 (WebKit::AuthenticatorTransportService::createMock): 17 * UIProcess/WebAuthentication/Cocoa/HidConnection.h: 18 * UIProcess/WebAuthentication/Cocoa/HidConnection.mm: 19 * UIProcess/WebAuthentication/Cocoa/HidService.h: 20 * UIProcess/WebAuthentication/Cocoa/HidService.mm: 21 * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: 22 (WebKit::NfcConnection::NfcConnection): 23 A tentative solution before there is an official UI. 24 * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: 25 * UIProcess/WebAuthentication/Mock/MockHidConnection.h: 26 * UIProcess/WebAuthentication/Mock/MockHidService.cpp: 27 * UIProcess/WebAuthentication/Mock/MockHidService.h: 28 * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: 29 * UIProcess/WebAuthentication/fido/CtapHidDriver.h: 30 1 31 2019-08-26 Russell Epstein <repstein@apple.com> 2 32 -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
r249059 r249108 38 38 namespace AuthenticatorManagerInternal { 39 39 40 #if PLATFORM(MAC)41 40 const size_t maxTransportNumber = 3; 42 #else43 const size_t maxTransportNumber = 2;44 #endif45 41 46 42 // Suggested by WebAuthN spec as of 7 August 2018. … … 54 50 auto addResult = result.add(AuthenticatorTransport::Internal); 55 51 ASSERT_UNUSED(addResult, addResult.isNewEntry); 56 #if PLATFORM(MAC)57 52 addResult = result.add(AuthenticatorTransport::Usb); 58 53 ASSERT_UNUSED(addResult, addResult.isNewEntry); 59 #endif60 54 addResult = result.add(AuthenticatorTransport::Nfc); 61 55 ASSERT_UNUSED(addResult, addResult.isNewEntry); … … 69 63 } 70 64 if (authenticatorSelection->authenticatorAttachment == PublicKeyCredentialCreationOptions::AuthenticatorAttachment::CrossPlatform) { 71 auto addResult = result.add(AuthenticatorTransport::Nfc); 72 ASSERT_UNUSED(addResult, addResult.isNewEntry); 73 #if PLATFORM(MAC) 74 addResult = result.add(AuthenticatorTransport::Usb); 75 ASSERT_UNUSED(addResult, addResult.isNewEntry); 76 #endif 65 auto addResult = result.add(AuthenticatorTransport::Usb); 66 ASSERT_UNUSED(addResult, addResult.isNewEntry); 67 addResult = result.add(AuthenticatorTransport::Nfc); 68 ASSERT_UNUSED(addResult, addResult.isNewEntry); 77 69 return result; 78 70 } … … 93 85 auto addResult = result.add(AuthenticatorTransport::Internal); 94 86 ASSERT_UNUSED(addResult, addResult.isNewEntry); 95 #if PLATFORM(MAC)96 87 addResult = result.add(AuthenticatorTransport::Usb); 97 88 ASSERT_UNUSED(addResult, addResult.isNewEntry); 98 #endif99 89 addResult = result.add(AuthenticatorTransport::Nfc); 100 90 ASSERT_UNUSED(addResult, addResult.isNewEntry); … … 105 95 if (allowCredential.transports.isEmpty()) { 106 96 result.add(AuthenticatorTransport::Internal); 107 #if PLATFORM(MAC)108 97 result.add(AuthenticatorTransport::Usb); 109 #endif110 98 result.add(AuthenticatorTransport::Nfc); 111 99 return result; … … 113 101 if (!result.contains(AuthenticatorTransport::Internal) && allowCredential.transports.contains(AuthenticatorTransport::Internal)) 114 102 result.add(AuthenticatorTransport::Internal); 115 #if PLATFORM(MAC)116 103 if (!result.contains(AuthenticatorTransport::Usb) && allowCredential.transports.contains(AuthenticatorTransport::Usb)) 117 104 result.add(AuthenticatorTransport::Usb); 118 #endif119 105 if (!result.contains(AuthenticatorTransport::Nfc) && allowCredential.transports.contains(AuthenticatorTransport::Nfc)) 120 106 result.add(AuthenticatorTransport::Nfc); -
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.cpp
r249059 r249108 44 44 case WebCore::AuthenticatorTransport::Internal: 45 45 return makeUniqueRef<LocalService>(observer); 46 #if PLATFORM(MAC)47 46 case WebCore::AuthenticatorTransport::Usb: 48 47 return makeUniqueRef<HidService>(observer); 49 #endif50 48 case WebCore::AuthenticatorTransport::Nfc: 51 49 return makeUniqueRef<NfcService>(observer); … … 61 59 case WebCore::AuthenticatorTransport::Internal: 62 60 return makeUniqueRef<MockLocalService>(observer, configuration); 63 #if PLATFORM(MAC)64 61 case WebCore::AuthenticatorTransport::Usb: 65 62 return makeUniqueRef<MockHidService>(observer, configuration); 66 #endif67 63 case WebCore::AuthenticatorTransport::Nfc: 68 64 return makeUniqueRef<MockNfcService>(observer, configuration); -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidConnection.h
r238246 r249108 26 26 #pragma once 27 27 28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)28 #if ENABLE(WEB_AUTHN) 29 29 30 #include < IOKit/hid/IOHIDDevice.h>30 #include <pal/spi/cocoa/IOKitSPI.h> 31 31 #include <wtf/CompletionHandler.h> 32 32 #include <wtf/Deque.h> … … 83 83 } // namespace WebKit 84 84 85 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)85 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidConnection.mm
r239078 r249108 27 27 #import "HidConnection.h" 28 28 29 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)29 #if ENABLE(WEB_AUTHN) 30 30 31 31 #import <WebCore/FidoConstants.h> … … 135 135 } // namespace WebKit 136 136 137 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)137 #endif // ENABLE(WEB_AUTHN) 138 138 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h
r249059 r249108 26 26 #pragma once 27 27 28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)28 #if ENABLE(WEB_AUTHN) 29 29 30 30 #include "FidoService.h" 31 #include < IOKit/hid/IOHIDManager.h>31 #include <pal/spi/cocoa/IOKitSPI.h> 32 32 #include <wtf/RetainPtr.h> 33 33 #include <wtf/UniqueRef.h> … … 56 56 } // namespace WebKit 57 57 58 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)58 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm
r249059 r249108 27 27 #import "HidService.h" 28 28 29 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)29 #if ENABLE(WEB_AUTHN) 30 30 31 31 #import "CtapHidDriver.h" … … 91 91 } // namespace WebKit 92 92 93 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)93 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/NfcConnection.mm
r249068 r249108 53 53 [m_session setDelegate:m_delegate.get()]; 54 54 // FIXME(200933) 55 [m_session updateUIAlertMessage:@" Hold the key against the top of your device."];55 [m_session updateUIAlertMessage:@"Insert your security key or hold the key against the top of your device."]; 56 56 [m_session startPolling]; 57 57 } -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp
r249059 r249108 27 27 #include "MockHidConnection.h" 28 28 29 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)29 #if ENABLE(WEB_AUTHN) 30 30 31 31 #include <WebCore/AuthenticatorGetInfoResponse.h> … … 293 293 } // namespace WebKit 294 294 295 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)295 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.h
r239752 r249108 26 26 #pragma once 27 27 28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)28 #if ENABLE(WEB_AUTHN) 29 29 30 30 #include "HidConnection.h" … … 73 73 } // namespace WebKit 74 74 75 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)75 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.cpp
r238936 r249108 27 27 #include "MockHidService.h" 28 28 29 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)29 #if ENABLE(WEB_AUTHN) 30 30 31 31 #include "MockHidConnection.h" … … 56 56 } // namespace WebKit 57 57 58 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)58 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.h
r238166 r249108 26 26 #pragma once 27 27 28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)28 #if ENABLE(WEB_AUTHN) 29 29 30 30 #include "HidService.h" … … 48 48 } // namespace WebKit 49 49 50 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)50 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp
r248631 r249108 27 27 #include "CtapHidDriver.h" 28 28 29 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)29 #if ENABLE(WEB_AUTHN) 30 30 31 31 #include <WebCore/FidoConstants.h> … … 221 221 } // namespace WebKit 222 222 223 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)223 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.h
r248631 r249108 26 26 #pragma once 27 27 28 #if ENABLE(WEB_AUTHN) && PLATFORM(MAC)28 #if ENABLE(WEB_AUTHN) 29 29 30 30 #include "CtapDriver.h" … … 100 100 } // namespace WebKit 101 101 102 #endif // ENABLE(WEB_AUTHN) && PLATFORM(MAC)102 #endif // ENABLE(WEB_AUTHN)
Note:
See TracChangeset
for help on using the changeset viewer.