mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
stop ProcessPeerCerts from reseting the cert chain
count when an async error was returned
This commit is contained in:
@@ -15237,11 +15237,18 @@ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
WOLFSSL_ENTER("DoCertificate");
|
WOLFSSL_ENTER("DoCertificate");
|
||||||
|
|
||||||
#ifdef SESSION_CERTS
|
#ifdef SESSION_CERTS
|
||||||
/* Reset the session cert chain count in case the session resume failed. */
|
/* Reset the session cert chain count in case the session resume failed,
|
||||||
ssl->session->chain.count = 0;
|
do not reset if we are resuming after an async wait */
|
||||||
#ifdef WOLFSSL_ALT_CERT_CHAINS
|
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
|
||||||
|
if (((ProcPeerCertArgs*)(ssl->async->args))->lastErr != OCSP_WANT_READ &&
|
||||||
|
((ProcPeerCertArgs*)(ssl->async->args))->lastErr != WC_PENDING_E)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ssl->session->chain.count = 0;
|
||||||
|
#ifdef WOLFSSL_ALT_CERT_CHAINS
|
||||||
ssl->session->altChain.count = 0;
|
ssl->session->altChain.count = 0;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif /* SESSION_CERTS */
|
#endif /* SESSION_CERTS */
|
||||||
|
|
||||||
ret = ProcessPeerCerts(ssl, input, inOutIdx, size);
|
ret = ProcessPeerCerts(ssl, input, inOutIdx, size);
|
||||||
|
Reference in New Issue
Block a user