Commit ab55435e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Implement finding an existing certificate in a store.

parent b3ff6803
...@@ -1084,6 +1084,14 @@ static BOOL compare_cert_by_issuer(PCCERT_CONTEXT pCertContext, DWORD dwType, ...@@ -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, ...@@ -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;
......
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