Skip to content

Commit 235949b

Browse files
committed
Changed order of config file checking in include defines
1 parent 08fd157 commit 235949b

File tree

14 files changed

+39
-40
lines changed

14 files changed

+39
-40
lines changed

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#if !defined(SHA1_ALT_H)
2929
#define SHA1_ALT_H
3030

31-
#if !defined(MBEDTLS_CONFIG_FILE)
32-
#include "config.h"
33-
#else
31+
#if defined(MBEDTLS_CONFIG_FILE)
3432
#include MBEDTLS_CONFIG_FILE
33+
#else
34+
#include "config.h"
3535
#endif
3636

3737
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#if !defined(SHA256_ALT_H)
3030
#define SHA256_ALT_H
3131

32-
#if !defined(MBEDTLS_CONFIG_FILE)
33-
#include "config.h"
34-
#else
32+
#if defined(MBEDTLS_CONFIG_FILE)
3533
#include MBEDTLS_CONFIG_FILE
34+
#else
35+
#include "config.h"
3636
#endif
3737

3838
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#if !defined(SHA512_ALT_H)
2929
#define SHA512_ALT_H
3030

31-
#if !defined(MBEDTLS_CONFIG_FILE)
32-
#include "config.h"
33-
#else
31+
#if defined(MBEDTLS_CONFIG_FILE)
3432
#include MBEDTLS_CONFIG_FILE
33+
#else
34+
#include "config.h"
3535
#endif
3636

3737
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#if !defined(SHA1_ALT_H)
2929
#define SHA1_ALT_H
3030

31-
#if !defined(MBEDTLS_CONFIG_FILE)
32-
#include "config.h"
33-
#else
31+
#if defined(MBEDTLS_CONFIG_FILE)
3432
#include MBEDTLS_CONFIG_FILE
33+
#else
34+
#include "config.h"
3535
#endif
3636

3737
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#if !defined(SHA256_ALT_H)
3030
#define SHA256_ALT_H
3131

32-
#if !defined(MBEDTLS_CONFIG_FILE)
33-
#include "config.h"
34-
#else
32+
#if defined(MBEDTLS_CONFIG_FILE)
3533
#include MBEDTLS_CONFIG_FILE
34+
#else
35+
#include "config.h"
3636
#endif
3737

3838
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#if !defined(SHA512_ALT_H)
2929
#define SHA512_ALT_H
3030

31-
#if !defined(MBEDTLS_CONFIG_FILE)
32-
#include "config.h"
33-
#else
31+
#if defined(MBEDTLS_CONFIG_FILE)
3432
#include MBEDTLS_CONFIG_FILE
33+
#else
34+
#include "config.h"
3535
#endif
3636

3737
#include "crypto_common.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ static int aes_set_keys( mbedtls_aes_context *ctx, const unsigned char *key,
122122
if (CY_CRYPTO_SUCCESS != status)
123123
{
124124
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
125-
goto exit;
126125
}
127126

128127
exit:

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
#if !defined(CRYPTO_COMMON_H)
2828
#define CRYPTO_COMMON_H
2929

30-
#if !defined(MBEDTLS_CONFIG_FILE)
31-
#include "mbedtls/config.h"
32-
#else
30+
#if defined(MBEDTLS_CONFIG_FILE)
3331
#include MBEDTLS_CONFIG_FILE
32+
#else
33+
#include "config.h"
3434
#endif
3535

3636
#include "mbedtls/ecp.h"

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
*
2626
*/
2727

28-
#if !defined(MBEDTLS_CONFIG_FILE)
29-
#include "mbedtls/config.h"
30-
#else
28+
#if defined(MBEDTLS_CONFIG_FILE)
3129
#include MBEDTLS_CONFIG_FILE
30+
#else
31+
#include "config.h"
3232
#endif
3333

3434
#if defined(MBEDTLS_ECDSA_C)

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
* <http://eprint.iacr.org/2004/342.pdf>
4444
*/
4545

46-
#if !defined(MBEDTLS_CONFIG_FILE)
47-
#include "mbedtls/config.h"
48-
#else
46+
#if defined(MBEDTLS_CONFIG_FILE)
4947
#include MBEDTLS_CONFIG_FILE
48+
#else
49+
#include "config.h"
5050
#endif
5151

5252
#if defined(MBEDTLS_ECP_C)

0 commit comments

Comments
 (0)