diff options
author | Louis Collard <louiscollard@chromium.org> | 2019-02-23 21:33:28 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-01 01:08:57 -0800 |
commit | 06adaa227002b39cdac8d7c849a0fe15e7ccc8ae (patch) | |
tree | ce7cad75c6d4ed9ced44ec5afad92ea6e43f5b29 | |
parent | 49a8dc96adf24034c5a9b62d2f14fab67e011f3d (diff) | |
download | chrome-ec-06adaa227002b39cdac8d7c849a0fe15e7ccc8ae.tar.gz |
cr50: Update error codes returned from U2F_SIGN.
The U2F spec requires us to differentiate between failure
to sign due to lack of user presence, and invalid key
handles. This change updates the error codes returned to
allow this.
BUG=b:123161715
BRANCH=none
TEST=local tests on soraka
Change-Id: I654afbe76eb3673c2f8da14988211874f9c4f4e9
Signed-off-by: Louis Collard <louiscollard@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1485033
Reviewed-by: Andrey Pronin <apronin@chromium.org>
-rw-r--r-- | common/u2f.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/u2f.c b/common/u2f.c index edf44d4a16..2066e64b6a 100644 --- a/common/u2f.c +++ b/common/u2f.c @@ -503,7 +503,7 @@ static enum vendor_cmd_rc u2f_sign(enum vendor_cmd_cc code, return VENDOR_RC_NOT_ALLOWED; if (!verify_kh_owned(req->userSecret, req->appId, req->keyHandle)) - return VENDOR_RC_NOT_ALLOWED; + return VENDOR_RC_PASSWORD_REQUIRED; /* Re-create origin-specific key. */ if (u2f_origin_user_keypair( |