From 64c7699f68f896b98e3400aadda74dedebe5b759 Mon Sep 17 00:00:00 2001 From: night1rider Date: Wed, 22 Jul 2026 13:17:32 -0600 Subject: [PATCH] versal_gen2_asu: fix check-source-text native heap false positive and add port macros to .wolfssl_known_macro_extras. --- .wolfssl_known_macro_extras | 3 +++ .../wolfcrypt/port/xilinx/versal_gen2_asu/asu_hash.h | 2 +- .../wolfcrypt/port/xilinx/versal_gen2_asu/asu_hmac.h | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index c3906b7569..51f66cce37 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -1046,6 +1046,8 @@ WOLFSSL_USE_FLASHMEM WOLFSSL_USE_FORCE_ZERO WOLFSSL_USE_OPTIONS_H WOLFSSL_VALIDATE_DH_KEYGEN +WOLFSSL_VERSAL_GEN2_ASU +WOLFSSL_VERSAL_GEN2_ASU_RTC WOLFSSL_WC_SLHDSA_RECURSIVE WOLFSSL_WC_XMSS_NO_SHA256 WOLFSSL_WICED_PSEUDO_UNIX_EPOCH_TIME @@ -1073,6 +1075,7 @@ WOLF_CRYPTO_DEV WOLF_CRYPT_FIPS_H WOLF_NO_TRAILING_ENUM_COMMAS WindowsCE +XASU_DISABLE_CACHE XGETPASSWD XMSS_CALL_PRF_KEYGEN XPAR_VERSAL_CIPS_0_PSPMC_0_PSV_CORTEXA72_0_TIMESTAMP_CLK_FREQ diff --git a/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hash.h b/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hash.h index a06a85fd9b..772a0c18da 100644 --- a/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hash.h +++ b/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hash.h @@ -39,7 +39,7 @@ extern "C" { /* Single entry point for the SHA2/SHA3 engine. The crypto callback dispatcher * routes every hash related operation here and this handler decides which it is: * update and final (WC_ALGO_TYPE_HASH), context copy (WC_ALGO_TYPE_COPY), or - * context free (WC_ALGO_TYPE_FREE). Supports SHA2 256/384/512 and SHA3 + * context release (WC_ALGO_TYPE_FREE). Supports SHA2 256/384/512 and SHA3 * 256/384/512. Returns 0 on success, CRYPTOCB_UNAVAILABLE for an unsupported * operation or hash type (software fallback), or a negative error. */ WOLFSSL_LOCAL int wc_AsuHash(wc_CryptoInfo* info); diff --git a/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hmac.h b/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hmac.h index d39498508a..b3319aa0fa 100644 --- a/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hmac.h +++ b/wolfssl/wolfcrypt/port/xilinx/versal_gen2_asu/asu_hmac.h @@ -39,11 +39,11 @@ extern "C" { /* Single entry point for the HMAC engine. The crypto callback dispatcher routes * every HMAC related operation here and this handler decides which it is: update * and final (WC_ALGO_TYPE_HMAC), context copy (WC_ALGO_TYPE_COPY) or context - * free (WC_ALGO_TYPE_FREE). The message is accumulated per context and the HMAC - * is computed in one ASU operation at final using the raw key wolfSSL keeps on - * the context. Supports HMAC over SHA2 256/384/512 and SHA3 256/384/512. Returns - * 0 on success, CRYPTOCB_UNAVAILABLE for an unsupported MAC type or key (software - * fallback), or a negative error. */ + * release (WC_ALGO_TYPE_FREE). The message is accumulated per context and the + * HMAC is computed in one ASU operation at final using the raw key wolfSSL + * keeps on the context. Supports HMAC over SHA2 256/384/512 and SHA3 + * 256/384/512. Returns 0 on success, CRYPTOCB_UNAVAILABLE for an unsupported + * MAC type or key (software fallback), or a negative error. */ WOLFSSL_LOCAL int wc_AsuHmac(wc_CryptoInfo* info); #ifdef __cplusplus