forked from wolfSSL/wolfssl
add custom print to test.c for PB
This commit is contained in:
@@ -201,6 +201,11 @@
|
|||||||
void BSP_Ser_Printf (CPU_CHAR* format, ...);
|
void BSP_Ser_Printf (CPU_CHAR* format, ...);
|
||||||
#undef printf
|
#undef printf
|
||||||
#define printf BSP_Ser_Printf
|
#define printf BSP_Ser_Printf
|
||||||
|
#elif defined(WOLFSSL_PB)
|
||||||
|
#include <stdarg.h>
|
||||||
|
int wolfssl_pb_print(const char*, ...);
|
||||||
|
#undef printf
|
||||||
|
#define printf wolfssl_pb_print
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wolfcrypt/test/test.h"
|
#include "wolfcrypt/test/test.h"
|
||||||
@@ -400,6 +405,23 @@ static void myFipsCb(int ok, int err, const char* hash)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_PB
|
||||||
|
int wolfssl_pb_print(const char* msg, ...)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
va_list args;
|
||||||
|
char tmpBuf[80];
|
||||||
|
|
||||||
|
va_start(args, msg);
|
||||||
|
ret = vsprint(tmpBuf, msg, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
fnDumpStringToSystemLog(tmpBuf);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif /* WOLFSSL_PB */
|
||||||
|
|
||||||
#ifdef HAVE_STACK_SIZE
|
#ifdef HAVE_STACK_SIZE
|
||||||
THREAD_RETURN WOLFSSL_THREAD wolfcrypt_test(void* args)
|
THREAD_RETURN WOLFSSL_THREAD wolfcrypt_test(void* args)
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user