Skip to content

Commit bb5b53d

Browse files
committed
Don't init OCSP requests when cert is in bad state
1 parent 8831938 commit bb5b53d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/internal.c

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

1568915689
#ifdef HAVE_OCSP
15690-
{
15690+
if (ret == 0 ||
15691+
/* Don't enter when args->dCert is potentially in
15692+
* a bad state. */
15693+
(ret != WC_NO_ERR_TRACE(ASN_PARSE_E) &&
15694+
ret != WC_NO_ERR_TRACE(BUFFER_E) &&
15695+
ret != WC_NO_ERR_TRACE(MEMORY_E) &&
15696+
ret != WC_NO_ERR_TRACE(BAD_FUNC_ARG))) {
1569115697
/* If we are processing OCSP staples then always
1569215698
* initialize the corresponding request. */
1569315699
int ocspRet = 0;

0 commit comments

Comments
 (0)