1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-06 12:00:59 +03:00

Merge pull request #10523 from mpg/rm-ecdh

Remove some useless private includes
This commit is contained in:
Valerio Setti
2025-12-02 15:21:24 +00:00
committed by GitHub
17 changed files with 7 additions and 59 deletions

View File

@@ -11,7 +11,9 @@
#define MBEDTLS_ERROR_H
#include "mbedtls/build_info.h"
#include "mbedtls/private/error_common.h"
#include "mbedtls/private/error_common.h" // for MBEDTLS_ERROR_ADD + see below
// MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED
// MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED
#include <stddef.h>

View File

@@ -14,9 +14,6 @@
#include "mbedtls/build_info.h"
#include "mbedtls/private/bignum.h"
#include "mbedtls/private/ecp.h"
#include "mbedtls/ssl_ciphersuites.h"
#if defined(MBEDTLS_X509_CRT_PARSE_C)
@@ -26,10 +23,6 @@
#include "mbedtls/md.h"
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_ANY_ENABLED)
#include "mbedtls/private/ecdh.h"
#endif
#if defined(MBEDTLS_HAVE_TIME)
#include "mbedtls/platform_time.h"
#endif

View File

@@ -14,7 +14,6 @@
#include "mbedtls/build_info.h"
#include "mbedtls/pk.h"
#include "mbedtls/private/cipher.h"
#include "mbedtls/md.h"
#ifdef __cplusplus

View File

@@ -15,7 +15,6 @@
#include "mbedtls/x509.h"
#include "mbedtls/x509_crl.h"
#include "mbedtls/private/bignum.h"
/**
* \addtogroup x509_module

View File

@@ -11,9 +11,6 @@
#define MBEDTLS_SSL_CIPHERSUITES_INTERNAL_H
#include "mbedtls/pk.h"
#if defined(MBEDTLS_PK_HAVE_PRIVATE_HEADER)
#include <mbedtls/private/pk_private.h>
#endif /* MBEDTLS_PK_HAVE_PRIVATE_HEADER */
#if defined(MBEDTLS_PK_C)
mbedtls_pk_sigalg_t mbedtls_ssl_get_ciphersuite_sig_pk_alg(const mbedtls_ssl_ciphersuite_t *info);

View File

@@ -19,35 +19,13 @@
#include "mbedtls/debug.h"
#include "debug_internal.h"
#include "mbedtls/private/cipher.h"
#include "psa/crypto.h"
#include "psa_util_internal.h"
#include "psa_util_internal.h" // for mbedtls_error_pair_t, psa_status_to_mbedtls
extern const mbedtls_error_pair_t psa_to_ssl_errors[7];
#if defined(PSA_WANT_ALG_MD5)
#include "mbedtls/private/md5.h"
#endif
#if defined(PSA_WANT_ALG_SHA_1)
#include "mbedtls/private/sha1.h"
#endif
#if defined(PSA_WANT_ALG_SHA_256)
#include "mbedtls/private/sha256.h"
#endif
#if defined(PSA_WANT_ALG_SHA_512)
#include "mbedtls/private/sha512.h"
#endif
#include "mbedtls/pk.h"
#if defined(MBEDTLS_PK_HAVE_PRIVATE_HEADER)
#include <mbedtls/private/pk_private.h>
#endif /* MBEDTLS_PK_HAVE_PRIVATE_HEADER */
#include "ssl_ciphersuites_internal.h"
#include "x509_internal.h"
#include "pk_internal.h"
/* Shorthand for restartable ECC */
#if defined(MBEDTLS_ECP_RESTARTABLE) && \

View File

@@ -21,12 +21,11 @@
#include "mbedtls/error.h"
#include "mbedtls/platform_util.h"
#include "mbedtls/version.h"
#include "constant_time_internal.h"
#include "constant_time_internal.h" // for internal mbedtls_ct_xxx functions
#include "mbedtls/constant_time.h"
#include <string.h>
#include "psa_util_internal.h"
#include "psa/crypto.h"
#if defined(MBEDTLS_X509_CRT_PARSE_C)

View File

@@ -29,8 +29,7 @@
#include <string.h>
#include "mbedtls/psa_util.h"
#include "md_psa.h"
#include "psa_util_internal.h"
#include "md_psa.h" // for mbedtls_md_error_from_psa()
#include "psa/crypto.h"
#if defined(MBEDTLS_X509_CRT_PARSE_C)

View File

@@ -17,7 +17,6 @@
#include "mbedtls/error.h"
#include "mbedtls/constant_time.h"
#include "psa_util_internal.h"
#include "psa/crypto.h"
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
/* Define a local translating function to save code size by not using too many

View File

@@ -15,7 +15,6 @@
#include "debug_internal.h"
#include "mbedtls/error.h"
#include "mbedtls/platform_util.h"
#include "constant_time_internal.h"
#include "mbedtls/constant_time.h"
#include <string.h>
@@ -32,10 +31,6 @@ static int local_err_translation(psa_status_t status)
#define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status)
#endif
#if defined(MBEDTLS_ECP_C)
#include "mbedtls/private/ecp.h"
#endif
#if defined(MBEDTLS_HAVE_TIME)
#include "mbedtls/platform_time.h"
#endif

View File

@@ -24,7 +24,6 @@
#include "ssl_debug_helpers.h"
#include "psa/crypto.h"
#include "psa_util_internal.h"
#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_EPHEMERAL_ENABLED)
/* Define a local translating function to save code size by not using too many

View File

@@ -35,9 +35,7 @@
#endif
#include "psa/crypto.h"
#include "psa_util_internal.h"
#include "mbedtls/psa_util.h"
#include "pk_internal.h"
#include "mbedtls/platform.h"

View File

@@ -16,11 +16,8 @@
#include "mbedtls/x509.h"
#include "mbedtls/asn1.h"
#include "pk_internal.h"
#if defined(MBEDTLS_RSA_C)
#include "mbedtls/private/rsa.h"
#endif
#include "pk_internal.h" // for a lot of things, including in SSL
int mbedtls_x509_get_name(unsigned char **p, const unsigned char *end,
mbedtls_x509_name *cur);

View File

@@ -13,9 +13,6 @@
#include "mbedtls/asn1.h"
#include "mbedtls/pk.h"
#if defined(MBEDTLS_PK_HAVE_PRIVATE_HEADER)
#include <mbedtls/private/pk_private.h>
#endif /* MBEDTLS_PK_HAVE_PRIVATE_HEADER */
#include "mbedtls/x509.h"
#include <stddef.h>

View File

@@ -24,7 +24,6 @@
#include "psa/crypto.h"
#include "mbedtls/psa_util.h"
#include "md_psa.h"
#define CHECK_OVERFLOW_ADD(a, b) \
do \

View File

@@ -32,7 +32,6 @@
#endif /* MBEDTLS_PEM_WRITE_C */
#include "psa/crypto.h"
#include "psa_util_internal.h"
#include "mbedtls/psa_util.h"
void mbedtls_x509write_crt_init(mbedtls_x509write_cert *ctx)

View File

@@ -22,7 +22,6 @@
#include "mbedtls/platform_util.h"
#include "psa/crypto.h"
#include "psa_util_internal.h"
#include "mbedtls/psa_util.h"
#include <string.h>