Commit 9da1baa1 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Use real certificates to test finding subject certificates, and correct finding them.

parent 8778b9f5
...@@ -908,11 +908,21 @@ static BOOL compare_cert_by_subject_cert(PCCERT_CONTEXT pCertContext, ...@@ -908,11 +908,21 @@ static BOOL compare_cert_by_subject_cert(PCCERT_CONTEXT pCertContext,
CERT_INFO *pCertInfo = (CERT_INFO *)pvPara; CERT_INFO *pCertInfo = (CERT_INFO *)pvPara;
BOOL ret; BOOL ret;
/* Matching serial number and subject match.. */
ret = CertCompareCertificateName(pCertContext->dwCertEncodingType, ret = CertCompareCertificateName(pCertContext->dwCertEncodingType,
&pCertInfo->Issuer, &pCertContext->pCertInfo->Subject); &pCertInfo->Issuer, &pCertContext->pCertInfo->Subject);
if (ret && pCertInfo->SerialNumber.cbData) if (ret)
ret = CertCompareIntegerBlob(&pCertContext->pCertInfo->SerialNumber, ret = CertCompareIntegerBlob(&pCertContext->pCertInfo->SerialNumber,
&pCertInfo->SerialNumber); &pCertInfo->SerialNumber);
else
{
/* failing that, if the serial number and issuer match, we match */
ret = CertCompareIntegerBlob(&pCertContext->pCertInfo->SerialNumber,
&pCertInfo->SerialNumber);
if (ret)
ret = CertCompareCertificateName(pCertContext->dwCertEncodingType,
&pCertInfo->Issuer, &pCertContext->pCertInfo->Issuer);
}
TRACE("returning %d\n", ret); TRACE("returning %d\n", ret);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment