Include common.h instead of config.h in library source files

In library source files, include "common.h", which takes care of
including "mbedtls/config.h" (or the alternative MBEDTLS_CONFIG_FILE)
and other things that are used throughout the library.

FROM=$'#if !defined(MBEDTLS_CONFIG_FILE)\n#include "mbedtls/config.h"\n#else\n#include MBEDTLS_CONFIG_FILE\n#endif' perl -i -0777 -pe 's~\Q$ENV{FROM}~#include "common.h"~' library/*.c 3rdparty/*/library/*.c scripts/data_files/error.fmt scripts/data_files/version_features.fmt

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2020-06-03 01:43:33 +02:00
parent 66c3dc44f2
commit db09ef6d22
86 changed files with 86 additions and 430 deletions

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) #if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)

View File

@ -19,11 +19,7 @@
* This file is part of Mbed TLS (https://tls.mbed.org). * This file is part of Mbed TLS (https://tls.mbed.org).
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include <string.h> #include <string.h>

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECDH_C) && defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) #if defined(MBEDTLS_ECDH_C) && defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)

View File

@ -25,11 +25,7 @@
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_AES_C) #if defined(MBEDTLS_AES_C)

View File

@ -24,11 +24,7 @@
* [CLMUL-WP] http://software.intel.com/en-us/articles/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode/ * [CLMUL-WP] http://software.intel.com/en-us/articles/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode/
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_AESNI_C) #if defined(MBEDTLS_AESNI_C)

View File

@ -24,11 +24,7 @@
* http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0 * http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ARC4_C) #if defined(MBEDTLS_ARC4_C)

View File

@ -25,11 +25,7 @@
* [2] https://tools.ietf.org/html/rfc5794 * [2] https://tools.ietf.org/html/rfc5794
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ARIA_C) #if defined(MBEDTLS_ARIA_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ASN1_PARSE_C) #if defined(MBEDTLS_ASN1_PARSE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ASN1_WRITE_C) #if defined(MBEDTLS_ASN1_WRITE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_BASE64_C) #if defined(MBEDTLS_BASE64_C)

View File

@ -35,11 +35,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_BIGNUM_C) #if defined(MBEDTLS_BIGNUM_C)

View File

@ -25,11 +25,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_BLOWFISH_C) #if defined(MBEDTLS_BLOWFISH_C)

View File

@ -25,11 +25,7 @@
* http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CAMELLIA_C) #if defined(MBEDTLS_CAMELLIA_C)

View File

@ -28,11 +28,7 @@
* RFC 5116 "An Interface and Algorithms for Authenticated Encryption" * RFC 5116 "An Interface and Algorithms for Authenticated Encryption"
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CCM_C) #if defined(MBEDTLS_CCM_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/certs.h" #include "mbedtls/certs.h"

View File

@ -23,11 +23,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CHACHA20_C) #if defined(MBEDTLS_CHACHA20_C)

View File

@ -20,11 +20,7 @@
* *
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CHACHAPOLY_C) #if defined(MBEDTLS_CHACHAPOLY_C)

View File

@ -23,11 +23,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CIPHER_C) #if defined(MBEDTLS_CIPHER_C)

View File

@ -23,11 +23,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CIPHER_C) #if defined(MBEDTLS_CIPHER_C)

View File

@ -40,11 +40,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CMAC_C) #if defined(MBEDTLS_CMAC_C)

View File

@ -24,11 +24,7 @@
* http://csrc.nist.gov/publications/nistpubs/800-90/SP800-90revised_March2007.pdf * http://csrc.nist.gov/publications/nistpubs/800-90/SP800-90revised_March2007.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_CTR_DRBG_C) #if defined(MBEDTLS_CTR_DRBG_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_DEBUG_C) #if defined(MBEDTLS_DEBUG_C)

View File

@ -25,11 +25,7 @@
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf * http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_DES_C) #if defined(MBEDTLS_DES_C)

View File

@ -27,11 +27,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_DHM_C) #if defined(MBEDTLS_DHM_C)

View File

@ -26,11 +26,7 @@
* RFC 4492 * RFC 4492
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECDH_C) #if defined(MBEDTLS_ECDH_C)

View File

@ -25,11 +25,7 @@
* SEC1 http://www.secg.org/index.php?action=secg,docs_secg * SEC1 http://www.secg.org/index.php?action=secg,docs_secg
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECDSA_C) #if defined(MBEDTLS_ECDSA_C)

View File

@ -24,11 +24,7 @@
* available to members of the Thread Group http://threadgroup.org/ * available to members of the Thread Group http://threadgroup.org/
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECJPAKE_C) #if defined(MBEDTLS_ECJPAKE_C)

View File

@ -41,11 +41,7 @@
* <http://eprint.iacr.org/2004/342.pdf> * <http://eprint.iacr.org/2004/342.pdf>
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
/** /**
* \brief Function level alternative implementation. * \brief Function level alternative implementation.

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ECP_C) #if defined(MBEDTLS_ECP_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ENTROPY_C) #if defined(MBEDTLS_ENTROPY_C)

View File

@ -24,11 +24,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include <string.h> #include <string.h>

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) #if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
#include <string.h> #include <string.h>

View File

@ -29,11 +29,7 @@
* [MGV] 4.1, pp. 12-13, to enhance speed without using too much memory. * [MGV] 4.1, pp. 12-13, to enhance speed without using too much memory.
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_GCM_C) #if defined(MBEDTLS_GCM_C)

View File

@ -26,11 +26,7 @@
* Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr * Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_HAVEGE_C) #if defined(MBEDTLS_HAVEGE_C)

View File

@ -18,11 +18,7 @@
* *
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_HKDF_C) #if defined(MBEDTLS_HKDF_C)

View File

@ -25,11 +25,7 @@
* References below are based on rev. 1 (January 2012). * References below are based on rev. 1 (January 2012).
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_HMAC_DRBG_C) #if defined(MBEDTLS_HMAC_DRBG_C)

View File

@ -23,11 +23,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_MD_C) #if defined(MBEDTLS_MD_C)

View File

@ -25,11 +25,7 @@
* http://www.ietf.org/rfc/rfc1319.txt * http://www.ietf.org/rfc/rfc1319.txt
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_MD2_C) #if defined(MBEDTLS_MD2_C)

View File

@ -25,11 +25,7 @@
* http://www.ietf.org/rfc/rfc1320.txt * http://www.ietf.org/rfc/rfc1320.txt
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_MD4_C) #if defined(MBEDTLS_MD4_C)

View File

@ -24,11 +24,7 @@
* http://www.ietf.org/rfc/rfc1321.txt * http://www.ietf.org/rfc/rfc1321.txt
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_MD5_C) #if defined(MBEDTLS_MD5_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
#include "mbedtls/memory_buffer_alloc.h" #include "mbedtls/memory_buffer_alloc.h"

View File

@ -25,11 +25,7 @@
#define _POSIX_C_SOURCE 200112L #define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600 /* sockaddr_storage */ #define _XOPEN_SOURCE 600 /* sockaddr_storage */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_NET_C) #if defined(MBEDTLS_NET_C)

View File

@ -29,11 +29,7 @@
* the wrapping and unwrapping operation than the definition in NIST SP 800-38F. * the wrapping and unwrapping operation than the definition in NIST SP 800-38F.
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_NIST_KW_C) #if defined(MBEDTLS_NIST_KW_C)

View File

@ -21,11 +21,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_OID_C) #if defined(MBEDTLS_OID_C)

View File

@ -25,11 +25,7 @@
* programming_guide.pdf * programming_guide.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PADLOCK_C) #if defined(MBEDTLS_PADLOCK_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) #if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PK_C) #if defined(MBEDTLS_PK_C)
#include "mbedtls/pk.h" #include "mbedtls/pk.h"

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PK_C) #if defined(MBEDTLS_PK_C)
#include "mbedtls/pk_internal.h" #include "mbedtls/pk_internal.h"

View File

@ -25,11 +25,7 @@
* ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12v1-1.asn * ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12v1-1.asn
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PKCS12_C) #if defined(MBEDTLS_PKCS12_C)

View File

@ -29,11 +29,7 @@
* http://tools.ietf.org/html/rfc6070 (Test vectors) * http://tools.ietf.org/html/rfc6070 (Test vectors)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PKCS5_C) #if defined(MBEDTLS_PKCS5_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PK_PARSE_C) #if defined(MBEDTLS_PK_PARSE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PK_WRITE_C) #if defined(MBEDTLS_PK_WRITE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PLATFORM_C) #if defined(MBEDTLS_PLATFORM_C)

View File

@ -28,11 +28,7 @@
#define _POSIX_C_SOURCE 200112L #define _POSIX_C_SOURCE 200112L
#endif #endif
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/platform_util.h" #include "mbedtls/platform_util.h"
#include "mbedtls/platform.h" #include "mbedtls/platform.h"

View File

@ -20,11 +20,7 @@
* *
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_POLY1305_C) #if defined(MBEDTLS_POLY1305_C)

View File

@ -20,11 +20,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_PSA_CRYPTO_C)

View File

@ -20,11 +20,7 @@
* This file is part of Mbed TLS (https://tls.mbed.org) * This file is part of Mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PSA_CRYPTO_SE_C) #if defined(MBEDTLS_PSA_CRYPTO_SE_C)

View File

@ -20,11 +20,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_PSA_CRYPTO_C)

View File

@ -25,11 +25,7 @@
* http://ehash.iaik.tugraz.at/wiki/RIPEMD-160 * http://ehash.iaik.tugraz.at/wiki/RIPEMD-160
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_RIPEMD160_C) #if defined(MBEDTLS_RIPEMD160_C)

View File

@ -37,11 +37,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_RSA_C) #if defined(MBEDTLS_RSA_C)

View File

@ -20,11 +20,7 @@
* *
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_RSA_C) #if defined(MBEDTLS_RSA_C)

View File

@ -24,11 +24,7 @@
* http://www.itl.nist.gov/fipspubs/fip180-1.htm * http://www.itl.nist.gov/fipspubs/fip180-1.htm
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SHA1_C) #if defined(MBEDTLS_SHA1_C)

View File

@ -24,11 +24,7 @@
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SHA256_C) #if defined(MBEDTLS_SHA256_C)

View File

@ -24,11 +24,7 @@
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SHA512_C) #if defined(MBEDTLS_SHA512_C)

View File

@ -23,11 +23,7 @@
* to store and retrieve the session information. * to store and retrieve the session information.
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_CACHE_C) #if defined(MBEDTLS_SSL_CACHE_C)

View File

@ -21,11 +21,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_SSL_TLS_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_CLI_C) #if defined(MBEDTLS_SSL_CLI_C)

View File

@ -23,11 +23,7 @@
* to store and retrieve the session information. * to store and retrieve the session information.
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_COOKIE_C) #if defined(MBEDTLS_SSL_COOKIE_C)

View File

@ -28,11 +28,7 @@
* http://www.ietf.org/rfc/rfc4346.txt * http://www.ietf.org/rfc/rfc4346.txt
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_SSL_TLS_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_SRV_C) #if defined(MBEDTLS_SSL_SRV_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_TICKET_C) #if defined(MBEDTLS_SSL_TICKET_C)

View File

@ -27,11 +27,7 @@
* http://www.ietf.org/rfc/rfc4346.txt * http://www.ietf.org/rfc/rfc4346.txt
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_SSL_TLS_C)

View File

@ -27,11 +27,7 @@
#define _POSIX_C_SOURCE 200112L #define _POSIX_C_SOURCE 200112L
#endif #endif
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_THREADING_C) #if defined(MBEDTLS_THREADING_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_PLATFORM_C) #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h" #include "mbedtls/platform.h"

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_VERSION_C) #if defined(MBEDTLS_VERSION_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_VERSION_C) #if defined(MBEDTLS_VERSION_C)

View File

@ -29,11 +29,7 @@
* http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_USE_C) #if defined(MBEDTLS_X509_USE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CREATE_C) #if defined(MBEDTLS_X509_CREATE_C)

View File

@ -29,11 +29,7 @@
* http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CRL_PARSE_C) #if defined(MBEDTLS_X509_CRL_PARSE_C)

View File

@ -31,11 +31,7 @@
* [SIRO] https://cabforum.org/wp-content/uploads/Chunghwatelecom201503cabforumV4.pdf * [SIRO] https://cabforum.org/wp-content/uploads/Chunghwatelecom201503cabforumV4.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CRT_PARSE_C) #if defined(MBEDTLS_X509_CRT_PARSE_C)

View File

@ -29,11 +29,7 @@
* http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CSR_PARSE_C) #if defined(MBEDTLS_X509_CSR_PARSE_C)

View File

@ -25,11 +25,7 @@
* - attributes: PKCS#9 v2.0 aka RFC 2985 * - attributes: PKCS#9 v2.0 aka RFC 2985
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CRT_WRITE_C) #if defined(MBEDTLS_X509_CRT_WRITE_C)

View File

@ -24,11 +24,7 @@
* - attributes: PKCS#9 v2.0 aka RFC 2985 * - attributes: PKCS#9 v2.0 aka RFC 2985
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_X509_CSR_WRITE_C) #if defined(MBEDTLS_X509_CSR_WRITE_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_XTEA_C) #if defined(MBEDTLS_XTEA_C)

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) #if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
#include <string.h> #include <string.h>

View File

@ -19,11 +19,7 @@
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*/ */
#if !defined(MBEDTLS_CONFIG_FILE) #include "common.h"
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_VERSION_C) #if defined(MBEDTLS_VERSION_C)