Skip to content

Commit f540bb3

Browse files
committed
SetSuitesHashSigAlgo fix
ZD#21599
1 parent b17755b commit f540bb3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/internal.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29546,6 +29546,17 @@ int SetSuitesHashSigAlgo(Suites* suites, const char* list)
2954629546
break;
2954729547
}
2954829548
}
29549+
{
29550+
word32 needed = 2;
29551+
#if defined(WC_RSA_PSS) && defined(WOLFSSL_TLS13)
29552+
if (sig_alg == rsa_pss_sa_algo)
29553+
needed = 4;
29554+
#endif
29555+
if ((word32)idx + needed > WOLFSSL_MAX_SIGALGO) {
29556+
ret = 0;
29557+
break;
29558+
}
29559+
}
2954929560
AddSuiteHashSigAlgo(suites->hashSigAlgo, mac_alg, sig_alg, 0, &idx);
2955029561
sig_alg = 0;
2955129562
mac_alg = no_mac;

0 commit comments

Comments
 (0)