diff options
author | Matt Caswell <matt@openssl.org> | 2017-06-21 15:54:45 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-08-21 08:44:44 +0100 |
commit | de61c03cc7ac52e45d50504e8cf1dda2f5230b28 (patch) | |
tree | 92301a1a9ddd0c99deb153e0f91659bd3abc11dd /crypto/ec | |
parent | 64d9844ab6b6fb97ca270e236741f7dd61c1940b (diff) |
Remove OPENSSL_assert() from crypto/ec
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3740)
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec_key.c | 3 | ||||
-rw-r--r-- | crypto/ec/ec_lib.c | 3 |
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); } |