1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Juliusz Sosinowicz <juliusz@wolfssl.com>
3 Date: Sat, 12 Feb 2022 00:34:24 +0100
4 Subject: [PATCH] Reported in ZD13631
6 `ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain
8 References: https://github.com/wolfSSL/wolfssl/issues/4879
10 src/internal.c | 3 +++
11 1 file changed, 3 insertions(+)
13 diff --git a/src/internal.c b/src/internal.c
14 index 0dded42a76c4..f5814d30607c 100644
17 @@ -12372,6 +12372,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
20 ret = 0; /* clear errors and continue */
21 + #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
22 + ssl->peerVerifyRet = 0;