Merge pull request #9036 from kareem-wolfssl/zd20239

Fix size used by signature context struct with WOLFSSL_NO_MALLOC.
This commit is contained in:
JacobBarthelmeh
2025-07-29 17:13:34 -06:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@ -1386,7 +1386,7 @@ struct SignatureCtx {
#endif
#if !defined(NO_RSA) || !defined(NO_DSA)
#ifdef WOLFSSL_NO_MALLOC
byte sigCpy[MAX_SIG_SZ];
byte sigCpy[MAX_ENCODED_SIG_SZ];
#else
byte* sigCpy;
#endif

View File

@ -2071,7 +2071,6 @@ enum Max_ASN {
#else
MAX_ENCODED_SIG_SZ = 64,
#endif
MAX_SIG_SZ = 256,
MAX_ALGO_SZ = 20,
MAX_LENGTH_SZ = WOLFSSL_ASN_MAX_LENGTH_SZ, /* Max length size for DER encoding */
MAX_SHORT_SZ = (1 + 1 + 5), /* asn int + byte len + 5 byte length */
@ -2128,6 +2127,8 @@ enum Max_ASN {
#define WC_MAX_BLOCK_SIZE 128
#endif
#define MAX_SIG_SZ MAX_ENCODED_SIG_SZ
#ifdef WOLFSSL_CERT_GEN
/* Used in asn.c MakeSignature for ECC and RSA non-blocking/async */
enum CertSignState {