diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index fbe4e290e..97eb5e56a 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -201,6 +201,11 @@ void BSP_Ser_Printf (CPU_CHAR* format, ...); #undef printf #define printf BSP_Ser_Printf +#elif defined(WOLFSSL_PB) + #include + 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