Skip to content

Commit 8cba4fe

Browse files
committed
Rename common.h to mbedtls_common.h
-Changing all instances of #include "common.h" to #include "mbedcrypto_common.h" to prevent collitions -Changing the name of common.h to mbedcrypto_common.h -Mbed TLS uses the file name "common.h" for common settings relevant for build. Unfortunately common.h is not guarded with any folder-structure as this is an internal file that is present in the folder where source-files resides. Due to the way that zephyr adds include-folders it will be difficult to prevent someone coming up with the same name and adding the include-folder earlier than Mbed TLS. Note: This change will be proposed upstream in Mbed TLS with the hope that this commit is can be reverted Signed-off-by: Frank Audun Kvamtrø <[email protected]>
1 parent 4952e13 commit 8cba4fe

File tree

154 files changed

+153
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+153
-156
lines changed

3rdparty/everest/library/Hacl_Curve25519_joined.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define _DEFAULT_SOURCE
2929
#endif
3030

31-
#include "common.h"
31+
#include "mbedcrypto_common.h"
3232

3333
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
3434

@@ -47,4 +47,3 @@
4747
#include "kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c"
4848

4949
#endif /* defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) */
50-

3rdparty/everest/library/everest.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* This file is part of Mbed TLS (https://tls.mbed.org).
2020
*/
2121

22-
#include "common.h"
22+
#include "mbedcrypto_common.h"
2323

2424
#include <string.h>
2525

@@ -99,4 +99,3 @@ int mbedtls_everest_calc_secret( mbedtls_ecdh_context_everest *ctx, size_t *olen
9999
}
100100

101101
#endif /* MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED */
102-

3rdparty/everest/library/x25519.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* This file is part of Mbed TLS (https://tls.mbed.org)
2020
*/
2121

22-
#include "common.h"
22+
#include "mbedcrypto_common.h"
2323

2424
#if defined(MBEDTLS_ECDH_C) && defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
2525

library/aes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
1212
*/
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_AES_C)
1717

library/aesce.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#endif /* defined(__clang__) && (__clang_major__ >= 4) */
4040

4141
#include <string.h>
42-
#include "common.h"
42+
#include "mbedcrypto_common.h"
4343

4444
#if defined(MBEDTLS_AESCE_C)
4545

library/aesce.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define MBEDTLS_AESCE_H
1616

1717
#include "mbedtls/build_info.h"
18-
#include "common.h"
18+
#include "mbedcrypto_common.h"
1919

2020
#include "mbedtls/aes.h"
2121

library/aesni.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* [CLMUL-WP] https://www.intel.com/content/www/us/en/develop/download/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode.html
1111
*/
1212

13-
#include "common.h"
13+
#include "mbedcrypto_common.h"
1414

1515
#if defined(MBEDTLS_AESNI_C)
1616

library/aria.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* [2] https://tools.ietf.org/html/rfc5794
1212
*/
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_ARIA_C)
1717

library/asn1parse.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_ASN1_PARSE_C) || defined(MBEDTLS_X509_CREATE_C) || \
1111
defined(MBEDTLS_PSA_UTIL_HAVE_ECDSA)

library/asn1write.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_ASN1_WRITE_C) || defined(MBEDTLS_X509_USE_C) || \
1111
defined(MBEDTLS_PSA_UTIL_HAVE_ECDSA)

library/base64.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <limits.h>
99

10-
#include "common.h"
10+
#include "mbedcrypto_common.h"
1111

1212
#if defined(MBEDTLS_BASE64_C)
1313

library/base64_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef MBEDTLS_BASE64_INTERNAL
1212
#define MBEDTLS_BASE64_INTERNAL
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_TEST_HOOKS)
1717

library/bignum.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*/
2323

24-
#include "common.h"
24+
#include "mbedcrypto_common.h"
2525

2626
#if defined(MBEDTLS_BIGNUM_C)
2727

library/bignum_core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_BIGNUM_C)
1111

library/bignum_core.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#ifndef MBEDTLS_BIGNUM_CORE_H
6969
#define MBEDTLS_BIGNUM_CORE_H
7070

71-
#include "common.h"
71+
#include "mbedcrypto_common.h"
7272

7373
#if defined(MBEDTLS_BIGNUM_C)
7474
#include "mbedtls/bignum.h"

library/bignum_mod.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_ECP_WITH_MPI_UINT)
1111

library/bignum_mod.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
#ifndef MBEDTLS_BIGNUM_MOD_H
7070
#define MBEDTLS_BIGNUM_MOD_H
7171

72-
#include "common.h"
72+
#include "mbedcrypto_common.h"
7373

7474
#if defined(MBEDTLS_BIGNUM_C)
7575
#include "mbedtls/bignum.h"

library/bignum_mod_raw.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_ECP_WITH_MPI_UINT)
1111

library/bignum_mod_raw.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#ifndef MBEDTLS_BIGNUM_MOD_RAW_H
6767
#define MBEDTLS_BIGNUM_MOD_RAW_H
6868

69-
#include "common.h"
69+
#include "mbedcrypto_common.h"
7070

7171
#if defined(MBEDTLS_BIGNUM_C)
7272
#include "mbedtls/bignum.h"

library/bignum_mod_raw_invasive.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
1313
#define MBEDTLS_BIGNUM_MOD_RAW_INVASIVE_H
1414

15-
#include "common.h"
15+
#include "mbedcrypto_common.h"
1616
#include "mbedtls/bignum.h"
1717
#include "bignum_mod.h"
1818

library/block_cipher.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
1010
*/
1111

12-
#include "common.h"
12+
#include "mbedcrypto_common.h"
1313

1414
#if defined(MBEDTLS_BLOCK_CIPHER_SOME_PSA)
1515
#include "psa/crypto.h"

library/camellia.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf
1212
*/
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_CAMELLIA_C)
1717

library/ccm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* RFC 5116 "An Interface and Algorithms for Authenticated Encryption"
1515
*/
1616

17-
#include "common.h"
17+
#include "mbedcrypto_common.h"
1818

1919
#if defined(MBEDTLS_CCM_C)
2020

library/chacha20.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
1010
*/
1111

12-
#include "common.h"
12+
#include "mbedcrypto_common.h"
1313

1414
#if defined(MBEDTLS_CHACHA20_C)
1515

library/chachapoly.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright The Mbed TLS Contributors
77
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
88
*/
9-
#include "common.h"
9+
#include "mbedcrypto_common.h"
1010

1111
#if defined(MBEDTLS_CHACHAPOLY_C)
1212

library/cipher.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
1010
*/
1111

12-
#include "common.h"
12+
#include "mbedcrypto_common.h"
1313

1414
#if defined(MBEDTLS_CIPHER_C)
1515

library/cipher_wrap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
1010
*/
1111

12-
#include "common.h"
12+
#include "mbedcrypto_common.h"
1313

1414
#if defined(MBEDTLS_CIPHER_C)
1515

library/cmac.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*/
2828

29-
#include "common.h"
29+
#include "mbedcrypto_common.h"
3030

3131
#if defined(MBEDTLS_CMAC_C)
3232

library/constant_time.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <stdint.h>
1414
#include <limits.h>
1515

16-
#include "common.h"
16+
#include "mbedcrypto_common.h"
1717
#include "constant_time_internal.h"
1818
#include "mbedtls/constant_time.h"
1919
#include "mbedtls/error.h"

library/constant_time_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <stddef.h>
1212

13-
#include "common.h"
13+
#include "mbedcrypto_common.h"
1414

1515
#if defined(MBEDTLS_BIGNUM_C)
1616
#include "mbedtls/bignum.h"

library/constant_time_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <stdint.h>
1212
#include <stddef.h>
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_BIGNUM_C)
1717
#include "mbedtls/bignum.h"

library/ctr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef MBEDTLS_CTR_H
1111
#define MBEDTLS_CTR_H
1212

13-
#include "common.h"
13+
#include "mbedcrypto_common.h"
1414

1515
/**
1616
* \brief Increment a big-endian 16-byte value.

library/ctr_drbg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-90r.pdf
1111
*/
1212

13-
#include "common.h"
13+
#include "mbedcrypto_common.h"
1414

1515
#if defined(MBEDTLS_CTR_DRBG_C)
1616

library/debug.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_DEBUG_C)
1111

library/des.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
1212
*/
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_DES_C)
1717

library/dhm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*/
1515

16-
#include "common.h"
16+
#include "mbedcrypto_common.h"
1717

1818
#if defined(MBEDTLS_DHM_C)
1919

library/ecdh.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* RFC 4492
1313
*/
1414

15-
#include "common.h"
15+
#include "mbedcrypto_common.h"
1616

1717
#if defined(MBEDTLS_ECDH_C)
1818

library/ecdsa.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SEC1 https://www.secg.org/sec1-v2.pdf
1212
*/
1313

14-
#include "common.h"
14+
#include "mbedcrypto_common.h"
1515

1616
#if defined(MBEDTLS_ECDSA_C)
1717

library/ecjpake.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* available to members of the Thread Group http://threadgroup.org/
1111
*/
1212

13-
#include "common.h"
13+
#include "mbedcrypto_common.h"
1414

1515
#if defined(MBEDTLS_ECJPAKE_C)
1616

library/ecp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* <http://eprint.iacr.org/2004/342.pdf>
3030
*/
3131

32-
#include "common.h"
32+
#include "mbedcrypto_common.h"
3333

3434
/**
3535
* \brief Function level alternative implementation.

library/ecp_curves.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if !defined(MBEDTLS_ECP_WITH_MPI_UINT)
1111

library/ecp_curves_new.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
66
*/
77

8-
#include "common.h"
8+
#include "mbedcrypto_common.h"
99

1010
#if defined(MBEDTLS_ECP_WITH_MPI_UINT)
1111

library/ecp_invasive.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef MBEDTLS_ECP_INVASIVE_H
1515
#define MBEDTLS_ECP_INVASIVE_H
1616

17-
#include "common.h"
17+
#include "mbedcrypto_common.h"
1818
#include "mbedtls/bignum.h"
1919
#include "bignum_mod.h"
2020
#include "mbedtls/ecp.h"

0 commit comments

Comments
 (0)