Fixup: get_bitlen() PK API in TinyCrypt-based ECDSA
- Return number of bits and not number of bytes
- Return length of private key and not length of public key.
diff --git a/library/pk_wrap.c b/library/pk_wrap.c
index f8afc13..92f356a 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -531,7 +531,7 @@
static size_t uecc_eckey_get_bitlen( const void *ctx )
{
(void) ctx;
- return( (size_t) 2 * NUM_ECC_BYTES );
+ return( (size_t) ( NUM_ECC_BYTES * 8 ) );
}
static int uecc_eckey_can_do( mbedtls_pk_type_t type )