mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 22:15:07 +00:00
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:
parent
496b83ff1b
commit
9a62f2dbfb
|
@ -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 )
|
static size_t uecc_eckey_get_bitlen( const void *ctx )
|
||||||
{
|
{
|
||||||
(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 )
|
static int uecc_eckey_can_do( mbedtls_pk_type_t type )
|
||||||
|
|
Loading…
Reference in a new issue