device/fido: check ECDH_compute_key return value correctly.
Due to its OpenSSL-based origins, ECDH_compute_key returns the output length or -1 for error, unlike standard BoringSSL functions which are 0/1. This CL fixes the pattern of checking the return value. (Doesn't matter in practice because it doesn't fail unless the private key is on the wrong group.) Change-Id: I87ceb4afa419ae578eed9cbf38edebe7e061570a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159749 Commit-Queue: Adam Langley <agl@chromium.org> Auto-Submit: Adam Langley <agl@chromium.org> Reviewed-by:Martin Kreichgauer <martinkr@google.com> Cr-Commit-Position: refs/heads/master@{#761162}
Showing
Please register or sign in to comment