summaryrefslogtreecommitdiff
path: root/chromium/device/fido
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-03-18 14:18:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-03-18 14:38:27 +0000
commit0078283f3cf586ae8a0d0df501a08e7440636b43 (patch)
tree9e227bbc71af5611b00176d23bf4f474c09bf54c /chromium/device/fido
parenteaf1da4d961fbbda9455f9af3b23d1af777f43fa (diff)
downloadqtwebengine-chromium-0078283f3cf586ae8a0d0df501a08e7440636b43.tar.gz
BASELINE: Update Chromium to 73.0.3683.83
Change-Id: Ie2948cebb1e9204f293fdf63c36d6215a5f5b507 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/device/fido')
-rw-r--r--chromium/device/fido/fido_test_data.h2
-rw-r--r--chromium/device/fido/u2f_register_operation.cc1
-rw-r--r--chromium/device/fido/u2f_register_operation_unittest.cc10
3 files changed, 8 insertions, 5 deletions
diff --git a/chromium/device/fido/fido_test_data.h b/chromium/device/fido/fido_test_data.h
index 95192fdeace..7381c21f9e9 100644
--- a/chromium/device/fido/fido_test_data.h
+++ b/chromium/device/fido/fido_test_data.h
@@ -385,6 +385,8 @@ constexpr uint8_t kU2fConditionNotSatisfiedApduResponse[] = {0x69, 0x85};
constexpr uint8_t kU2fWrongDataApduResponse[] = {0x6A, 0x80};
+constexpr uint8_t kU2fWrongLengthApduResponse[] = {0x67, 0x00};
+
constexpr uint8_t kU2fKeyHandleSizeApduResponse[] = {0x00, 0x01};
constexpr uint8_t kApduEncodedNoErrorRegisterResponse[] = {
diff --git a/chromium/device/fido/u2f_register_operation.cc b/chromium/device/fido/u2f_register_operation.cc
index e80655a5f90..5a29ba0cc24 100644
--- a/chromium/device/fido/u2f_register_operation.cc
+++ b/chromium/device/fido/u2f_register_operation.cc
@@ -123,6 +123,7 @@ void U2fRegisterOperation::OnCheckForExcludedKeyHandle(
}
case apdu::ApduResponse::Status::SW_WRONG_DATA:
+ case apdu::ApduResponse::Status::SW_WRONG_LENGTH:
// Continue to iterate through the provided key handles in the exclude
// list and check for already registered keys.
if (++it != request().exclude_list()->cend()) {
diff --git a/chromium/device/fido/u2f_register_operation_unittest.cc b/chromium/device/fido/u2f_register_operation_unittest.cc
index 567ce6186f4..89eb9a94e36 100644
--- a/chromium/device/fido/u2f_register_operation_unittest.cc
+++ b/chromium/device/fido/u2f_register_operation_unittest.cc
@@ -152,10 +152,10 @@ TEST_F(U2fRegisterOperationTest, TestRegistrationWithExclusionList) {
auto device = std::make_unique<MockFidoDevice>();
EXPECT_CALL(*device, GetId()).WillRepeatedly(::testing::Return("device"));
- // DeviceTransact() will be called three times including two check only
- // sign-in calls and one registration call. For the first two calls, device
- // will invoke MockFidoDevice::WrongData as the authenticator did not create
- // the two key handles provided in the exclude list. At the third call,
+ // DeviceTransact() will be called three times including two check only sign-
+ // in calls and one registration call. For the first two calls, device will
+ // invoke MockFidoDevice::WrongData/WrongLength as the authenticator did not
+ // create the two key handles provided in the exclude list. At the third call,
// MockFidoDevice::NoErrorRegister will be invoked after registration.
::testing::InSequence s;
device->ExpectRequestAndRespondWith(
@@ -163,7 +163,7 @@ TEST_F(U2fRegisterOperationTest, TestRegistrationWithExclusionList) {
test_data::kU2fWrongDataApduResponse);
device->ExpectRequestAndRespondWith(
test_data::kU2fCheckOnlySignCommandApduWithKeyBeta,
- test_data::kU2fWrongDataApduResponse);
+ test_data::kU2fWrongLengthApduResponse);
device->ExpectRequestAndRespondWith(
test_data::kU2fRegisterCommandApdu,
test_data::kApduEncodedNoErrorRegisterResponse);