Skip to content

Commit 0c26920

Browse files
committed
Set upper bound on post-auth cert reqs
F-205
1 parent 8093875 commit 0c26920

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
@@ -14182,6 +14182,13 @@ int wolfSSL_request_certificate(WOLFSSL* ssl)
1418214182
return NOT_READY_ERROR;
1418314183
if (!ssl->options.postHandshakeAuth)
1418414184
return POST_HAND_AUTH_ERROR;
14185+
if (ssl->certReqCtx != NULL) {
14186+
if (ssl->certReqCtx->len != 1)
14187+
return BAD_STATE_E;
14188+
/* We support sending up to 255 certificate requests */
14189+
if (ssl->certReqCtx->ctx == 255)
14190+
return BAD_STATE_E;
14191+
}
1418514192

1418614193
certReqCtx = (CertReqCtx*)XMALLOC(sizeof(CertReqCtx), ssl->heap,
1418714194
DYNAMIC_TYPE_TMP_BUFFER);

0 commit comments

Comments
 (0)