summaryrefslogtreecommitdiff
path: root/crypto/ec/ec_asn1.c
diff options
context:
space:
mode:
authorMichael Demeter <michael.demeter@intel.com>2014-01-06 15:47:34 -0800
committerMichael Demeter <michael.demeter@intel.com>2014-01-06 15:47:34 -0800
commit975084c3fdbacd5f8a3c626171be8d4df27b2ac5 (patch)
tree7f18b115ac927b799ebfe55335282130047b3ec6 /crypto/ec/ec_asn1.c
parent37a8d409f8ffc065c1b1417f0f3b5ba050e8aa95 (diff)
downloadopenssl-975084c3fdbacd5f8a3c626171be8d4df27b2ac5.tar.gz
openssl-975084c3fdbacd5f8a3c626171be8d4df27b2ac5.tar.bz2
openssl-975084c3fdbacd5f8a3c626171be8d4df27b2ac5.zip
Imported Upstream version 1.0.1fupstream/1.0.1f
Diffstat (limited to 'crypto/ec/ec_asn1.c')
-rw-r--r--crypto/ec/ec_asn1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 175eec5..145807b 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -89,7 +89,8 @@ int EC_GROUP_get_trinomial_basis(const EC_GROUP *group, unsigned int *k)
if (group == NULL)
return 0;
- if (EC_GROUP_method_of(group)->group_set_curve != ec_GF2m_simple_group_set_curve
+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
+ NID_X9_62_characteristic_two_field
|| !((group->poly[0] != 0) && (group->poly[1] != 0) && (group->poly[2] == 0)))
{
ECerr(EC_F_EC_GROUP_GET_TRINOMIAL_BASIS, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
@@ -107,7 +108,8 @@ int EC_GROUP_get_pentanomial_basis(const EC_GROUP *group, unsigned int *k1,
if (group == NULL)
return 0;
- if (EC_GROUP_method_of(group)->group_set_curve != ec_GF2m_simple_group_set_curve
+ if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
+ NID_X9_62_characteristic_two_field
|| !((group->poly[0] != 0) && (group->poly[1] != 0) && (group->poly[2] != 0) && (group->poly[3] != 0) && (group->poly[4] == 0)))
{
ECerr(EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);