Skip to content

Commit

Permalink
Merge pull request #6772 from bandi13/zd16449_more_fixes
Browse files Browse the repository at this point in the history
Zd16449 more fixes
  • Loading branch information
JacobBarthelmeh authored Sep 14, 2023
2 parents 6bf716b + 3d332a4 commit 6b6c9f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion async-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function Test() {
function Remove() {
UnlinkFiles

rm -rf ./async
rm -rf ${ASYNC_DIR}
}

if [ "$#" -gt 1 ]; then
Expand Down
26 changes: 14 additions & 12 deletions src/tls13.c
Original file line number Diff line number Diff line change
Expand Up @@ -8665,19 +8665,21 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
}
EncodeSigAlg(ssl->options.hashAlgo, args->sigAlgo, args->verify);

if (ssl->hsType == DYNAMIC_TYPE_RSA) {
int sigLen = MAX_SIG_DATA_SZ;
if (args->length > MAX_SIG_DATA_SZ)
sigLen = args->length;
args->sigData = (byte*)XMALLOC(sigLen, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
}
else {
args->sigData = (byte*)XMALLOC(MAX_SIG_DATA_SZ, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
}
if (args->sigData == NULL) {
ERROR_OUT(MEMORY_E, exit_scv);
if (ssl->hsType == DYNAMIC_TYPE_RSA) {
int sigLen = MAX_SIG_DATA_SZ;
if (args->length > MAX_SIG_DATA_SZ)
sigLen = args->length;
args->sigData = (byte*)XMALLOC(sigLen, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
}
else {
args->sigData = (byte*)XMALLOC(MAX_SIG_DATA_SZ, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
}
if (args->sigData == NULL) {
ERROR_OUT(MEMORY_E, exit_scv);
}
}

/* Create the data to be signed. */
Expand Down

0 comments on commit 6b6c9f9

Please sign in to comment.