diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index e2ae07444..d8f73ae96 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -1396,7 +1396,7 @@ int MBEDTLS_DEPRECATED mbedtls_ecp_write_key(mbedtls_ecp_keypair *key, * set in \p key. * \return Another negative error code on different kinds of failure. */ -int mbedtls_ecp_write_key_ext(mbedtls_ecp_keypair *key, +int mbedtls_ecp_write_key_ext(const mbedtls_ecp_keypair *key, size_t *olen, unsigned char *buf, size_t buflen); /** diff --git a/library/ecp.c b/library/ecp.c index 0dadaeaac..427059bb5 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -3335,7 +3335,7 @@ cleanup: } #endif /* MBEDTLS_DEPRECATED_REMOVED */ -int mbedtls_ecp_write_key_ext(mbedtls_ecp_keypair *key, +int mbedtls_ecp_write_key_ext(const mbedtls_ecp_keypair *key, size_t *olen, unsigned char *buf, size_t buflen) { size_t len = (key->grp.nbits + 7) / 8;