crypt32: Implement finding an existing certificate in a store.

This commit is contained in:
Juan Lang 2007-11-26 11:49:36 -08:00 committed by Alexandre Julliard
parent b3ff6803c0
commit ab55435ef1
1 changed files with 11 additions and 0 deletions

View File

@ -1084,6 +1084,14 @@ static BOOL compare_cert_by_issuer(PCCERT_CONTEXT pCertContext, DWORD dwType,
return ret; return ret;
} }
static BOOL compare_existing_cert(PCCERT_CONTEXT pCertContext, DWORD dwType,
DWORD dwFlags, const void *pvPara)
{
PCCERT_CONTEXT toCompare = (PCCERT_CONTEXT)pvPara;
return CertCompareCertificate(pCertContext->dwCertEncodingType,
pCertContext->pCertInfo, toCompare->pCertInfo);
}
PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore, PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
DWORD dwCertEncodingType, DWORD dwFlags, DWORD dwType, const void *pvPara, DWORD dwCertEncodingType, DWORD dwFlags, DWORD dwType, const void *pvPara,
PCCERT_CONTEXT pPrevCertContext) PCCERT_CONTEXT pPrevCertContext)
@ -1117,6 +1125,9 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore,
case CERT_COMPARE_ISSUER_OF: case CERT_COMPARE_ISSUER_OF:
compare = compare_cert_by_issuer; compare = compare_cert_by_issuer;
break; break;
case CERT_COMPARE_EXISTING:
compare = compare_existing_cert;
break;
default: default:
FIXME("find type %08x unimplemented\n", dwType); FIXME("find type %08x unimplemented\n", dwType);
compare = NULL; compare = NULL;