Adjust more modules to new design
Add `ecp.h` anf `timing.h` to new XXX_alt design
This commit is contained in:
parent
1c9f9be9a2
commit
810e650c70
@ -138,7 +138,7 @@ Changes
|
||||
* Put the Cryptographic API outside of the XXX_ALT macro check, so
|
||||
alternative header file will not need to redefined the same API,
|
||||
and to force alternative implementer to use the same API.
|
||||
|
||||
|
||||
= mbed TLS 2.7.0 branch released 2018-02-03
|
||||
|
||||
Security
|
||||
|
@ -39,6 +39,10 @@
|
||||
#define MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -0x4C00 /**< Signature is valid but shorter than the user-supplied length. */
|
||||
#define MBEDTLS_ERR_ECP_HW_ACCEL_FAILED -0x4B80 /**< ECP hardware accelerator failed. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_ECP_ALT)
|
||||
/*
|
||||
* default mbed TLS elliptic curve arithmetic implementation
|
||||
@ -48,10 +52,6 @@
|
||||
* one.)
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Domain parameters (curve, subgroup and generator) identifiers.
|
||||
*
|
||||
@ -237,6 +237,10 @@ mbedtls_ecp_keypair;
|
||||
#define MBEDTLS_ECP_PF_UNCOMPRESSED 0 /**< Uncompressed point format */
|
||||
#define MBEDTLS_ECP_PF_COMPRESSED 1 /**< Compressed point format */
|
||||
|
||||
#else /* MBEDTLS_ECP_ALT */
|
||||
#include "ecp_alt.h"
|
||||
#endif /* MBEDTLS_ECP_ALT */
|
||||
|
||||
/*
|
||||
* Some other constants from RFC 4492
|
||||
*/
|
||||
@ -679,8 +683,4 @@ int mbedtls_ecp_self_test( int verbose );
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* MBEDTLS_ECP_ALT */
|
||||
#include "ecp_alt.h"
|
||||
#endif /* MBEDTLS_ECP_ALT */
|
||||
|
||||
#endif /* ecp.h */
|
||||
|
@ -30,16 +30,16 @@
|
||||
#include MBEDTLS_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_TIMING_ALT)
|
||||
// Regular implementation
|
||||
//
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_TIMING_ALT)
|
||||
// Regular implementation
|
||||
//
|
||||
|
||||
/**
|
||||
* \brief timer structure
|
||||
*/
|
||||
@ -58,6 +58,10 @@ typedef struct
|
||||
uint32_t fin_ms;
|
||||
} mbedtls_timing_delay_context;
|
||||
|
||||
#else /* MBEDTLS_TIMING_ALT */
|
||||
#include "timing_alt.h"
|
||||
#endif /* MBEDTLS_TIMING_ALT */
|
||||
|
||||
extern volatile int mbedtls_timing_alarmed;
|
||||
|
||||
/**
|
||||
@ -133,18 +137,6 @@ void mbedtls_timing_set_delay( void *data, uint32_t int_ms, uint32_t fin_ms );
|
||||
*/
|
||||
int mbedtls_timing_get_delay( void *data );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* MBEDTLS_TIMING_ALT */
|
||||
#include "timing_alt.h"
|
||||
#endif /* MBEDTLS_TIMING_ALT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
|
Loading…
Reference in New Issue
Block a user