From b65853c6b638f2fb1069b4ae74ab9bf8253bfd0f Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Mon, 25 Feb 2019 16:33:28 +0000 Subject: [PATCH] Improve documentation of mbedtls_ecp_read_key --- include/mbedtls/ecp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 7dee3e37e..ba3be207a 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -1094,7 +1094,7 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, void *p_rng ); /** - * \brief This function reads an ECP key. + * \brief This function reads an elliptic curve private key. * * \param grp_id The ECP group identifier. * \param key The destination key. @@ -1104,8 +1104,10 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, * \param buflen The length of the buffer in bytes. * * \return \c 0 on success. - * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code - * on failure. + * \return #MBEDTLS_ERR_ECP_INVALID_KEY error if the key is + * invalid. + * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. + * \return Another negative error code on different kinds of failure. */ int mbedtls_ecp_read_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, const unsigned char *buf, size_t buflen );