Document that curve lists can include partially-supported curves

Document that a curve returned by mbedtls_ecp_curve_list() or
mbedtls_ecp_grp_id_list() may lack support for ECDH or ECDSA.

Add a corresponding changelog entry, under "API Changes" because we
have changed the behavior: formerly, these functions skipped ECDH-only
curves, although this was not documented.
This commit is contained in:
Gilles Peskine 2019-02-11 18:43:55 +01:00 committed by Janos Follath
parent 20b3ef3cad
commit d2085f5a17

View File

@ -437,6 +437,12 @@ mbedtls_ecp_curve_type mbedtls_ecp_get_type( const mbedtls_ecp_group *grp );
* mbedtls_ecp_curve_info() for all supported curves in order
* of preference.
*
* \note This function returns information about all curves
* supported by the library. Some curves may not be
* supported for all algorithms. Call mbedtls_ecdh_can_do()
* or mbedtls_ecdsa_can_do() to check if a curve is
* supported for ECDH or ECDSA.
*
* \return A statically allocated array. The last entry is 0.
*/
const mbedtls_ecp_curve_info *mbedtls_ecp_curve_list( void );
@ -446,6 +452,12 @@ const mbedtls_ecp_curve_info *mbedtls_ecp_curve_list( void );
* identifiers of all supported curves in the order of
* preference.
*
* \note This function returns information about all curves
* supported by the library. Some curves may not be
* supported for all algorithms. Call mbedtls_ecdh_can_do()
* or mbedtls_ecdsa_can_do() to check if a curve is
* supported for ECDH or ECDSA.
*
* \return A statically allocated array,
* terminated with MBEDTLS_ECP_DP_NONE.
*/