Module: wine Branch: master Commit: ab55435ef16f1531292f1b6c48496ad022be1214 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab55435ef16f1531292f1b6c48...
Author: Juan Lang juan.lang@gmail.com Date: Mon Nov 26 11:49:36 2007 -0800
crypt32: Implement finding an existing certificate in a store.
---
dlls/crypt32/cert.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index b3808ff..97f9360 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -1084,6 +1084,14 @@ static BOOL compare_cert_by_issuer(PCCERT_CONTEXT pCertContext, DWORD dwType, 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, DWORD dwCertEncodingType, DWORD dwFlags, DWORD dwType, const void *pvPara, PCCERT_CONTEXT pPrevCertContext) @@ -1117,6 +1125,9 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore, case CERT_COMPARE_ISSUER_OF: compare = compare_cert_by_issuer; break; + case CERT_COMPARE_EXISTING: + compare = compare_existing_cert; + break; default: FIXME("find type %08x unimplemented\n", dwType); compare = NULL;