Correct cryptocb cmd debug message

This commit is contained in:
billphipps
2023-08-25 11:16:15 -04:00
committed by GitHub
parent c9e9e0fc72
commit 27bc7219e5

View File

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