mirror of https://github.com/wolfSSL/wolfssl.git
add custom print to test.c for PB
parent
eeb50099d9
commit
f59fb0df8e
|
@ -201,6 +201,11 @@
|
|||
void BSP_Ser_Printf (CPU_CHAR* format, ...);
|
||||
#undef 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
|
||||
|
||||
#include "wolfcrypt/test/test.h"
|
||||
|
@ -400,6 +405,23 @@ static void myFipsCb(int ok, int err, const char* hash)
|
|||
#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
|
||||
THREAD_RETURN WOLFSSL_THREAD wolfcrypt_test(void* args)
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue