Keep untrustedDepth = 0 for self signed certs

This commit is contained in:
Juliusz Sosinowicz
2019-12-27 17:48:34 +01:00
parent 3f13b49fa3
commit 38f466bdfe

View File

@ -10151,7 +10151,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
#ifdef OPENSSL_EXTRA
/* Determine untrusted depth */
if (!alreadySigner) {
if (!alreadySigner && (!args->dCert ||
!args->dCertInit || !args->dCert->selfSigned)) {
args->untrustedDepth = 1;
}
#endif