diff --git a/wolfcrypt/src/cryptocb.c b/wolfcrypt/src/cryptocb.c index cc09ec04f..299118f70 100644 --- a/wolfcrypt/src/cryptocb.c +++ b/wolfcrypt/src/cryptocb.c @@ -186,16 +186,18 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info) } } else if (info->algo_type == WC_ALGO_TYPE_CIPHER) { - printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type), - GetCipherTypeStr(info->cipher.type), info->cipher.type); + printf("Crypto CB: %s %s (%d) (%p ctx)\n", GetAlgoTypeStr(info->algo_type), + GetCipherTypeStr(info->cipher.type), info->cipher.type, info->cipher.ctx); } else if (info->algo_type == WC_ALGO_TYPE_HASH) { - printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type), - GetHashTypeStr(info->hash.type), info->hash.type); + printf("Crypto CB: %s %s (%d) (%p ctx) %s\n", GetAlgoTypeStr(info->algo_type), + GetHashTypeStr(info->hash.type), info->hash.type, info->hash.ctx, + (info->hash.in != NULL) ? "Update" : "Final"); } else if (info->algo_type == WC_ALGO_TYPE_HMAC) { - printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type), - GetHashTypeStr(info->hmac.macType), info->hmac.macType); + printf("Crypto CB: %s %s (%d) (%p ctx) %s\n", GetAlgoTypeStr(info->algo_type), + GetHashTypeStr(info->hmac.macType), info->hmac.macType, info->hmac.hmac, + (info->hmac.in != NULL) ? "Update" : "Final"); } #ifdef WOLF_CRYPTO_CB_CMD else if (info->algo_type == WC_ALGO_TYPE_NONE) { diff --git a/wolfssl/wolfcrypt/cryptocb.h b/wolfssl/wolfcrypt/cryptocb.h index cf38444f0..04548e386 100644 --- a/wolfssl/wolfcrypt/cryptocb.h +++ b/wolfssl/wolfcrypt/cryptocb.h @@ -296,6 +296,7 @@ typedef struct wc_CryptoInfo { word32 sz; } des3; #endif + void* ctx; #if HAVE_ANONYMOUS_INLINE_AGGREGATES }; #endif @@ -326,6 +327,7 @@ typedef struct wc_CryptoInfo { #ifdef WOLFSSL_SHA512 wc_Sha512* sha512; #endif + void* ctx; #if HAVE_ANONYMOUS_INLINE_AGGREGATES }; #endif