Fix broken tests due to changed error code

Introduced in 5246ee5c59
This commit is contained in:
Manuel Pégourié-Gonnard 2014-03-26 14:12:20 +01:00
parent df5024c0dd
commit c042cf0013
3 changed files with 10 additions and 5 deletions
library

View file

@ -483,8 +483,13 @@ int ecp_point_read_binary( const ecp_group *grp, ecp_point *pt,
int ret;
size_t plen;
if( ilen == 1 && buf[0] == 0x00 )
return( ecp_set_zero( pt ) );
if( buf[0] == 0x00 )
{
if( ilen == 1 )
return( ecp_set_zero( pt ) );
else
return( POLARSSL_ERR_ECP_BAD_INPUT_DATA );
}
plen = mpi_size( &grp->P );