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.
This commit is contained in:
Hanno Becker 2019-08-20 14:57:37 +01:00
parent 496b83ff1b
commit 9a62f2dbfb

View file

@ -531,7 +531,7 @@ static int extract_ecdsa_sig( unsigned char **p, const unsigned char *end,
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 )