diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 619a8a51a..76aef32fb 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -1368,7 +1368,7 @@ int mbedtls_ecp_write_key(mbedtls_ecp_keypair *key, * 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 12924bf32..758d54bd7 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -3336,7 +3336,7 @@ cleanup: /* * 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) {