aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_ameth.c
diff options
context:
space:
mode:
authorMatt Caswell <frodo@baggins.org>2013-03-26 15:39:50 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-03-26 16:56:50 +0000
commit94782e0e9c28bd872107b8f814f4db68c9fbf5ab (patch)
treed362b8ff92fb599f1dd936b8aa22bd992214511c /crypto/ec/ec_ameth.c
parentc3b344e36a088283731b4f65a70e85b100f55686 (diff)
downloadopenssl-94782e0e9c28bd872107b8f814f4db68c9fbf5ab.tar.gz
Make binary curve ASN.1 work in FIPS mode.
Don't check for binary curves by checking methods: the values will be different in FIPS mode as they are redirected to the validated module version.
Diffstat (limited to 'crypto/ec/ec_ameth.c')
-rw-r--r--crypto/ec/ec_ameth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c
index 83909c1853..0ce4524076 100644
--- a/crypto/ec/ec_ameth.c
+++ b/crypto/ec/ec_ameth.c
@@ -88,7 +88,7 @@ static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key)
if (!pstr)
return 0;
pstr->length = i2d_ECParameters(ec_key, &pstr->data);
- if (pstr->length < 0)
+ if (pstr->length <= 0)
{
ASN1_STRING_free(pstr);
ECerr(EC_F_ECKEY_PARAM2TYPE, ERR_R_EC_LIB);