mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:55:41 +01:00
Add parameter validation test for mbedtls_ecp_check_budget()
This commit is contained in:
parent
807c107c3c
commit
0a4fa9b1fb
@ -43,6 +43,7 @@ void ecp_invalid_param( )
|
||||
unsigned char buf[42] = { 0 };
|
||||
const unsigned char *null_buf = NULL;
|
||||
mbedtls_ecp_group_id valid_group = MBEDTLS_ECP_DP_SECP192R1;
|
||||
mbedtls_ecp_restart_ctx restart_ctx;
|
||||
|
||||
TEST_INVALID_PARAM( mbedtls_ecp_point_init( NULL ) );
|
||||
TEST_INVALID_PARAM( mbedtls_ecp_keypair_init( NULL ) );
|
||||
@ -50,6 +51,7 @@ void ecp_invalid_param( )
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
TEST_INVALID_PARAM( mbedtls_ecp_restart_init( NULL ) );
|
||||
TEST_INVALID_PARAM( mbedtls_ecp_check_budget( NULL, &restart_ctx, 42 ) );
|
||||
#endif /* MBEDTLS_ECP_RESTARTABLE */
|
||||
|
||||
TEST_INVALID_PARAM_RET( MBEDTLS_ERR_ECP_BAD_INPUT_DATA,
|
||||
|
Loading…
Reference in New Issue
Block a user