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:
authorDavid Benjamin <davidben@chromium.org>2015-02-25 22:49:46 +0300
committerAdam Langley <agl@google.com>2015-02-27 22:43:02 +0300
commit114ddebbf62601aaf6ed09bf87aec8b72402afcb (patch)
tree31837e17e8f1df932756c47daeeb0350bfb1baf6
parent9a7233cda8d8aeeeb4795e2ba8e0dca5bbbb0cf0 (diff)
Unexport EC_GROUP_copy.
EC_GROUP_copy is an rather unfriendly function; it doesn't work if the groups have different[*] underlying EC_METHODs, but this notion is not exposed through the API. I found no callers of EC_GROUP_copy in external code. This leaves the precompute_mult functions as the remaining mutable API exposed through EC_GROUP. [*] Though, of the two EC_METHODs right now, simple.c is entirely unused. Change-Id: Iabb52518005250fb970e12b3b0ea78b4f6eff4a0 Reviewed-on: https://boringssl-review.googlesource.com/3631 Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r--crypto/ec/ec.c4
-rw-r--r--crypto/ec/internal.h1
-rw-r--r--include/openssl/ec.h4
3 files changed, 3 insertions, 6 deletions
diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c
index ad47bb55..9a4a8388 100644
--- a/crypto/ec/ec.c
+++ b/crypto/ec/ec.c
@@ -426,7 +426,7 @@ void EC_GROUP_free(EC_GROUP *group) {
OPENSSL_free(group);
}
-int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) {
+int ec_group_copy(EC_GROUP *dest, const EC_GROUP *src) {
if (dest->meth->group_copy == 0) {
OPENSSL_PUT_ERROR(EC, EC_GROUP_copy, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
@@ -482,7 +482,7 @@ EC_GROUP *EC_GROUP_dup(const EC_GROUP *a) {
if (t == NULL) {
return NULL;
}
- if (!EC_GROUP_copy(t, a)) {
+ if (!ec_group_copy(t, a)) {
goto err;
}
diff --git a/crypto/ec/internal.h b/crypto/ec/internal.h
index da116c4c..17f63ae2 100644
--- a/crypto/ec/internal.h
+++ b/crypto/ec/internal.h
@@ -250,6 +250,7 @@ struct ec_point_st {
} /* EC_POINT */;
EC_GROUP *ec_group_new(const EC_METHOD *meth);
+int ec_group_copy(EC_GROUP *dest, const EC_GROUP *src);
int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 318ce0f0..511cb2df 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -107,10 +107,6 @@ OPENSSL_EXPORT EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
/* EC_GROUP_free frees |group| and the data that it points to. */
OPENSSL_EXPORT void EC_GROUP_free(EC_GROUP *group);
-/* EC_GROUP_copy sets |*dest| equal to |*src|. It returns one on success and
- * zero otherwise. */
-OPENSSL_EXPORT int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src);
-
/* EC_GROUP_dup returns a fresh |EC_GROUP| which is equal to |a| or NULL on
* error. */
OPENSSL_EXPORT EC_GROUP *EC_GROUP_dup(const EC_GROUP *a);