ECP: Add module and function level replacement options.

This commit is contained in:
Janos Follath 2016-08-18 12:38:46 +01:00 committed by Simon Butcher
parent 5c79d25d94
commit b069753313
6 changed files with 307 additions and 10 deletions

View file

@ -37,6 +37,10 @@
#define MBEDTLS_ERR_ECP_INVALID_KEY -0x4C80 /**< Invalid private or public key. */
#define MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -0x4C00 /**< Signature is valid but shorter than the user-supplied length. */
#if !defined(MBEDTLS_ECP_ALT)
// Regular implementation
//
#ifdef __cplusplus
extern "C" {
#endif
@ -654,16 +658,22 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv );
#if defined(MBEDTLS_SELF_TEST)
/**
* \brief Checkup routine
*
* \return 0 if successful, or 1 if a test failed
*/
int mbedtls_ecp_self_test( int verbose );
#endif
#endif // MBEDTLS_SELF_TEST
#ifdef __cplusplus
}
#endif
#else /* MBEDTLS_ECP_ALT */
#include "ecp_alt.h"
#endif /* MBEDTLS_ECP_ALT */
#endif /* ecp.h */