[M487] Fix compile error with Travis CI

Use MBED_CONF_RTOS_PRESENT to filter out des/sha alternative for mbed OS 2.
pull/4608/head
ccli8 2016-12-15 13:22:49 +08:00
parent b91f064be7
commit ee622a0c51
9 changed files with 47 additions and 0 deletions

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -408,3 +411,6 @@ static int mbedtls_des_docrypt(uint16_t keyopt, uint8_t key[3][MBEDTLS_DES_KEY_S
#endif /* MBEDTLS_DES_ALT */
#endif /* MBEDTLS_DES_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -25,6 +25,9 @@
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -795,3 +798,5 @@ int mbedtls_des3_sw_crypt_cbc( mbedtls_des3_sw_context *ctx,
#endif /* MBEDTLS_DES_ALT */
#endif /* MBEDTLS_DES_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -136,3 +139,5 @@ void mbedtls_sha1_process(mbedtls_sha1_context *ctx, const unsigned char data[64
#endif /* MBEDTLS_SHA1_ALT */
#endif /* MBEDTLS_SHA1_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -24,6 +24,9 @@
* http://www.itl.nist.gov/fipspubs/fip180-1.htm
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -343,3 +346,5 @@ void mbedtls_sha1_sw_finish( mbedtls_sha1_sw_context *ctx, unsigned char output[
#endif /* MBEDTLS_SHA1_ALT */
#endif /* MBEDTLS_SHA1_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -137,3 +140,5 @@ void mbedtls_sha256_process(mbedtls_sha256_context *ctx, const unsigned char dat
#endif /* MBEDTLS_SHA256_ALT */
#endif /* MBEDTLS_SHA256_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -24,6 +24,9 @@
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -317,3 +320,5 @@ void mbedtls_sha256_sw_finish( mbedtls_sha256_sw_context *ctx, unsigned char out
#endif /* MBEDTLS_SHA256_ALT */
#endif /* MBEDTLS_SHA256_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -138,3 +141,5 @@ void mbedtls_sha512_process(mbedtls_sha512_context *ctx, const unsigned char dat
#endif /* MBEDTLS_SHA512_ALT */
#endif /* MBEDTLS_SHA512_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -24,6 +24,9 @@
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -356,3 +359,5 @@ void mbedtls_sha512_sw_finish( mbedtls_sha512_sw_context *ctx, unsigned char out
#endif /* MBEDTLS_SHA512_ALT */
#endif /* MBEDTLS_SHA512_C */
#endif /* MBED_CONF_RTOS_PRESENT */

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* Compatible with mbed OS 2 which doesn't support mbedtls */
#if MBED_CONF_RTOS_PRESENT
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
@ -430,3 +433,6 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen)
#endif /* MBEDTLS_SHA1_ALT || MBEDTLS_SHA256_ALT || MBEDTLS_SHA512_ALT */
#endif /* MBEDTLS_SHA1_C || MBEDTLS_SHA256_C || MBEDTLS_SHA512_C */
#endif /* MBED_CONF_RTOS_PRESENT */