Fix to only AddCA when its CA type and veryNone is not set.

This commit is contained in:
David Garske
2019-09-17 07:56:02 -07:00
parent b7c08988dc
commit 0e5de0c076

View File

@ -10053,7 +10053,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
ret = DoVerifyCallback(ssl, ret, args);
/* If valid CA then add to Certificate Manager */
if (ret == 0) {
if (ret == 0 && args->dCert->isCA && !ssl->options.verifyNone) {
buffer* cert = &args->certs[args->certIdx];
/* Is valid CA */