Merge pull request #8602 from dgarske/cryptocb_no_hmac

Fix for crypto callback macro guards with `DEBUG_CRYPTOCB`
This commit is contained in:
Brett Nicholas
2025-03-28 10:51:45 -06:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@ -207,6 +207,8 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
info->cipher.type, info->cipher.ctx);
}
#endif /* !NO_AES || !NO_DES3 */
#if !defined(NO_SHA) || !defined(NO_SHA256) || \
defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA3)
else if (info->algo_type == WC_ALGO_TYPE_HASH) {
printf("Crypto CB: %s %s (%d) (%p ctx) %s\n",
GetAlgoTypeStr(info->algo_type),
@ -214,6 +216,8 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
info->hash.type, info->hash.ctx,
(info->hash.in != NULL) ? "Update" : "Final");
}
#endif
#ifndef NO_HMAC
else if (info->algo_type == WC_ALGO_TYPE_HMAC) {
printf("Crypto CB: %s %s (%d) (%p ctx) %s\n",
GetAlgoTypeStr(info->algo_type),
@ -221,6 +225,7 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
info->hmac.macType, info->hmac.hmac,
(info->hmac.in != NULL) ? "Update" : "Final");
}
#endif
#ifdef WOLFSSL_CMAC
else if (info->algo_type == WC_ALGO_TYPE_CMAC) {
printf("Crypto CB: %s %s (%d) (%p ctx) %s %s %s\n",

View File

@ -375,7 +375,7 @@ typedef struct wc_CryptoInfo {
} cipher;
#endif /* !NO_AES || !NO_DES3 */
#if !defined(NO_SHA) || !defined(NO_SHA256) || \
defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA3)
struct {
int type; /* enum wc_HashType */
const byte* in;