Skip to content

Commit 5f15d57

Browse files
authored
Merge pull request #9908 from julek-wolfssl/fenrir/205
Set upper bound on post-auth cert reqs
2 parents 3b68026 + 0c26920 commit 5f15d57

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/tls13.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14205,6 +14205,13 @@ int wolfSSL_request_certificate(WOLFSSL* ssl)
1420514205
return NOT_READY_ERROR;
1420614206
if (!ssl->options.postHandshakeAuth)
1420714207
return POST_HAND_AUTH_ERROR;
14208+
if (ssl->certReqCtx != NULL) {
14209+
if (ssl->certReqCtx->len != 1)
14210+
return BAD_STATE_E;
14211+
/* We support sending up to 255 certificate requests */
14212+
if (ssl->certReqCtx->ctx == 255)
14213+
return BAD_STATE_E;
14214+
}
1420814215

1420914216
certReqCtx = (CertReqCtx*)XMALLOC(sizeof(CertReqCtx), ssl->heap,
1421014217
DYNAMIC_TYPE_TMP_BUFFER);

0 commit comments

Comments
 (0)