Const-correct EC_KEY_set_public_key_affine_coordinates.
Change-Id: I8f4dd4b0164ec93b6134e406017a74e49e805b02
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37384
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c
index 3851c19..fcdc687 100644
--- a/crypto/fipsmodule/ec/ec_key.c
+++ b/crypto/fipsmodule/ec/ec_key.c
@@ -369,8 +369,8 @@
return 1;
}
-int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
- BIGNUM *y) {
+int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, const BIGNUM *x,
+ const BIGNUM *y) {
EC_POINT *point = NULL;
int ok = 0;
diff --git a/include/openssl/ec_key.h b/include/openssl/ec_key.h
index 3b1a566..be0faaf8 100644
--- a/include/openssl/ec_key.h
+++ b/include/openssl/ec_key.h
@@ -174,8 +174,8 @@
// EC_KEY_set_public_key_affine_coordinates sets the public key in |key| to
// (|x|, |y|). It returns one on success and zero otherwise.
OPENSSL_EXPORT int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
- BIGNUM *x,
- BIGNUM *y);
+ const BIGNUM *x,
+ const BIGNUM *y);
// EC_KEY_key2buf encodes the public key in |key| to an allocated octet string
// and sets |*out_buf| to point to it. It returns the length of the encoded