Commit 033c9a28 authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

device/fido: log unexpected U2F status values.

These values get translated into a generic "other" error, so it's
useful to see what the underlying code was.

Change-Id: I320b41f82efe6a2b2a168d4b1ee87f5a01c2acf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626731
Auto-Submit: Adam Langley <agl@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#662547}
parent 2a57e5f1
...@@ -110,6 +110,8 @@ void U2fRegisterOperation::OnCheckForExcludedKeyHandle( ...@@ -110,6 +110,8 @@ void U2fRegisterOperation::OnCheckForExcludedKeyHandle(
default: default:
// Some sort of failure occurred. Silently drop device request. // Some sort of failure occurred. Silently drop device request.
FIDO_LOG(ERROR) << "Unexpected status " << static_cast<int>(result)
<< " from U2F device";
std::move(callback()) std::move(callback())
.Run(CtapDeviceResponseCode::kCtap2ErrOther, base::nullopt); .Run(CtapDeviceResponseCode::kCtap2ErrOther, base::nullopt);
break; break;
...@@ -165,6 +167,8 @@ void U2fRegisterOperation::OnRegisterResponseReceived( ...@@ -165,6 +167,8 @@ void U2fRegisterOperation::OnRegisterResponseReceived(
default: default:
// An error has occurred, quit trying this device. // An error has occurred, quit trying this device.
FIDO_LOG(ERROR) << "Unexpected status " << static_cast<int>(result)
<< " from U2F device";
std::move(callback()) std::move(callback())
.Run(CtapDeviceResponseCode::kCtap2ErrOther, base::nullopt); .Run(CtapDeviceResponseCode::kCtap2ErrOther, base::nullopt);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment