Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add limits.h inclusion to ssl_tls.c and udp_proxy.c #1999

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 3rdparty/everest/library/Hacl_Curve25519_joined.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I've stated before, I don't like this approach. Every library source file is changed to include something that doesn't really concern it.

Furthermore this is unrelated to the original objective of the pull request. It neither fixes the problem nor contributes to making the problem less likely to happen again.

I wouldn't have vetoed the PR on this basis, but since the PR needs rework anyway, please remove the inclusion of check_config.h everywhere.

To include check_config.h everywhere, on development, add it to library/common.h, which was added to development today (and we'll also need to include common.h everywhere, which isn't done yet).


#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)

Expand Down
1 change: 1 addition & 0 deletions 3rdparty/everest/library/everest.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions 3rdparty/everest/library/x25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

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

Expand Down
1 change: 1 addition & 0 deletions library/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_AES_C)

Expand Down
1 change: 1 addition & 0 deletions library/aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_AESNI_C)

Expand Down
1 change: 1 addition & 0 deletions library/arc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ARC4_C)

Expand Down
1 change: 1 addition & 0 deletions library/aria.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ARIA_C)

Expand Down
1 change: 1 addition & 0 deletions library/asn1parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ASN1_PARSE_C)

Expand Down
1 change: 1 addition & 0 deletions library/asn1write.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ASN1_WRITE_C)

Expand Down
1 change: 1 addition & 0 deletions library/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_BASE64_C)

Expand Down
1 change: 1 addition & 0 deletions library/bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_BIGNUM_C)

Expand Down
1 change: 1 addition & 0 deletions library/blowfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_BLOWFISH_C)

Expand Down
1 change: 1 addition & 0 deletions library/camellia.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CAMELLIA_C)

Expand Down
1 change: 1 addition & 0 deletions library/ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CCM_C)

Expand Down
1 change: 1 addition & 0 deletions library/certs.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#include "mbedtls/certs.h"

Expand Down
1 change: 1 addition & 0 deletions library/chacha20.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CHACHA20_C)

Expand Down
1 change: 1 addition & 0 deletions library/chachapoly.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CHACHAPOLY_C)

Expand Down
1 change: 1 addition & 0 deletions library/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CIPHER_C)

Expand Down
1 change: 1 addition & 0 deletions library/cipher_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CIPHER_C)

Expand Down
1 change: 1 addition & 0 deletions library/cmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CMAC_C)

Expand Down
1 change: 1 addition & 0 deletions library/ctr_drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_CTR_DRBG_C)

Expand Down
1 change: 1 addition & 0 deletions library/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_DEBUG_C)

Expand Down
1 change: 1 addition & 0 deletions library/des.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_DES_C)

Expand Down
1 change: 1 addition & 0 deletions library/dhm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_DHM_C)

Expand Down
1 change: 1 addition & 0 deletions library/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ECDH_C)

Expand Down
1 change: 1 addition & 0 deletions library/ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ECDSA_C)

Expand Down
1 change: 1 addition & 0 deletions library/ecjpake.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ECJPAKE_C)

Expand Down
1 change: 1 addition & 0 deletions library/ecp.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

/**
* \brief Function level alternative implementation.
Expand Down
1 change: 1 addition & 0 deletions library/ecp_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ECP_C)

Expand Down
1 change: 1 addition & 0 deletions library/entropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ENTROPY_C)

Expand Down
1 change: 1 addition & 0 deletions library/entropy_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions library/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions library/gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_GCM_C)

Expand Down
1 change: 1 addition & 0 deletions library/havege.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_HAVEGE_C)

Expand Down
1 change: 1 addition & 0 deletions library/hkdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_HKDF_C)

Expand Down
1 change: 1 addition & 0 deletions library/hmac_drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_HMAC_DRBG_C)

Expand Down
1 change: 1 addition & 0 deletions library/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_MD_C)

Expand Down
1 change: 1 addition & 0 deletions library/md2.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_MD2_C)

Expand Down
1 change: 1 addition & 0 deletions library/md4.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_MD4_C)

Expand Down
1 change: 1 addition & 0 deletions library/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_MD5_C)

Expand Down
1 change: 1 addition & 0 deletions library/memory_buffer_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
#include "mbedtls/memory_buffer_alloc.h"
Expand Down
1 change: 1 addition & 0 deletions library/net_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_NET_C)

Expand Down
1 change: 1 addition & 0 deletions library/nist_kw.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_NIST_KW_C)

Expand Down
1 change: 1 addition & 0 deletions library/oid.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_OID_C)

Expand Down
1 change: 1 addition & 0 deletions library/padlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_PADLOCK_C)

Expand Down
1 change: 1 addition & 0 deletions library/pem.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C)

Expand Down
1 change: 1 addition & 0 deletions library/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_PK_C)
#include "mbedtls/pk.h"
Expand Down
1 change: 1 addition & 0 deletions library/pk_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#if defined(MBEDTLS_PK_C)
#include "mbedtls/pk_internal.h"
Expand Down
Loading