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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,9 +197,11 @@ 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),
printf("Crypto CB: CMD %s (%d)\n", GetAlgoTypeStr(info->algo_type),
GetCryptoCbCmdTypeStr(info->cmd.type), info->cmd.type);
#endif
}
else {
printf("CryptoCb: %s \n", GetAlgoTypeStr(info->algo_type));