Skip to content

Commit 6cc35f8

Browse files
committed
Don't init OCSP requests when cert is in bad state
1 parent 9dac3f1 commit 6cc35f8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/internal.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15704,7 +15704,13 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1570415704
}
1570515705

1570615706
#ifdef HAVE_OCSP
15707-
{
15707+
if (ret == 0 ||
15708+
/* Don't enter when args->dCert is potentially in
15709+
* a bad state. */
15710+
(ret != WC_NO_ERR_TRACE(ASN_PARSE_E) &&
15711+
ret != WC_NO_ERR_TRACE(BUFFER_E) &&
15712+
ret != WC_NO_ERR_TRACE(MEMORY_E) &&
15713+
ret != WC_NO_ERR_TRACE(BAD_FUNC_ARG))) {
1570815714
/* If we are processing OCSP staples then always
1570915715
* initialize the corresponding request. */
1571015716
int ocspRet = 0;

0 commit comments

Comments
 (0)