diff options
Diffstat (limited to 'src/crypto/ec')
-rw-r--r-- | src/crypto/ec/ec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/crypto/ec/ec.c b/src/crypto/ec/ec.c index 0d70959..15e5735 100644 --- a/src/crypto/ec/ec.c +++ b/src/crypto/ec/ec.c @@ -491,11 +491,10 @@ err: } } -int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ignored) { - if (a->curve_name == NID_undef || b->curve_name == NID_undef) { - return 0; - } - return a->curve_name == b->curve_name; +int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b) { + return a->curve_name == NID_undef || + b->curve_name == NID_undef || + a->curve_name != b->curve_name; } const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group) { |