Complete tests for reading round one
Also change the code to forbid public keys being 0
This commit is contained in:
parent
bbe4e52c3b
commit
3059095e86
2 changed files with 103 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue