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/evp/p_ec_asn1.c')
-rw-r--r--crypto/evp/p_ec_asn1.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/evp/p_ec_asn1.c b/crypto/evp/p_ec_asn1.c
index 8967b502..670ee744 100644
--- a/crypto/evp/p_ec_asn1.c
+++ b/crypto/evp/p_ec_asn1.c
@@ -382,7 +382,11 @@ static int ec_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) {
static int ec_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) {
const EC_GROUP *group_a = EC_KEY_get0_group(a->pkey.ec),
*group_b = EC_KEY_get0_group(b->pkey.ec);
- return EC_GROUP_cmp(group_a, group_b, NULL);
+ if (EC_GROUP_cmp(group_a, group_b, NULL) != 0) {
+ /* mismatch */
+ return 0;
+ }
+ return 1;
}
static void int_ec_free(EVP_PKEY *pkey) { EC_KEY_free(pkey->pkey.ec); }