winhttp: Let CertVerifyCertificateChainPolicy handle certain security flags.
This commit is contained in:
parent
aa95bc4e31
commit
938767cae3
|
@ -326,6 +326,7 @@ static DWORD netconn_verify_cert( PCCERT_CONTEXT cert, HCERTSTORE store,
|
|||
sslExtraPolicyPara.u.cbSize = sizeof(sslExtraPolicyPara);
|
||||
sslExtraPolicyPara.dwAuthType = AUTHTYPE_SERVER;
|
||||
sslExtraPolicyPara.pwszServerName = server;
|
||||
sslExtraPolicyPara.fdwChecks = security_flags;
|
||||
policyPara.cbSize = sizeof(policyPara);
|
||||
policyPara.dwFlags = 0;
|
||||
policyPara.pvExtraPolicyPara = &sslExtraPolicyPara;
|
||||
|
@ -338,10 +339,7 @@ static DWORD netconn_verify_cert( PCCERT_CONTEXT cert, HCERTSTORE store,
|
|||
if (ret && policyStatus.dwError)
|
||||
{
|
||||
if (policyStatus.dwError == CERT_E_CN_NO_MATCH)
|
||||
{
|
||||
if (!(security_flags & SECURITY_FLAG_IGNORE_CERT_CN_INVALID))
|
||||
err = ERROR_WINHTTP_SECURE_CERT_CN_INVALID;
|
||||
}
|
||||
err = ERROR_WINHTTP_SECURE_CERT_CN_INVALID;
|
||||
else
|
||||
err = ERROR_WINHTTP_SECURE_INVALID_CERT;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue