mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-04 01:15:05 +01:00
Cleanup of the MQX file headers for STDIO. Cleanup of fio.h and nio.h includes to use wc_port.h. ZD 9453.
This commit is contained in:
@@ -65,13 +65,7 @@
|
||||
|
||||
#if defined(DEBUG_WOLFSSL) || defined(SHOW_SECRETS) || \
|
||||
defined(CHACHA_AEAD_TEST) || defined(WOLFSSL_SESSION_EXPORT_DEBUG)
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#else
|
||||
#ifndef NO_STDIO_FILESYSTEM
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -33,13 +33,7 @@
|
||||
#include <wolfssl/internal.h>
|
||||
#include <wolfssl/error-ssl.h>
|
||||
#if defined(SHOW_SECRETS) || defined(CHACHA_AEAD_TEST)
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#else
|
||||
#ifndef NO_STDIO_FILESYSTEM
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -3659,4 +3653,3 @@ int MakeMasterSecret(WOLFSSL* ssl)
|
||||
}
|
||||
|
||||
#endif /* WOLFCRYPT_ONLY */
|
||||
|
||||
|
||||
13
src/tls13.c
13
src/tls13.c
@@ -106,19 +106,6 @@
|
||||
#include "libntruencrypt/ntru_crypto.h"
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_WOLFSSL) || defined(WOLFSSL_DEBUG) || \
|
||||
defined(CHACHA_AEAD_TEST) || defined(WOLFSSL_SESSION_EXPORT_DEBUG)
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __sun
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/version.h>
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
|
||||
/* Macro to disable benchmark */
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
@@ -48,11 +49,7 @@
|
||||
/* printf mappings */
|
||||
#ifdef FREESCALE_MQX
|
||||
#include <mqx.h>
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
/* see wc_port.h for fio.h and nio.h includes */
|
||||
#elif defined(FREESCALE_KSDK_1_3)
|
||||
#include "fsl_debug_console.h"
|
||||
#include "fsl_os_abstraction.h"
|
||||
@@ -93,7 +90,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "wolfssl/wolfcrypt/wc_port.h" /* for m2mb headers */
|
||||
#include "m2m_log.h" /* for M2M_LOG_INFO - not standard API */
|
||||
/* remap printf */
|
||||
#undef printf
|
||||
|
||||
@@ -116,19 +116,6 @@ extern int wc_InitRsaHw(RsaKey* key);
|
||||
#include <wolfssl/wolfcrypt/cryptocb.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_DEBUG_ENCODING
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */
|
||||
#pragma warning(disable: 4996)
|
||||
@@ -7191,7 +7178,7 @@ static int DecodeBasicCaConstraint(const byte* input, int sz, DecodedCert* cert)
|
||||
cert->isCA = FALSE;
|
||||
} else return ret;
|
||||
} else
|
||||
cert->isCA = (byte)ret;
|
||||
cert->isCA = (byte)ret;
|
||||
#endif
|
||||
|
||||
/* If there isn't any more data, return. */
|
||||
|
||||
@@ -63,13 +63,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef SHOW_GEN
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#else
|
||||
#ifndef NO_STDIO_FILESYSTEM
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -5288,4 +5282,3 @@ void mp_dump(const char* desc, mp_int* a, byte verbose)
|
||||
#endif /* USE_FAST_MATH */
|
||||
|
||||
#endif /* NO_BIG_INT */
|
||||
|
||||
|
||||
@@ -201,11 +201,7 @@ void WOLFSSL_TIME(int count)
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
/* see wc_port.h for fio.h and nio.h includes */
|
||||
#elif defined(WOLFSSL_SGX)
|
||||
/* Declare sprintf for ocall */
|
||||
int sprintf(char* buf, const char *fmt, ...);
|
||||
@@ -798,4 +794,3 @@ void wc_ERR_print_errors_fp(XFILE fp)
|
||||
#endif /* !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) */
|
||||
|
||||
#endif /* defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE) */
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/version.h>
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
|
||||
#ifndef NO_CRYPT_TEST
|
||||
|
||||
@@ -47,11 +48,7 @@
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#include <mqx.h>
|
||||
#include <stdlib.h>
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
/* see wc_port.h for fio.h and nio.h includes */
|
||||
#elif defined(FREESCALE_KSDK_BM)
|
||||
#include "fsl_debug_console.h"
|
||||
#undef printf
|
||||
|
||||
@@ -42,16 +42,6 @@
|
||||
/* used internally by wolfSSL while OpenSSL types aren't */
|
||||
#include <wolfssl/callbacks.h>
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#if MQX_USE_IO_OLD
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_PREFIX
|
||||
#include "prefix_ssl.h"
|
||||
#endif
|
||||
|
||||
@@ -875,6 +875,11 @@ extern void uITRON4_free(void *p) ;
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX_5_0
|
||||
/* use normal Freescale MQX port, but with minor changes for 5.0 */
|
||||
#define FREESCALE_MQX
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX_4_0
|
||||
/* use normal Freescale MQX port, but with minor changes for 4.0 */
|
||||
#define FREESCALE_MQX
|
||||
@@ -885,7 +890,8 @@ extern void uITRON4_free(void *p) ;
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#if MQX_USE_IO_OLD
|
||||
#if (defined(MQX_USE_IO_OLD) && MQX_USE_IO_OLD) || \
|
||||
defined(FREESCALE_MQX_5_0)
|
||||
#include "fio.h"
|
||||
#define NO_STDIO_FILESYSTEM
|
||||
#else
|
||||
@@ -908,7 +914,8 @@ extern void uITRON4_free(void *p) ;
|
||||
#define FREESCALE_COMMON
|
||||
#include <mqx.h>
|
||||
#ifndef NO_FILESYSTEM
|
||||
#if MQX_USE_IO_OLD
|
||||
#if (defined(MQX_USE_IO_OLD) && MQX_USE_IO_OLD) || \
|
||||
defined(FREESCALE_MQX_5_0)
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -42,6 +42,20 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* GENERIC INCLUDE SECTION */
|
||||
#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
|
||||
#include <mqx.h>
|
||||
#if (defined(MQX_USE_IO_OLD) && MQX_USE_IO_OLD) || \
|
||||
defined(FREESCALE_MQX_5_0)
|
||||
#include <fio.h>
|
||||
#else
|
||||
#include <nio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* THREADING/MUTEX SECTION */
|
||||
#ifdef USE_WINDOWS_API
|
||||
#ifdef WOLFSSL_GAME_BUILD
|
||||
#include "system/xtl.h"
|
||||
@@ -273,6 +287,8 @@ WOLFSSL_API int wc_SetMutexCb(mutex_cb* cb);
|
||||
WOLFSSL_API int wolfCrypt_Init(void);
|
||||
WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
|
||||
|
||||
/* FILESYSTEM SECTION */
|
||||
/* filesystem abstraction layer, used by ssl.c */
|
||||
#ifndef NO_FILESYSTEM
|
||||
|
||||
@@ -467,6 +483,8 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
|
||||
#endif /* !NO_FILESYSTEM */
|
||||
|
||||
|
||||
/* MIN/MAX MACRO SECTION */
|
||||
/* Windows API defines its own min() macro. */
|
||||
#if defined(USE_WINDOWS_API)
|
||||
#if defined(min) || defined(WOLFSSL_MYSQL_COMPATIBLE)
|
||||
@@ -477,6 +495,8 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
#endif /* max */
|
||||
#endif /* USE_WINDOWS_API */
|
||||
|
||||
|
||||
/* TIME SECTION */
|
||||
/* Time functions */
|
||||
#ifndef NO_ASN_TIME
|
||||
#if defined(USER_TIME)
|
||||
@@ -715,6 +735,7 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
#endif
|
||||
#endif /* NO_ASN_TIME */
|
||||
|
||||
|
||||
#ifndef WOLFSSL_LEANPSK
|
||||
char* mystrnstr(const char* s1, const char* s2, unsigned int n);
|
||||
#endif
|
||||
@@ -749,4 +770,3 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
#endif
|
||||
|
||||
#endif /* WOLF_CRYPT_PORT_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user