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>
This commit is contained in:
parent
9a7233cda8
commit
114ddebbf6
@ -426,7 +426,7 @@ void EC_GROUP_free(EC_GROUP *group) {
|
|||||||
OPENSSL_free(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) {
|
if (dest->meth->group_copy == 0) {
|
||||||
OPENSSL_PUT_ERROR(EC, EC_GROUP_copy, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
OPENSSL_PUT_ERROR(EC, EC_GROUP_copy, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
|
||||||
return 0;
|
return 0;
|
||||||
@ -482,7 +482,7 @@ EC_GROUP *EC_GROUP_dup(const EC_GROUP *a) {
|
|||||||
if (t == NULL) {
|
if (t == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!EC_GROUP_copy(t, a)) {
|
if (!ec_group_copy(t, a)) {
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +250,7 @@ struct ec_point_st {
|
|||||||
} /* EC_POINT */;
|
} /* EC_POINT */;
|
||||||
|
|
||||||
EC_GROUP *ec_group_new(const EC_METHOD *meth);
|
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,
|
int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
|
||||||
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
|
size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
|
||||||
|
@ -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. */
|
/* EC_GROUP_free frees |group| and the data that it points to. */
|
||||||
OPENSSL_EXPORT void EC_GROUP_free(EC_GROUP *group);
|
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
|
/* EC_GROUP_dup returns a fresh |EC_GROUP| which is equal to |a| or NULL on
|
||||||
* error. */
|
* error. */
|
||||||
OPENSSL_EXPORT EC_GROUP *EC_GROUP_dup(const EC_GROUP *a);
|
OPENSSL_EXPORT EC_GROUP *EC_GROUP_dup(const EC_GROUP *a);
|
||||||
|
Loading…
Reference in New Issue
Block a user