aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-06-21 15:54:45 +0100
committerMatt Caswell <matt@openssl.org>2017-08-21 08:44:44 +0100
commitde61c03cc7ac52e45d50504e8cf1dda2f5230b28 (patch)
tree92301a1a9ddd0c99deb153e0f91659bd3abc11dd
parent64d9844ab6b6fb97ca270e236741f7dd61c1940b (diff)
downloadopenssl-de61c03cc7ac52e45d50504e8cf1dda2f5230b28.tar.gz
Remove OPENSSL_assert() from crypto/ec
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3740)
-rw-r--r--crypto/ec/ec_key.c3
-rw-r--r--crypto/ec/ec_lib.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 4098be6f49..fb8c3ed756 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -191,7 +191,8 @@ int EC_KEY_generate_key(EC_KEY *eckey)
int ossl_ec_key_gen(EC_KEY *eckey)
{
- OPENSSL_assert(eckey->group->meth->keygen != NULL);
+ if (!ossl_assert(eckey->group->meth->keygen != NULL))
+ return 0;
return eckey->group->meth->keygen(eckey);
}
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 47318d672a..baf94f6a57 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -330,7 +330,8 @@ const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group)
int EC_GROUP_order_bits(const EC_GROUP *group)
{
- OPENSSL_assert(group->meth->group_order_bits != NULL);
+ if (!ossl_assert(group->meth->group_order_bits != NULL))
+ return 0;
return group->meth->group_order_bits(group);
}