summaryrefslogtreecommitdiff
path: root/board/cr50/u2f.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/u2f.c')
-rw-r--r--board/cr50/u2f.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/cr50/u2f.c b/board/cr50/u2f.c
index d1d44a2ffa..43082d5008 100644
--- a/board/cr50/u2f.c
+++ b/board/cr50/u2f.c
@@ -222,11 +222,11 @@ int g2f_individual_keypair(p256_int *d, p256_int *pk_x, p256_int *pk_y)
/* Generate unbiased private key */
while (!DCRYPTO_p256_key_from_bytes(pk_x, pk_y, d, buf)) {
- HASH_CTX sha;
+ struct sha256_ctx sha;
- DCRYPTO_SHA256_init(&sha, 0);
- HASH_update(&sha, buf, sizeof(buf));
- memcpy(buf, HASH_final(&sha), sizeof(buf));
+ SHA256_hw_init(&sha);
+ SHA256_update(&sha, buf, sizeof(buf));
+ memcpy(buf, SHA256_final(&sha), sizeof(buf));
}
return EC_SUCCESS;