Skip to content

Commit

Permalink
Make no-ec2m work again (backport from HEAD).
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed Jun 6, 2011
1 parent 69e2ec6 commit c090562
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions crypto/ec/ec_oct.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@ int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *poi
return ec_GFp_simple_set_compressed_coordinates(
group, point, x, y_bit, ctx);
else
#ifdef OPENSSL_NO_EC2M
{
ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP, EC_R_GF2M_NOT_SUPPORTED);
return 0;
}
#else
return ec_GF2m_simple_set_compressed_coordinates(
group, point, x, y_bit, ctx);
#endif
}
return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);
}
Expand Down Expand Up @@ -142,8 +149,15 @@ size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, point_co
return ec_GFp_simple_point2oct(group, point,
form, buf, len, ctx);
else
#ifdef OPENSSL_NO_EC2M
{
ECerr(EC_F_EC_POINT_POINT2OCT, EC_R_GF2M_NOT_SUPPORTED);
return 0;
}
#else
return ec_GF2m_simple_point2oct(group, point,
form, buf, len, ctx);
#endif
}

return group->meth->point2oct(group, point, form, buf, len, ctx);
Expand All @@ -170,8 +184,15 @@ int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,
return ec_GFp_simple_oct2point(group, point,
buf, len, ctx);
else
#ifdef OPENSSL_NO_EC2M
{
ECerr(EC_F_EC_POINT_OCT2POINT, EC_R_GF2M_NOT_SUPPORTED);
return 0;
}
#else
return ec_GF2m_simple_oct2point(group, point,
buf, len, ctx);
#endif
}
return group->meth->oct2point(group, point, buf, len, ctx);
}
Expand Down

0 comments on commit c090562

Please sign in to comment.