Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ec.c')
-rw-r--r--crypto/ec/ec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c
index 21a39405..ad47bb55 100644
--- a/crypto/ec/ec.c
+++ b/crypto/ec/ec.c
@@ -500,10 +500,9 @@ 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;
+ 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) {