SetSuitesHashSigAlgo fix

ZD#21599
This commit is contained in:
Mattia Moffa
2026-04-13 16:46:19 +02:00
parent b17755b63f
commit f540bb3ddf
+11
View File
@@ -29546,6 +29546,17 @@ int SetSuitesHashSigAlgo(Suites* suites, const char* list)
break;
}
}
{
word32 needed = 2;
#if defined(WC_RSA_PSS) && defined(WOLFSSL_TLS13)
if (sig_alg == rsa_pss_sa_algo)
needed = 4;
#endif
if ((word32)idx + needed > WOLFSSL_MAX_SIGALGO) {
ret = 0;
break;
}
}
AddSuiteHashSigAlgo(suites->hashSigAlgo, mac_alg, sig_alg, 0, &idx);
sig_alg = 0;
mac_alg = no_mac;