mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-25 01:46:53 +00:00
Fixup: Don't use legacy ECC error code from TinyCrypt
We want to be able to remove legacy ECC entirely when using TinyCrypt, including their identifiers.
This commit is contained in:
parent
c10c9bfc10
commit
c64d5af9ab
|
@ -554,7 +554,7 @@ static int uecc_eckey_check_pair( const void *pub, const void *prv )
|
|||
return( 0 );
|
||||
}
|
||||
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
static int uecc_eckey_can_do( mbedtls_pk_type_t type )
|
||||
|
|
|
@ -75,7 +75,7 @@ int mbedtls_ssl_ecdh_read_peerkey( mbedtls_ssl_context *ssl,
|
|||
if( (size_t)( end - *p ) < secp256r1_uncompressed_point_length )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "Bad ECDH peer pubkey (too short)" ) );
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
if( (*p)[0] != 2 * NUM_ECC_BYTES + 1 ||
|
||||
|
@ -86,7 +86,7 @@ int mbedtls_ssl_ecdh_read_peerkey( mbedtls_ssl_context *ssl,
|
|||
0x04,
|
||||
(unsigned) (*p)[0],
|
||||
(unsigned) (*p)[1] ) );
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
memcpy( ssl->handshake->ecdh_peerkey, *p + 2, 2 * NUM_ECC_BYTES );
|
||||
|
|
Loading…
Reference in a new issue