]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
PROV: Fix small logic error in ec_kmgmt.c matching function
authorRichard Levitte <levitte@openssl.org>
Mon, 27 Jul 2020 16:39:44 +0000 (18:39 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 30 Jul 2020 21:23:15 +0000 (23:23 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12544)

providers/implementations/keymgmt/ec_kmgmt.c

index c1114eee7f76788a12d7d79f795f4df8112fd0bc..792b2193e641ad9b8ebb8dfd93a6da48d5f19d71 100644 (file)
@@ -299,7 +299,7 @@ static int ec_match(const void *keydata1, const void *keydata2, int selection)
         const EC_POINT *pa = EC_KEY_get0_public_key(ec1);
         const EC_POINT *pb = EC_KEY_get0_public_key(ec2);
 
-        ok = ok && EC_POINT_cmp(group_b, pa, pb, NULL);
+        ok = ok && EC_POINT_cmp(group_b, pa, pb, NULL) == 0;
     }
     return ok;
 }