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:
authorAdam Langley <agl@chromium.org>2014-08-22 23:24:16 +0400
committerAdam Langley <agl@google.com>2014-08-27 01:52:12 +0400
commit0eb1aae207dadee053ece5edfd404bf176c6a7ce (patch)
tree10418f0a78fe0baee5f204124670980acf1bf2b6 /crypto/ec/ec.c
parent539112fd4447ba9a2c6f669edd16129d824b8b34 (diff)
Readd EC_GROUP_get_curve_GFp.
wpa_supplicant needs this in order to get the order of the coordinate field, apparently so that they can hash to a point. Change-Id: I92d5df7b37b67ace5f497c25f53f16bbe134aced Reviewed-on: https://boringssl-review.googlesource.com/1622 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec/ec.c')
-rw-r--r--crypto/ec/ec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c
index dcb9083c..34e6d90f 100644
--- a/crypto/ec/ec.c
+++ b/crypto/ec/ec.c
@@ -519,6 +519,16 @@ int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
return !BN_is_zero(&group->cofactor);
}
+int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *out_p, BIGNUM *out_a,
+ BIGNUM *out_b, BN_CTX *ctx) {
+ if (group->meth->group_get_curve == 0) {
+ OPENSSL_PUT_ERROR(EC, EC_GROUP_get_curve_GFp,
+ ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
+ return 0;
+ }
+ return group->meth->group_get_curve(group, out_p, out_a, out_b, ctx);
+}
+
int EC_GROUP_get_curve_name(const EC_GROUP *group) { return group->curve_name; }
int EC_GROUP_get_degree(const EC_GROUP *group) {