diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 090632ca1..1360c11d4 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -35,22 +35,6 @@ #include "ssl_ciphersuites.h" -#if defined(MBEDTLS_MD5_C) -#include "md5.h" -#endif - -#if defined(MBEDTLS_SHA1_C) -#include "sha1.h" -#endif - -#if defined(MBEDTLS_SHA256_C) -#include "sha256.h" -#endif - -#if defined(MBEDTLS_SHA512_C) -#include "sha512.h" -#endif - #if defined(MBEDTLS_X509_CRT_PARSE_C) #include "x509_crt.h" #include "x509_crl.h" @@ -68,10 +52,6 @@ #include "zlib.h" #endif -#if defined(MBEDTLS_SSL_PROTO_DTLS) -#include "timing.h" -#endif - #if defined(MBEDTLS_HAVE_TIME) #include #endif diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 26a8879dd..310e283a8 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -26,6 +26,22 @@ #include "ssl.h" +#if defined(MBEDTLS_MD5_C) +#include "md5.h" +#endif + +#if defined(MBEDTLS_SHA1_C) +#include "sha1.h" +#endif + +#if defined(MBEDTLS_SHA256_C) +#include "sha256.h" +#endif + +#if defined(MBEDTLS_SHA512_C) +#include "sha512.h" +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c index d3885aab2..405297556 100644 --- a/programs/ssl/dtls_client.c +++ b/programs/ssl/dtls_client.c @@ -59,6 +59,7 @@ int main( void ) #include "mbedtls/ctr_drbg.h" #include "mbedtls/error.h" #include "mbedtls/certs.h" +#include "mbedtls/timing.h" #define SERVER_PORT 4433 #define SERVER_NAME "localhost" diff --git a/programs/ssl/dtls_server.c b/programs/ssl/dtls_server.c index 12b27319c..4eabf98b6 100644 --- a/programs/ssl/dtls_server.c +++ b/programs/ssl/dtls_server.c @@ -70,6 +70,7 @@ int main( void ) #include "mbedtls/net.h" #include "mbedtls/error.h" #include "mbedtls/debug.h" +#include "mbedtls/timing.h" #if defined(MBEDTLS_SSL_CACHE_C) #include "mbedtls/ssl_cache.h" diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 390450bf2..7982ae9c9 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -56,6 +56,7 @@ int main( void ) #include "mbedtls/x509.h" #include "mbedtls/error.h" #include "mbedtls/debug.h" +#include "mbedtls/timing.h" #include #include