mirror of https://github.com/ARMmbed/mbed-os.git
[NUC472/M487] Fix compile error with disabled crypto
For example, even though MBEDTLS_SHA512_C is disabled (via #undef MBEDTLS_SHA512_C), mbedtls_sha512_context is still necessary due to referenced in sha512.h.pull/4925/head
parent
b0228d020d
commit
aafbdc8d38
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "mbedtls/aes.h"
|
||||
|
||||
#if defined(MBEDTLS_AES_C)
|
||||
#if defined(MBEDTLS_AES_ALT)
|
||||
// Regular implementation
|
||||
//
|
||||
|
|
@ -259,6 +258,5 @@ void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
|
|||
|
||||
|
||||
#endif /* MBEDTLS_AES_ALT */
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
#endif /* aes_alt.h */
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "mbedtls/des.h"
|
||||
|
||||
#if defined(MBEDTLS_DES_C)
|
||||
#if defined(MBEDTLS_DES_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -271,6 +270,5 @@ void mbedtls_des_setkey( uint32_t SK[32],
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_DES_ALT */
|
||||
#endif /* MBEDTLS_DES_C */
|
||||
|
||||
#endif /* des_alt.h */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mbedtls/sha1.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
#include "sha_alt_hw.h"
|
||||
|
|
@ -95,6 +94,5 @@ void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[6
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#endif /* sha1_alt.h */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#ifndef MBEDTLS_SHA1_ALT_SW_H
|
||||
#define MBEDTLS_SHA1_ALT_SW_H
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -98,6 +97,5 @@ void mbedtls_sha1_sw_process( mbedtls_sha1_sw_context *ctx, const unsigned char
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#endif /* sha1_alt_sw.h */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mbedtls/sha256.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
#include "sha_alt_hw.h"
|
||||
|
|
@ -97,6 +96,5 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#endif /* sha256_alt.h */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#ifndef MBEDTLS_SHA256_ALT_SW_H
|
||||
#define MBEDTLS_SHA256_ALT_SW_H
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -101,6 +100,5 @@ void mbedtls_sha256_sw_process( mbedtls_sha256_sw_context *ctx, const unsigned c
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#endif /* sha256_alt_sw.h */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mbedtls/sha512.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
#include "sha_alt_hw.h"
|
||||
|
|
@ -97,6 +96,5 @@ void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char da
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA512_ALT */
|
||||
#endif /* MBEDTLS_SHA512_C */
|
||||
|
||||
#endif /* sha512_alt.h */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#ifndef MBEDTLS_SHA512_ALT_SW_H
|
||||
#define MBEDTLS_SHA512_ALT_SW_H
|
||||
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -101,6 +100,5 @@ void mbedtls_sha512_sw_process( mbedtls_sha512_sw_context *ctx, const unsigned c
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA512_ALT */
|
||||
#endif /* MBEDTLS_SHA512_C */
|
||||
|
||||
#endif /* sha512_alt_sw.h */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#ifndef MBEDTLS_SHA_ALT_HW_H
|
||||
#define MBEDTLS_SHA_ALT_HW_H
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C) || defined(MBEDTLS_SHA256_C) || defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT) || defined(MBEDTLS_SHA256_ALT) || defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -44,7 +43,6 @@ void crypto_sha_update(crypto_sha_context *ctx, const unsigned char *input, size
|
|||
void crypto_sha_update_nobuf(crypto_sha_context *ctx, const unsigned char *input, size_t ilen, int islast);
|
||||
void crypto_sha_getinternstate(unsigned char output[], size_t olen);
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
|
||||
|
|
@ -57,9 +55,7 @@ void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] )
|
|||
void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[64] );
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
|
||||
|
|
@ -73,9 +69,7 @@ void mbedtls_sha256_hw_finish( crypto_sha_context *ctx, unsigned char output[32]
|
|||
void mbedtls_sha256_hw_process( crypto_sha_context *ctx, const unsigned char data[64] );
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
void mbedtls_sha512_hw_init( crypto_sha_context *ctx );
|
||||
|
|
@ -89,13 +83,11 @@ void mbedtls_sha512_hw_finish( crypto_sha_context *ctx, unsigned char output[64]
|
|||
void mbedtls_sha512_hw_process( crypto_sha_context *ctx, const unsigned char data[128] );
|
||||
|
||||
#endif /* MBEDTLS_SHA512_ALT */
|
||||
#endif /* MBEDTLS_SHA512_C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT || MBEDTLS_SHA256_ALT || MBEDTLS_SHA512_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C || MBEDTLS_SHA256_C || MBEDTLS_SHA512_C*/
|
||||
|
||||
#endif /* sha_alt.h */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "mbedtls/aes.h"
|
||||
|
||||
#if defined(MBEDTLS_AES_C)
|
||||
#if defined(MBEDTLS_AES_ALT)
|
||||
// Regular implementation
|
||||
//
|
||||
|
|
@ -259,6 +258,5 @@ void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
|
|||
|
||||
|
||||
#endif /* MBEDTLS_AES_ALT */
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
#endif /* aes_alt.h */
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "mbedtls/des.h"
|
||||
|
||||
#if defined(MBEDTLS_DES_C)
|
||||
#if defined(MBEDTLS_DES_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -271,6 +270,5 @@ void mbedtls_des_setkey( uint32_t SK[32],
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_DES_ALT */
|
||||
#endif /* MBEDTLS_DES_C */
|
||||
|
||||
#endif /* des_alt.h */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mbedtls/sha1.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
#include "sha_alt_hw.h"
|
||||
|
|
@ -95,6 +94,5 @@ void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[6
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#endif /* sha1_alt.h */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "mbedtls/sha256.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -100,6 +99,5 @@ void mbedtls_sha1_sw_process( mbedtls_sha1_sw_context *ctx, const unsigned char
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#endif /* sha1_alt_sw.h */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "mbedtls/sha256.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
#include "sha_alt_hw.h"
|
||||
|
|
@ -97,6 +96,5 @@ void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char da
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#endif /* sha256_alt.h */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "mbedtls/sha256.h"
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -103,6 +102,5 @@ void mbedtls_sha256_sw_process( mbedtls_sha256_sw_context *ctx, const unsigned c
|
|||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#endif /* sha256_alt_sw.h */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#ifndef MBEDTLS_SHA_ALT_HW_H
|
||||
#define MBEDTLS_SHA_ALT_HW_H
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C) || defined(MBEDTLS_SHA256_C) || defined(MBEDTLS_SHA512_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT) || defined(MBEDTLS_SHA256_ALT) || defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -44,7 +43,6 @@ void crypto_sha_update(crypto_sha_context *ctx, const unsigned char *input, size
|
|||
void crypto_sha_update_nobuf(crypto_sha_context *ctx, const unsigned char *input, size_t ilen, int islast);
|
||||
void crypto_sha_getinternstate(unsigned char output[], size_t olen);
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
#if defined(MBEDTLS_SHA1_ALT)
|
||||
|
||||
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
|
||||
|
|
@ -57,9 +55,7 @@ void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] )
|
|||
void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[64] );
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
#if defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
|
||||
|
|
@ -73,13 +69,11 @@ void mbedtls_sha256_hw_finish( crypto_sha_context *ctx, unsigned char output[32]
|
|||
void mbedtls_sha256_hw_process( crypto_sha_context *ctx, const unsigned char data[64] );
|
||||
|
||||
#endif /* MBEDTLS_SHA256_ALT */
|
||||
#endif /* MBEDTLS_SHA256_C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA1_ALT || MBEDTLS_SHA256_ALT || MBEDTLS_SHA512_ALT */
|
||||
#endif /* MBEDTLS_SHA1_C || MBEDTLS_SHA256_C || MBEDTLS_SHA512_C */
|
||||
|
||||
#endif /* sha_alt_hw.h */
|
||||
|
|
|
|||
Loading…
Reference in New Issue