From df26040838f0a1335ed1dde1e87e8d0b4847762d Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 21 Aug 2023 19:11:44 +0200 Subject: [PATCH] Fix loading SECP521R1 key. Signed-off-by: Pol Henarejos --- src/fido/fido.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fido/fido.c b/src/fido/fido.c index 885e58b..dc70e86 100644 --- a/src/fido/fido.c +++ b/src/fido/fido.c @@ -217,7 +217,7 @@ int derive_key(const uint8_t *app_id, uint8_t *key_handle, int curve, mbedtls_ecdsa_context *key) { - uint8_t outk[64] = { 0 }; + uint8_t outk[67] = { 0 }; //SECP521R1 key is 66 bytes length int r = 0; memset(outk, 0, sizeof(outk)); if ((r = load_keydev(outk)) != CCID_OK) {