Log Message
[WebAuthn] Support more than two FIDO protocol versions https://bugs.webkit.org/show_bug.cgi?id=198408 <rdar://problem/51292176>
Reviewed by Chris Dumez. Source/WebCore: Covered by new API tests. * Modules/webauthn/fido/DeviceResponseConverter.cpp: (fido::readCTAPGetInfoResponse): Remove the check for the array size. Tools: Adds a new test case that includes a FIDO_2_1_PRE version string. * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FidoTestData.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249926 => 249927)
--- trunk/Source/WebCore/ChangeLog 2019-09-16 23:10:47 UTC (rev 249926)
+++ trunk/Source/WebCore/ChangeLog 2019-09-16 23:28:10 UTC (rev 249927)
@@ -1,3 +1,17 @@
+2019-09-16 Jiewen Tan <[email protected]>
+
+ [WebAuthn] Support more than two FIDO protocol versions
+ https://bugs.webkit.org/show_bug.cgi?id=198408
+ <rdar://problem/51292176>
+
+ Reviewed by Chris Dumez.
+
+ Covered by new API tests.
+
+ * Modules/webauthn/fido/DeviceResponseConverter.cpp:
+ (fido::readCTAPGetInfoResponse):
+ Remove the check for the array size.
+
2019-09-16 Brent Fulgham <[email protected]>
[FTW] Correct lifespan of other SharedBitmaps
Modified: trunk/Source/WebCore/Modules/webauthn/fido/DeviceResponseConverter.cpp (249926 => 249927)
--- trunk/Source/WebCore/Modules/webauthn/fido/DeviceResponseConverter.cpp 2019-09-16 23:10:47 UTC (rev 249926)
+++ trunk/Source/WebCore/Modules/webauthn/fido/DeviceResponseConverter.cpp 2019-09-16 23:28:10 UTC (rev 249927)
@@ -195,7 +195,7 @@
const auto& responseMap = decodedResponse->getMap();
auto it = responseMap.find(CBOR(1));
- if (it == responseMap.end() || !it->second.isArray() || it->second.getArray().size() > 2)
+ if (it == responseMap.end() || !it->second.isArray())
return WTF::nullopt;
StdSet<ProtocolVersion> protocolVersions;
for (const auto& version : it->second.getArray()) {
Modified: trunk/Tools/ChangeLog (249926 => 249927)
--- trunk/Tools/ChangeLog 2019-09-16 23:10:47 UTC (rev 249926)
+++ trunk/Tools/ChangeLog 2019-09-16 23:28:10 UTC (rev 249927)
@@ -1,3 +1,17 @@
+2019-09-16 Jiewen Tan <[email protected]>
+
+ [WebAuthn] Support more than two FIDO protocol versions
+ https://bugs.webkit.org/show_bug.cgi?id=198408
+ <rdar://problem/51292176>
+
+ Reviewed by Chris Dumez.
+
+ Adds a new test case that includes a FIDO_2_1_PRE version string.
+
+ * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebCore/FidoTestData.h:
+
2019-09-16 Jonathan Bedard <[email protected]>
results.webkit.org: Configurations should be branch specific
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp (249926 => 249927)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp 2019-09-16 23:10:47 UTC (rev 249926)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp 2019-09-16 23:28:10 UTC (rev 249927)
@@ -572,6 +572,21 @@
EXPECT_EQ(AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedButPinNotSet, getInfoResponse->options().clientPinAvailability());
}
+TEST(CTAPResponseTest, TestReadGetInfoResponse2)
+{
+ auto getInfoResponse = readCTAPGetInfoResponse(convertBytesToVector(TestData::kTestGetInfoResponsePlatformDevice2, sizeof(TestData::kTestGetInfoResponsePlatformDevice2)));
+ ASSERT_TRUE(getInfoResponse);
+ ASSERT_TRUE(getInfoResponse->maxMsgSize());
+ EXPECT_EQ(*getInfoResponse->maxMsgSize(), 1200u);
+ EXPECT_NE(getInfoResponse->versions().find(ProtocolVersion::kCtap), getInfoResponse->versions().end());
+ EXPECT_NE(getInfoResponse->versions().find(ProtocolVersion::kU2f), getInfoResponse->versions().end());
+ EXPECT_TRUE(getInfoResponse->options().isPlatformDevice());
+ EXPECT_TRUE(getInfoResponse->options().supportsResidentKey());
+ EXPECT_TRUE(getInfoResponse->options().userPresenceRequired());
+ EXPECT_EQ(AuthenticatorSupportedOptions::UserVerificationAvailability::kSupportedAndConfigured, getInfoResponse->options().userVerificationAvailability());
+ EXPECT_EQ(AuthenticatorSupportedOptions::ClientPinAvailability::kSupportedButPinNotSet, getInfoResponse->options().clientPinAvailability());
+}
+
TEST(CTAPResponseTest, TestReadGetInfoResponseWithIncorrectFormat)
{
EXPECT_FALSE(readCTAPGetInfoResponse(convertBytesToVector(kTestAuthenticatorGetInfoResponseWithNoVersion, sizeof(kTestAuthenticatorGetInfoResponseWithNoVersion))));
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/FidoTestData.h (249926 => 249927)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/FidoTestData.h 2019-09-16 23:10:47 UTC (rev 249926)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/FidoTestData.h 2019-09-16 23:28:10 UTC (rev 249927)
@@ -604,6 +604,23 @@
0x19, 0x04, 0xB0, 0x06, 0x81, 0x01,
};
+constexpr uint8_t kTestGetInfoResponsePlatformDevice2[] = {
+ 0x00, 0xA6, 0x01, 0x83, 0x68, 0x46, 0x49, 0x44, 0x4F, 0x5F, 0x32, 0x5F,
+ 0x30, 0x66, 0x55, 0x32, 0x46, 0x5F, 0x56, 0x32, 0x6C, 0x46, 0x49, 0x44,
+ 0x4F, 0x5F, 0x32, 0x5F, 0x31, 0x5F, 0x50, 0x52, 0x45, 0x02, 0x82, 0x63,
+ 0x75, 0x76, 0x6D, 0x6B, 0x68, 0x6D, 0x61, 0x63, 0x2D, 0x73, 0x65, 0x63,
+ 0x72, 0x65, 0x74, 0x03, 0x50, 0xF8, 0xA0, 0x11, 0xF3, 0x8C, 0x0A, 0x4D,
+ 0x15, 0x80, 0x06, 0x17, 0x11, 0x1F, 0x9E, 0xDC, 0x7D, 0x04, 0xA5, 0x62,
+ 0x72, 0x6B, 0xF5, 0x62, 0x75, 0x70, 0xF5, 0x62, 0x75, 0x76, 0xF5, 0x64,
+ 0x70,
+ // platform device : true
+ 0x6C, 0x61, 0x74, 0xF5,
+ // End of platform_device setting.
+ 0x69, 0x63, 0x6C, 0x69, 0x65, 0x6E, 0x74, 0x50, 0x69, 0x6E, 0xF4, 0x05,
+ 0x19, 0x04, 0xB0, 0x06, 0x81, 0x01,
+};
+
+
// A Sample well formed response to CTAP MakeCredential request.
constexpr uint8_t kTestMakeCredentialResponse[] = {
// Success status byte
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
