From a1df4949b9524f5363c9c81739e971fa647b3e15 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 11 Mar 2021 17:44:43 +0000 Subject: [PATCH] Remove internal file references in programs/ `entropy_poll.h` and `md_wrap.h` were still being used in some of the example programs. As these headers are now internal, remove their references and replace them with publicly available functions. Signed-off-by: Chris Jones --- include/mbedtls/entropy.h | 8 ++++++++ programs/ssl/ssl_context_info.c | 3 +-- programs/test/selftest.c | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/mbedtls/entropy.h b/include/mbedtls/entropy.h index a4fd0be88..0ba30af50 100644 --- a/include/mbedtls/entropy.h +++ b/include/mbedtls/entropy.h @@ -134,6 +134,14 @@ typedef struct mbedtls_entropy_context } mbedtls_entropy_context; +#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) +/** + * \brief Platform-specific entropy poll callback + */ +int mbedtls_platform_entropy_poll( void *data, + unsigned char *output, size_t len, size_t *olen ); +#endif + /** * \brief Initialize the context * diff --git a/programs/ssl/ssl_context_info.c b/programs/ssl/ssl_context_info.c index 929a0f29a..4a7c77340 100644 --- a/programs/ssl/ssl_context_info.c +++ b/programs/ssl/ssl_context_info.c @@ -48,7 +48,6 @@ int main( void ) #include "mbedtls/error.h" #include "mbedtls/base64.h" #include "mbedtls/md.h" -#include "../../library/md_wrap.h" #include "mbedtls/x509_crt.h" #include "mbedtls/ssl_ciphersuites.h" @@ -638,7 +637,7 @@ void print_deserialized_ssl_session( const uint8_t *ssl, uint32_t len, } else { - printf( "\tMessage-Digest : %s\n", md_info->name ); + printf( "\tMessage-Digest : %s\n", mbedtls_md_get_name( md_info ) ); } } diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 02e1d1214..26c1997fb 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -55,7 +55,6 @@ #include "mbedtls/ecjpake.h" #include "mbedtls/timing.h" #include "mbedtls/nist_kw.h" -#include "../library/entropy_poll.h" #include