Fix RSA exponent printing (ZD 21426)

Increase buff size from 8 to 24 bytes in PrintPubKeyRSA and related
EVP PKEY print functions.
This commit is contained in:
Anthony Hu
2026-03-27 09:15:27 -04:00
committed by JacobBarthelmeh
parent 985cceaa97
commit 5bd5f36dff
+4 -4
View File
@@ -11877,7 +11877,7 @@ static int PrintHexWithColon(WOLFSSL_BIO* out, const byte* input,
static int PrintPubKeyRSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
int indent, int bitlen, WOLFSSL_ASN1_PCTX* pctx)
{
byte buff[8] = { 0 };
byte buff[24] = { 0 };
int res = WC_NO_ERR_TRACE(WOLFSSL_FAILURE);
word32 inOutIdx = 0;
word32 nSz; /* size of modulus */
@@ -12021,7 +12021,7 @@ static int PrintPubKeyEC(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
{
byte* pub = NULL;
word32 pubSz = 0;
byte buff[8] = { 0 };
byte buff[24] = { 0 };
int res = WOLFSSL_SUCCESS;
word32 inOutIdx = 0;
int curveId = 0;
@@ -12210,7 +12210,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
int indent, int bitlen, WOLFSSL_ASN1_PCTX* pctx)
{
byte buff[8] = { 0 };
byte buff[24] = { 0 };
int length;
int res = WC_NO_ERR_TRACE(WOLFSSL_FAILURE);
word32 inOutIdx = 0;
@@ -12417,7 +12417,7 @@ static int PrintPubKeyDH(WOLFSSL_BIO* out, const byte* pkey, int pkeySz,
int indent, int bitlen, WOLFSSL_ASN1_PCTX* pctx)
{
byte buff[8] = { 0 };
byte buff[24] = { 0 };
int res = WC_NO_ERR_TRACE(WOLFSSL_FAILURE);
word32 length;
word32 inOutIdx;