Make input parameter const
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h
index 619a8a5..76aef32 100644
--- a/include/mbedtls/ecp.h
+++ b/include/mbedtls/ecp.h
@@ -1368,7 +1368,7 @@
* or the export for the given group is not implemented.
* \return Another negative error code on other kinds of failure.
*/
-int mbedtls_ecp_write_public_key(mbedtls_ecp_keypair *key,
+int mbedtls_ecp_write_public_key(const mbedtls_ecp_keypair *key,
int format, size_t *olen,
unsigned char *buf, size_t buflen);
diff --git a/library/ecp.c b/library/ecp.c
index 12924bf..758d54b 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -3336,7 +3336,7 @@
/*
* Write a public key.
*/
-int mbedtls_ecp_write_public_key(mbedtls_ecp_keypair *key,
+int mbedtls_ecp_write_public_key(const mbedtls_ecp_keypair *key,
int format, size_t *olen,
unsigned char *buf, size_t buflen)
{