Merge pull request #6732 from billphipps/correct_cryptocb_debug

Correct cryptocb cmd debug message
This commit is contained in:
JacobBarthelmeh
2023-08-25 13:57:32 -06:00
committed by GitHub

View File

@@ -154,6 +154,7 @@ static const char* GetRsaType(int type)
}
#endif
#ifdef WOLF_CRYPTO_CB_CMD
static const char* GetCryptoCbCmdTypeStr(int type)
{
switch (type) {
@@ -162,6 +163,8 @@ static const char* GetCryptoCbCmdTypeStr(int type)
}
return NULL;
}
#endif
WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
{
if (info == NULL)
@@ -194,10 +197,12 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
GetHashTypeStr(info->hmac.macType), info->hmac.macType);
}
#ifdef WOLF_CRYPTO_CB_CMD
else if (info->algo_type == WC_ALGO_TYPE_NONE) {
printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
GetCryptoCbCmdTypeStr(info->cmd.type), info->cmd.type);
}
#endif
else {
printf("CryptoCb: %s \n", GetAlgoTypeStr(info->algo_type));
}