Fix for old certs not discarded when server does not resume session

pull/1785/head
Eric Blankenhorn 2018-08-24 07:53:35 -05:00
parent 2420af3cf2
commit 498d8e6c15
1 changed files with 8 additions and 0 deletions

View File

@ -9751,6 +9751,14 @@ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx,
WOLFSSL_START(WC_FUNC_CERTIFICATE_DO);
WOLFSSL_ENTER("DoCertificate");
#ifdef SESSION_CERTS
/* Reset the session cert chain count in case the session resume failed. */
ssl->session.chain.count = 0;
#ifdef WOLFSSL_ALT_CERT_CHAINS
ssl->session.altChain.count = 0;
#endif
#endif /* SESSION_CERTS */
ret = ProcessPeerCerts(ssl, input, inOutIdx, size);
#ifdef OPENSSL_EXTRA