Fix to resolve issue with verify callback not causing an error (if one not already present) when returning 0. Test case to follow shortly.

This commit is contained in:
David Garske
2018-08-14 16:52:47 -06:00
parent 31e37ea5df
commit 53c0003cad

View File

@@ -8602,6 +8602,12 @@ static int DoVerifyCallback(WOLFSSL* ssl, int ret, ProcPeerCertArgs* args)
WOLFSSL_MSG("Verify callback overriding error!");
ret = 0;
}
else {
/* induce error if one not present */
if (ret == 0) {
ret = VERIFY_CERT_ERROR;
}
}
#ifdef OPENSSL_EXTRA
if (args->certIdx > 0)
FreeX509(x509);