mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Complete tests for reading round one
Also change the code to forbid public keys being 0
This commit is contained in:
@ -355,6 +355,12 @@ static int ecjpake_kkp_read( const mbedtls_md_info_t *md_info,
|
||||
* } ECJPAKEKeyKP;
|
||||
*/
|
||||
MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) );
|
||||
if( mbedtls_ecp_is_zero( X ) )
|
||||
{
|
||||
ret = MBEDTLS_ERR_ECP_INVALID_KEY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_info, grp, G, X, id, p, end ) );
|
||||
|
||||
cleanup:
|
||||
|
Reference in New Issue
Block a user