Move some includes to ssl_internal.h

Also removed one from ssl.h and add it in programs where it belongs
This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-26 12:19:45 +02:00
parent cd4fcc6c8b
commit 56273daea0
5 changed files with 19 additions and 20 deletions

View File

@ -35,22 +35,6 @@
#include "ssl_ciphersuites.h" #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) #if defined(MBEDTLS_X509_CRT_PARSE_C)
#include "x509_crt.h" #include "x509_crt.h"
#include "x509_crl.h" #include "x509_crl.h"
@ -68,10 +52,6 @@
#include "zlib.h" #include "zlib.h"
#endif #endif
#if defined(MBEDTLS_SSL_PROTO_DTLS)
#include "timing.h"
#endif
#if defined(MBEDTLS_HAVE_TIME) #if defined(MBEDTLS_HAVE_TIME)
#include <time.h> #include <time.h>
#endif #endif

View File

@ -26,6 +26,22 @@
#include "ssl.h" #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 #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -59,6 +59,7 @@ int main( void )
#include "mbedtls/ctr_drbg.h" #include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "mbedtls/certs.h" #include "mbedtls/certs.h"
#include "mbedtls/timing.h"
#define SERVER_PORT 4433 #define SERVER_PORT 4433
#define SERVER_NAME "localhost" #define SERVER_NAME "localhost"

View File

@ -70,6 +70,7 @@ int main( void )
#include "mbedtls/net.h" #include "mbedtls/net.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "mbedtls/debug.h" #include "mbedtls/debug.h"
#include "mbedtls/timing.h"
#if defined(MBEDTLS_SSL_CACHE_C) #if defined(MBEDTLS_SSL_CACHE_C)
#include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_cache.h"

View File

@ -56,6 +56,7 @@ int main( void )
#include "mbedtls/x509.h" #include "mbedtls/x509.h"
#include "mbedtls/error.h" #include "mbedtls/error.h"
#include "mbedtls/debug.h" #include "mbedtls/debug.h"
#include "mbedtls/timing.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>