summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-02-25 11:15:39 -0800
committerAdam Langley <agl@google.com>2015-02-25 11:15:39 -0800
commit4c6611d7a1dded159380928705db0a5dfbb2a3e3 (patch)
tree48c322d66afffa7a38db02c2c5c0ab028f0ea55e /src
parent13066f1c7a8aaacf80e8fe62f31526fa7cae8072 (diff)
downloadexternal_boringssl-4c6611d7a1dded159380928705db0a5dfbb2a3e3.zip
external_boringssl-4c6611d7a1dded159380928705db0a5dfbb2a3e3.tar.gz
external_boringssl-4c6611d7a1dded159380928705db0a5dfbb2a3e3.tar.bz2
Add the CTX parameter back to EC_GROUP_cmp.
It was a mistake to remove this in the first place. (Cherry-picked from upstream BoringSSL's 93531bd70f48bc63ad7d4aedf32d69c8095170bd.) Change-Id: Iee35482bf11dd8813622e36b0c0eb8f91538007a
Diffstat (limited to 'src')
-rw-r--r--src/crypto/ec/ec.c2
-rw-r--r--src/crypto/evp/p_ec_asn1.c2
-rw-r--r--src/include/openssl/ec.h3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/ec/ec.c b/src/crypto/ec/ec.c
index f9d8dc5..0d70959 100644
--- a/src/crypto/ec/ec.c
+++ b/src/crypto/ec/ec.c
@@ -491,7 +491,7 @@ err:
}
}
-int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b) {
+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;
}
diff --git a/src/crypto/evp/p_ec_asn1.c b/src/crypto/evp/p_ec_asn1.c
index 48a175b..37f5135 100644
--- a/src/crypto/evp/p_ec_asn1.c
+++ b/src/crypto/evp/p_ec_asn1.c
@@ -379,7 +379,7 @@ 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);
+ return EC_GROUP_cmp(group_a, group_b, NULL);
}
static void int_ec_free(EVP_PKEY *pkey) { EC_KEY_free(pkey->pkey.ec); }
diff --git a/src/include/openssl/ec.h b/src/include/openssl/ec.h
index 86d7de7..f915635 100644
--- a/src/include/openssl/ec.h
+++ b/src/include/openssl/ec.h
@@ -117,7 +117,8 @@ OPENSSL_EXPORT EC_GROUP *EC_GROUP_dup(const EC_GROUP *a);
/* EC_GROUP_cmp returns one if |a| and |b| are the same group and zero
* otherwise. */
-OPENSSL_EXPORT int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b);
+OPENSSL_EXPORT int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b,
+ BN_CTX *ignored);
/* EC_GROUP_get0_generator returns a pointer to the internal |EC_POINT| object
* in |group| that specifies the generator for the group. */