@@ -7791,8 +7791,6 @@ static int SendTls13CertificateRequest(WOLFSSL* ssl, byte* reqCtx,
77917791 int sendSz;
77927792 word32 i;
77937793 word32 reqSz;
7794- word16 hashSigAlgoSz = 0;
7795- SignatureAlgorithms* sa;
77967794
77977795 WOLFSSL_START(WC_FUNC_CERTIFICATE_REQUEST_SEND);
77987796 WOLFSSL_ENTER("SendTls13CertificateRequest");
@@ -7802,19 +7800,12 @@ static int SendTls13CertificateRequest(WOLFSSL* ssl, byte* reqCtx,
78027800 if (ssl->options.side != WOLFSSL_SERVER_END)
78037801 return SIDE_ERROR;
78047802
7805- /* Get the length of the hashSigAlgo buffer */
7806- InitSuitesHashSigAlgo(NULL, SIG_ALL, 1, 1, ssl->buffers.keySz,
7807- &hashSigAlgoSz);
7808- sa = TLSX_SignatureAlgorithms_New(ssl, hashSigAlgoSz, ssl->heap);
7809- if (sa == NULL)
7810- return MEMORY_ERROR;
7811- InitSuitesHashSigAlgo(sa->hashSigAlgo, SIG_ALL, 1, 1, ssl->buffers.keySz,
7812- &hashSigAlgoSz);
7813- ret = TLSX_Push(&ssl->extensions, TLSX_SIGNATURE_ALGORITHMS, sa, ssl->heap);
7814- if (ret != 0) {
7815- TLSX_SignatureAlgorithms_FreeAll(sa, ssl->heap);
7816- return ret;
7817- }
7803+ /* Remove TLSX_SingnatureAlgorithms_New from here:
7804+ * TLSX_SignatureAlgorithms_Write fallbacks correctly to either ssl->suites
7805+ * or ctx->suites to write out the Signature Algorithms extensions.
7806+ *
7807+ * The extensions is already correctly populated in DoTls13ClientHello
7808+ * TLSX_PopulateExtensions */
78187809
78197810 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
78207811#ifdef WOLFSSL_DTLS13
0 commit comments