summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/ec/ecp_smpl.c
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2014-11-27 18:37:49 +0300
committerFedor Indutny <fedor@indutny.com>2014-11-27 19:56:41 +0300
commit574407a67f5d42d22aac57a128448997c674c3e5 (patch)
tree41b29dfe4690415b379b222ce2efdd5cd9d97c72 /deps/openssl/openssl/crypto/ec/ecp_smpl.c
parent7efc64dc94aab8cee73c243ab901513005de00ed (diff)
downloadandroid-node-v8-574407a67f5d42d22aac57a128448997c674c3e5.tar.gz
android-node-v8-574407a67f5d42d22aac57a128448997c674c3e5.tar.bz2
android-node-v8-574407a67f5d42d22aac57a128448997c674c3e5.zip
deps: update openssl to 1.0.1j
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/1
Diffstat (limited to 'deps/openssl/openssl/crypto/ec/ecp_smpl.c')
-rw-r--r--deps/openssl/openssl/crypto/ec/ecp_smpl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/deps/openssl/openssl/crypto/ec/ecp_smpl.c b/deps/openssl/openssl/crypto/ec/ecp_smpl.c
index ef5285477a..2d1f357686 100644
--- a/deps/openssl/openssl/crypto/ec/ecp_smpl.c
+++ b/deps/openssl/openssl/crypto/ec/ecp_smpl.c
@@ -73,9 +73,6 @@
const EC_METHOD *EC_GFp_simple_method(void)
{
-#ifdef OPENSSL_FIPS
- return fips_ec_gfp_simple_method();
-#else
static const EC_METHOD ret = {
EC_FLAGS_DEFAULT_OCT,
NID_X9_62_prime_field,
@@ -115,8 +112,12 @@ const EC_METHOD *EC_GFp_simple_method(void)
0 /* field_decode */,
0 /* field_set_to_one */ };
- return &ret;
+#ifdef OPENSSL_FIPS
+ if (FIPS_mode())
+ return fips_ec_gfp_simple_method();
#endif
+
+ return &ret;
}
@@ -1317,8 +1318,8 @@ int ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT
{
for (i = 0; i < num; i++)
{
- if (prod_Z[i] != NULL)
- BN_clear_free(prod_Z[i]);
+ if (prod_Z[i] == NULL) break;
+ BN_clear_free(prod_Z[i]);
}
OPENSSL_free(prod_Z);
}